Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Sorted BAM read count >2x total FASTQ count

    This might be a silly question but it is bugging me and I need the answer. I have a set of paired end FASTQ files that contain about 30 million reads total. After aligning them with BWA and sorting the output with samtools, the resulting BAM file now has about 72 million reads. Why????

  • #2
    Show us your alignment and sorting commands.

    Comment


    • #3
      Multiple alignments...

      Comment


      • #4
        Both come from iterating the files in Python. The FASTQ files are read in in blocks of four lines each which is one read. This example is a MiSeq run so 30 million (15 million in each FASTQ) seems realistic. The BAM count is from

        bamfile = pysam.AlignmentFile(o['bamfile'], "rb")
        bamfile.count()
        or
        bamfile_reads = functools.reduce(lambda x, y: x + y, [eval('+'.join(l.rstrip('\n').split('\t')[2:])) for l in pysam.idxstats(o['bamfile'])])



        or simply counting the reads as I iterate the BAM file to do my analysis.
        Last edited by pkMyt1; 05-12-2015, 08:36 AM.

        Comment


        • #5
          Originally posted by fanli View Post
          Multiple alignments...
          So....
          Would this imply my alignment settings are keeping things I should not?

          bwa mem -a -T 25 -L '(100, 100)'

          Comment


          • #6
            I would imagine that the -a flag is to blame.

            Comment


            • #7
              Originally posted by pkMyt1 View Post
              So....
              Would this imply my alignment settings are keeping things I should not?
              That depends on the goal of your experiment. What are you trying to do?

              Comment


              • #8
                Originally posted by Brian Bushnell View Post
                That depends on the goal of your experiment. What are you trying to do?
                This is duplex exome sequencing. Very deep but only about 80 kb of capture. I did not want to lose any alignments where one read aligned and the other did not either due to a translocation or simply a sequencing error. This is why I did the -a option. Each read is uniquely tagged so I had been able to filter things in the end. This is the first time I have seen this but it is also the first time I have run a sample that I know contains many chromosomal rearrangements in the way of translocations, duplications, deletions. I will need to try and pull out some of these multiple alignments and have a look at them so I can understand what they are better.

                Comment


                • #9
                  In that case, it sounds like considering all good alignments of the reads is probably best. The reason for all the multiple alignments is presumably that you're targeting a repetitive region.

                  Comment

                  Latest Articles

                  Collapse

                  • 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
                  • seqadmin
                    Strategies for Sequencing Challenging Samples
                    by seqadmin


                    Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                    03-22-2024, 06:39 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, 04-11-2024, 12:08 PM
                  0 responses
                  29 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 10:19 PM
                  0 responses
                  32 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 09:21 AM
                  0 responses
                  28 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-04-2024, 09:00 AM
                  0 responses
                  52 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X