Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nayshool@gmail.com
    Junior Member
    • Aug 2014
    • 5

    Problem with alignment

    Hello everyone!

    We have received from BGI china a few samples we sent for exome sequence + Basic analysis. We got the fastQ files and BAM files. I have made my own BAM files using BWA and Picard tools using the following commends:

    BWA:
    bwa mem human_g1k_v37.fasta file1.fq.gz file2.fq.gz file3.fq.gz file4.fq.gz > result.sam

    PICARD:
    java -jar SortSam.jar I=result.sam O=result.bam SORT_ORDER=coordinate

    The size of the files that I got (2Gb) , was about a half from the BAM files BGI (4.2 Gb) sent me.
    Here are the samtools flagstat results for both files:

    my BAM file:

    [gen-biorep@gen-biorep-3 VA6]$ samtools flagstat result.bam
    28842836 + 0 in total (QC-passed reads + QC-failed reads)
    0 + 0 duplicates
    28824861 + 0 mapped (99.94%:-nan%)
    28842836 + 0 paired in sequencing
    14423043 + 0 read1
    14419793 + 0 read2
    28593748 + 0 properly paired (99.14%:-nan%)
    28814004 + 0 with itself and mate mapped
    10857 + 0 singletons (0.04%:-nan%)
    165631 + 0 with mate mapped to a different chr
    131466 + 0 with mate mapped to a different chr (mapQ>=5)



    BGI BAM File:

    [gen-biorep@gen-biorep-3 result_alignment]$ samtools flagstat VA6.rmdup.bam
    57668392 + 0 in total (QC-passed reads + QC-failed reads)
    3039053 + 0 duplicates
    57369744 + 0 mapped (99.48%:-nan%)
    57668392 + 0 paired in sequencing
    28834196 + 0 read1
    28834196 + 0 read2
    56991680 + 0 properly paired (98.83%:-nan%)
    57273460 + 0 with itself and mate mapped
    96284 + 0 singletons (0.17%:-nan%)
    198072 + 0 with mate mapped to a different chr
    181774 + 0 with mate mapped to a different chr (mapQ>=5


    why does half of my reads disappear? How can I solve this problem?

    Thank you,

    Omri
    Last edited by [email protected]; 08-05-2014, 05:04 AM.
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Unless you mislabeled the flagstat output, it looks like your results contain about twice as many alignments as those from BGI, though that could be due to yours containing multiple copies of multimappers while BGI's doesn't. In general, you'd need to look at how they aligned things and that will likely tell you why there's a difference.

    Comment

    • dpryan
      Devon Ryan
      • Jul 2011
      • 3478

      #3
      BTW, please don't cross post on both here and biostars, it creates duplicate work from the community.

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        Does either set of BAM file include unmapped read pairs? 'samtools idxstats example.bam' might help answer this.

        P.S. Duplicate question was https://www.biostars.org/p/108537/

        Comment

        • nayshool@gmail.com
          Junior Member
          • Aug 2014
          • 5

          #5
          Sorry for the duplicate, won't happen again..

          I'll try to remove the question from BioStars

          Originally posted by dpryan View Post
          BTW, please don't cross post on both here and biostars, it creates duplicate work from the community.

          Comment

          • nayshool@gmail.com
            Junior Member
            • Aug 2014
            • 5

            #6
            thank you. I have mislabled the flagstat ouputs, I have change it. BGI have more reads.

            Originally posted by dpryan View Post
            Unless you mislabeled the flagstat output, it looks like your results contain about twice as many alignments as those from BGI, though that could be due to yours containing multiple copies of multimappers while BGI's doesn't. In general, you'd need to look at how they aligned things and that will likely tell you why there's a difference.

            Comment

            • swbarnes2
              Senior Member
              • May 2008
              • 910

              #7
              The .bam from bgi reports the exact same number of read 1 reads as read 2 reads. Yours does not. Are you sure that giving it 4 fastq files at once is the proper way to use bwa mem? I wonder if it is just ignoring those last two files. Maybe you could spot-check to see if read names from those fastqs are in your .bam

              Comment

              • nayshool@gmail.com
                Junior Member
                • Aug 2014
                • 5

                #8
                problem solved

                Originally posted by swbarnes2 View Post
                The .bam from bgi reports the exact same number of read 1 reads as read 2 reads. Yours does not. Are you sure that giving it 4 fastq files at once is the proper way to use bwa mem? I wonder if it is just ignoring those last two files. Maybe you could spot-check to see if read names from those fastqs are in your .bam
                Well i merged the 4 fastQ into one file and it did the trick. It's appear that BWA-MEM ignored from the last 2 files as you said. I got the right size of BAMs after that . Thank you swbarnes2 very much for your help!

                Comment

                • swbarnes2
                  Senior Member
                  • May 2008
                  • 910

                  #9
                  Well, don't merge them into 1 file, that's just throwing away real paired information.

                  You want all of the read 1 data in one fastq, and all the read 2 data in a second. Just make sure that the nth entry in the first fastq has the same read name as the nth read in file 2.

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                    by SEQadmin2


                    Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                    The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                    ...
                    06-02-2026, 10:05 AM
                  • SEQadmin2
                    Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                    by SEQadmin2


                    With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                    Introduction

                    Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                    05-22-2026, 06:42 AM
                  • SEQadmin2
                    Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
                    by SEQadmin2

                    Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


                    Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
                    05-06-2026, 09:04 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Today, 08:59 AM
                  0 responses
                  8 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-02-2026, 12:03 PM
                  0 responses
                  21 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-02-2026, 11:40 AM
                  0 responses
                  17 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 05-28-2026, 11:40 AM
                  0 responses
                  30 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...