Unconfigured Ad

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

    #1

    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
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM
          • SEQadmin2
            New Genomics Technologies Take Aim at Long-Standing Limits
            by SEQadmin2


            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
            ...
            09-28-2026, 10:25 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 10-22-2026, 11:13 AM
          0 responses
          29 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          22 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          39 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          45 views
          0 reactions
          Last Post SEQadmin2  
          Working...