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

          • SEQadmin2
            Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
            by SEQadmin2



            Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
            ...
            Yesterday, 11:10 AM
          • SEQadmin2
            Cancer Drug Resistance: The Lingering Barrier to Rising Survival
            by SEQadmin2



            Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

            There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
            07-08-2026, 05:17 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Yesterday, 10:04 AM
          0 responses
          10 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-08-2026, 10:08 AM
          0 responses
          7 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-07-2026, 11:05 AM
          0 responses
          15 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-02-2026, 11:08 AM
          0 responses
          31 views
          0 reactions
          Last Post SEQadmin2  
          Working...