Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • EReckase
    Junior Member
    • Oct 2014
    • 7

    [bwa] BWA -a inconsistent results

    I've been puzzling over this issue for a few days, and I'm hoping that someone here can help me out. I have a molecular barcode deduplication process that obtains a reference contig alignment for a set of input reads, and then aligns the input reads back to the contig to determine snp/indel information. I'm using bwa mem to align my reads back to my contig sequence. I'm using the -a option to bwa to provide ALL alignments back to the reference sequences, since many of my reference sequences are very similar to each other (some are even identical).

    What I've found is that bwa does NOT return all alignments when -a is specified - there's some sort of internal logic that is preventing the alignment I'm looking for from appearing in the output. Here's some sample data that reproduces my problem:

    reference sequences:
    Code:
    >GCATACAGATGATGCCCTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >GCAAACAGATGATGACCTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >AAACAGAAGGTCAAAGCTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGGTCAAAGCTGTTGATGTCCCAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >ACAAAGCCAGAAGATGACCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >ACTAACAGATGATGCCCTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >TAACAGAAGGTCAAAGCTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGGTCAAAGCTGTTGATGTCCCAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >TCGCACCTCACTGGTTAACAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCACTGGTCAAAGCTGTTGATGTCCCAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >TAACAGTAGGTCAACGCTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGGTCAAAGCTGTTGATGTCCCAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >GACATGAACACAGCTCCACAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCACCCCCACTGGTCAAAGCTGTTGATGTCCCAGATGATGCCCTGAACGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >GGCCGGACCTTGTGTTCATGCGGGCAAGAGTCCAGA
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGGTTGGGCGATTTCCTTCAAAGACCTGACCTTATGTGGCAGCAGCCTCTCAAGGTCCTCTGGACTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    >TGGCACCTCGAAGATCTTCAACTCTATTGTGTTCAC
    NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCGAAGATCTTGTGCTCATACATGGCCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
    read to align to references:
    Code:
    @NS500180:28:H0YNMBGXX:2:22110:22781:12271_TGGCACCTCGAAGATCTTCAACTCTATTGTGTTCAC
    CGAAGATCTTGTGCTCATACATGGCGACCAAGGCTCCAAGCATGAATGGTGTGAGCTTGGTGAACACAATAGAGTTG
    +
    FFFFFFFFFFFFFFFFFFFFFFFFFF<FFFFFFFFFF<FFFFFFFFFFFFFFF7FFFFFFFFF<FFFFFFAFFFFFF
    Now, note that the last reference sequence is the one I want my read to align to. I indexed the reference fasta with bwa index and made a simple bwa mem call with -a as the only flag. While there are 11 reference sequences, only 10 alignments are reported out. If I delete one of the reference sequences and re-align, the alignment I'm looking for appears.

    Can anyone explain why this is happening? I was even getting different results depending on the order of the sequences in the reference.
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    Only 8 are best matches, so it's not clear to me why it's printing 10 in the first place, or why you would expect it to print 11.

    Comment

    • EReckase
      Junior Member
      • Oct 2014
      • 7

      #3
      Originally posted by Brian Bushnell View Post
      Only 8 are best matches, so it's not clear to me why it's printing 10 in the first place, or why you would expect it to print 11.
      Well, where does it say that they are limited at all?

      -a output all alignments for SE or unpaired PE

      Comment

      • Brian Bushnell
        Super Moderator
        • Jan 2014
        • 2709

        #4
        There are always limits - you can align anything to anything, if you allow arbitrarily low identity. So all alignments really means "all alignments that were found and passed filtering criteria". I don't know what the exact filtering criteria are in this case, but it's common to only consider alignments within some threshold of the score of the best alignment.

        Comment

        • EReckase
          Junior Member
          • Oct 2014
          • 7

          #5
          Unfortunately, none of those thresholds are documented. The alignment score of the one that doesn't show up is better than some of the ones that do, which is why this is so frustrating.

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
            by SEQadmin2


            Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

            The systematic characterization of the human proteome has
            ...
            Today, 11:48 AM
          • SEQadmin2
            Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
            by SEQadmin2



            Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
            ...
            07-09-2026, 11:10 AM
          • SEQadmin2
            Cancer Drug Resistance: The Lingering Barrier to Rising Survival
            by SEQadmin2



            Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

            There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
            07-08-2026, 05:17 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Today, 11:10 AM
          0 responses
          8 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-13-2026, 10:26 AM
          0 responses
          30 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-09-2026, 10:04 AM
          0 responses
          39 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-08-2026, 10:08 AM
          0 responses
          25 views
          0 reactions
          Last Post SEQadmin2  
          Working...