Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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!

  • #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


    • #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


      • #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


        • #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

          • seqadmin
            Understanding Genetic Influence on Infectious Disease
            by seqadmin




            During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

            Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
            09-09-2024, 10:59 AM
          • seqadmin
            Addressing Off-Target Effects in CRISPR Technologies
            by seqadmin






            The first FDA-approved CRISPR-based therapy marked the transition of therapeutic gene editing from a dream to reality1. CRISPR technologies have streamlined gene editing, and CRISPR screens have become an important approach for identifying genes involved in disease processes2. This technique introduces targeted mutations across numerous genes, enabling large-scale identification of gene functions, interactions, and pathways3. Identifying the full range...
            08-27-2024, 04:44 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Today, 06:25 AM
          0 responses
          13 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, Yesterday, 01:02 PM
          0 responses
          12 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 09-18-2024, 06:39 AM
          0 responses
          14 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 09-11-2024, 02:44 PM
          0 responses
          14 views
          0 likes
          Last Post seqadmin  
          Working...
          X