Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • morning latte
    Member
    • Jun 2013
    • 91

    #1

    Subsampling from one paired-end fastq file

    Hi,

    I know there were already few discussions about this topic but I am not sure I got it.

    I have a fastq file containing Illumina paired-end reads. Below are the first four headers of the fastq file.

    @HWUSI-EAS1599:82:64H78AAXX:7:100:10000:10533 1:N:0:CGATGT
    @HWUSI-EAS1599:82:64H78AAXX:7:100:10000:10533 2:N:0:CGATGT
    @HWUSI-EAS1599:82:64H78AAXX:7:100:10000:10642 1:N:0:CGATGT
    @HWUSI-EAS1599:82:64H78AAXX:7:100:10000:10642 2:N:0:CGATGT

    It looks like first and second lines are a pair and the third and fourth lines are the another pair. If I want to make a subset containing 1,000 reads, can I just extract the first 1,000 reads in order using 'head' command? I do not understand why it might cause biases. If 'head' command is not a good way for subsampling, any very simple way to do it? Thank you a lot for your comments in advance.
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Head isn't ideal since the reads near the beginning of the fastq file tend to be crappier. So, you really want to randomly subsample from the whole fastq file. You should be able to adapt the scripts found here and elsewhere to your case of having the pairs in the same file.

    Comment

    • swbarnes2
      Senior Member
      • May 2008
      • 910

      #3
      The first tile in your fastq is going to come from the edge of the flow cell, so won't be as good as tiles in the middle. Use grep | head to get the first 1000 reads from a tile in the middle; that would be better. The tile ID should be the number after the lane.

      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
      35 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      25 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      41 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...