Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • marco12345
    Member
    • Mar 2013
    • 19

    different size fastq?

    Hi,

    I am working on bam files, and need to extract only the paired reads and output them in 2 fastq files (I'm working on a Mac's Terminal).

    I extract the paired reads with samtools view:
    $ samtools view -f1 -b /Input_file.bam > /pair_reads_file.bam

    I then use the picard tools 1.87 version's SamToFastq to create the fastq file:
    @ java -jar -Xmx2g /SamToFastq.jar I=/pair_reads_file.bam F=/Output.read1.fastq F2=/Output.read2.fastq VALIDATION_STRINGENCY=SILENT

    The process creates two fastq files that should be of the same size, which I need for the following analysis. This works with most of my datas (1000 Genome data), but in some rare cases, it creates different size fastq. The number of reads in the 2 fastq files is the same, but one is bigger than the other (around 5% bigger).

    Any suggestion on why is this happening?

    Thank you in advance!
  • Apexy
    Member
    • Apr 2011
    • 62

    #2
    I would imagine that if read length is not the same, file sizes would not be the same for the same number of reads. Kindly computer read lengths stats from both files.

    Comment

    • marco12345
      Member
      • Mar 2013
      • 19

      #3
      Originally posted by Apexy View Post
      I would imagine that if read length is not the same, file sizes would not be the same for the same number of reads. Kindly computer read lengths stats from both files.
      Selecting only the paired reads (samtools view -f1), the number of forward and reverse reads should be the same. In fact even in different sze fastq, the reads counts for forward and reverse is exactly the same.

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Apexy was referring to the possibility that the reads in the two files may be of unequal length in places (e.g. because of QC trimming). Have you checked that?

        Comment

        • marco12345
          Member
          • Mar 2013
          • 19

          #5
          Ah, now I get it! It was actually that.
          Thanks for pointing it out GenoMax, and thanks and sorry Apexy for answering and not being understood!

          Comment

          Latest Articles

          Collapse

          • GATTACAT
            Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by GATTACAT
            Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
            07-01-2026, 11:43 AM
          • SEQadmin2
            Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by SEQadmin2


            I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

            Here are nine questions we think about, in roughly the order they matter, before...
            06-18-2026, 07:11 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 07-02-2026, 11:08 AM
          0 responses
          26 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-30-2026, 05:37 AM
          0 responses
          24 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-26-2026, 11:10 AM
          0 responses
          24 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-17-2026, 06:09 AM
          0 responses
          55 views
          0 reactions
          Last Post SEQadmin2  
          Working...