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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 06-09-2026, 11:58 AM
          0 responses
          27 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-05-2026, 10:09 AM
          0 responses
          33 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-04-2026, 08:59 AM
          0 responses
          40 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-02-2026, 12:03 PM
          0 responses
          62 views
          0 reactions
          Last Post SEQadmin2  
          Working...