Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ymc
    Senior Member
    • Mar 2010
    • 496

    #1

    How to fix bwa and ssaha2 misalignments?

    At the 98th and 99th codon of HLA-DQA1 gene in the reference genome, NA12878 should be ATCATG (reference) and AGTCTG respectively for the two chromomsomes. However, when I looked at the bams (downloaded from 1000g) in IGV, I noticed that both bwa and ssaha2 added an insertion and a deletion to the alignment:

    A-TCATG
    AGTC-TG

    How should I fix this? Increase the gap penalty and re-run the alignment? Is there a way to manually edit the alignment inside bam?
    Attached Files
  • ymc
    Senior Member
    • Mar 2010
    • 496

    #2
    Fixed this by manually edit the sam file. Anyone know if this can be fixed by adjusting the gap penalty?

    Comment

    • ymc
      Senior Member
      • Mar 2010
      • 496

      #3
      I tried GSNAP with SNP-tolerant on. However, I find that many reads trimmed this part for unknown reasons such that the coverage on the 98th and 99th codon in the alternate allele is very low.

      Comment

      • ymc
        Senior Member
        • Mar 2010
        • 496

        #4
        Ran bwa again with gap opening penalty increases from 11 to 15. But I still have those insertion-deletion alignments. What should I try next?

        Comment

        • gaffa
          Member
          • Oct 2010
          • 82

          #5
          You might try running a local realignment program such as SRMA.

          Comment

          • nilshomer
            Nils Homer
            • Nov 2008
            • 1283

            #6
            What's more likely, three SNPs in a row, or two 1bp indels and two matches?

            The inequality you want to satisfy 3*-MM < 2*M + (-O + -E).
            M = 1
            MM = -3
            O = -5
            E = -2

            I use these as the default parameters in TMAP.

            Comment

            • ymc
              Senior Member
              • Mar 2010
              • 496

              #7
              Originally posted by nilshomer View Post
              What's more likely, three SNPs in a row, or two 1bp indels and two matches?

              The inequality you want to satisfy 3*-MM < 2*M + (-O + -E).
              M = 1
              MM = -3
              O = -5
              E = -2

              I use these as the default parameters in TMAP.
              By default, bwa aln has M=1, MM=-3, O=-11, E=-4. It seems to me the inequality should be in favor of having three mismatches but in practice it is not. What's going on here?

              Comment

              • ymc
                Senior Member
                • Mar 2010
                • 496

                #8
                Originally posted by gaffa View Post
                You might try running a local realignment program such as SRMA.
                Is this an abandoned project? The binary is dated 2010-10-22

                Comment

                • darked89
                  Member
                  • Jun 2009
                  • 38

                  #9
                  Originally posted by ymc View Post
                  Is this an abandoned project? The binary is dated 2010-10-22

                  Source on github seems to be newer, but still 1 year old:

                  Short-read Micro-Aligner. Contribute to nh13/SRMA development by creating an account on GitHub.

                  Comment

                  • ymc
                    Senior Member
                    • Mar 2010
                    • 496

                    #10
                    Originally posted by gaffa View Post
                    You might try running a local realignment program such as SRMA.
                    Oh well, I am getting hundreds of this arraylist error after 145min of srma run....

                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)
                    at java.util.ArrayList$SubList.add(ArrayList.java:965)

                    real 145m13.649s
                    user 177m44.719s
                    sys 3m20.097s

                    Comment

                    • ymc
                      Senior Member
                      • Mar 2010
                      • 496

                      #11
                      Originally posted by darked89 View Post
                      Source on github seems to be newer, but still 1 year old:

                      https://github.com/nh13/SRMA
                      Thanks. I am trying this slightly newer 0.1.16 version now

                      Comment

                      • ymc
                        Senior Member
                        • Mar 2010
                        • 496

                        #12
                        SRMA 0.1.16 also crashes

                        I tried "bwa aln -M 2" as well but the problem remains.

                        Comment

                        • darked89
                          Member
                          • Jun 2009
                          • 38

                          #13
                          Originally posted by ymc View Post
                          SRMA 0.1.16 also crashes

                          I tried "bwa aln -M 2" as well but the problem remains.
                          Hard to tell why. Few ideas:

                          1) Just in case: you are using sorted and indexed BAM as SRMA input?

                          2) Try to get some small test BAM file which is known to run OK with SRMA and then check if your local SRMA works on them.

                          3) if 1 and 2 are OK, something else may be wrong with your BAM. You may resort it with newest picard / validate the BAM.

                          4) if all else fails, switch to GATK
                          http://www.broadinstitute.org/gsa/wi..._around_indels

                          Comment

                          • Genomics101
                            Member
                            • May 2012
                            • 60

                            #14
                            I had the same problem. Calling the SNPs without BAQ in samtools mpileup fixed the problem (-B option). I have had the best results using the Extended BAQ, brings back the false negatives while reducing false positives as standard BAQ should.

                            Comment

                            • ymc
                              Senior Member
                              • Mar 2010
                              • 496

                              #15
                              Tried the latest GATK's indel realigner but it does seem to do anything to my problem

                              time java -jar GenomeAnalysisTK-2.0-31-gf57127e/GenomeAnalysisTK.jar -nt 6 -T RealignerTargetCreator -R ../exome/human_g1k_v37.fasta -o SRR098401_bwa.intervals -I ../NA12878/SRR098401_bwa.bam -known ../exome/Mills_and_1000G_gold_standard.indels.b37.vcf
                              time java -jar GenomeAnalysisTK-2.0-31-gf57127e/GenomeAnalysisTK.jar -T IndelRealigner -R ../exome/human_g1k_v37.fasta -I ../NA12878/SRR098401_bwa.bam -targetIntervals SRR098401_bwa.intervals -known ../exome/Mills_and_1000G_gold_standard.indels.b37.vcf -o SRR098401_realigned.bam

                              Comment

                              Latest Articles

                              Collapse

                              • SEQadmin2
                                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                                by SEQadmin2



                                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                                ...
                                10-14-2026, 09:55 AM
                              • SEQadmin2
                                New Genomics Technologies Take Aim at Long-Standing Limits
                                by SEQadmin2


                                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                                ...
                                09-28-2026, 10:25 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 10-15-2026, 10:52 AM
                              0 responses
                              16 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 10-14-2026, 05:39 AM
                              0 responses
                              21 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 10-13-2026, 09:56 AM
                              0 responses
                              22 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 10-09-2026, 11:14 AM
                              0 responses
                              27 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...