Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I filter out reference sequences that get multiple hits in BWA MEM ?

    Hi everyone !

    I have exported a small number (~500) of 145 pb sequences from a Stacks analyse.

    I then used it as my "reference genome" (actually a very fragmented and unordered one, consequently !) to align a .fastq.gz file containing several millions of reads 1. My objective is to filter out, from my "reference", every single 145 pb sequence from which an aligned read actually has multiple hits.

    e.g if a given read has a primary alignment on Seq A from reference, but also a secondary alignment on Seq B from reference, I want to filter out both Seq A and B. In the end, I hope to obtain a smaller "reference" with very specific sequences that I can amplify unambiguously by PCR.

    I used BWA MEM to do the alignment, with parameters -a and -M turned on, but I would like to know if there would be another way (than making a script that works directly on the SAM file) to detect all sequences that I want to get rid of.

    This document about SAM format and SAMtools manual are both very helpful, and I have read a lot of threads on forums including this one but I couldn't find any solution for my issue. Would somebody have any suggestion :-) ?

    Thanks a lot !

    Chrys

  • #2
    Point of clarification: assuming that your reads are shorter than 145bp, some of your reads may uniquely match a portion of reference read 'A' while other reads multi-map to references 'A' plus 'B'. Do you want to keep or discard reference 'A'?

    Comment


    • #3
      Hello and thank you so much for answering me !

      In this case, I would discard reference A. Indeed my ultimate goal is to avoid as much as possible cross amplification when performing PCR, and to avoid the risk to pick up a reference that has a portion highly similar to another.

      I know this is not very subtle, but I'm still discovering sequence alignment and I want to start on an easy level

      Comment


      • #4
        The simplest approach is probably to output the multi-mapping reads using SAMtools 'view' to filter (an explanation of SAM flags can be found here), then use BEDtools 'intersect -v' to output the reference elements that are not contained in your multi-mapper BAM.

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Essential Discoveries and Tools in Epitranscriptomics
          by seqadmin




          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
          04-22-2024, 07:01 AM
        • seqadmin
          Current Approaches to Protein Sequencing
          by seqadmin


          Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
          04-04-2024, 04:25 PM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Today, 11:49 AM
        0 responses
        11 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 08:47 AM
        0 responses
        16 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-11-2024, 12:08 PM
        0 responses
        61 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        60 views
        0 likes
        Last Post seqadmin  
        Working...
        X