Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Merging Paired-End FastQ Files

    Hi,

    I want to merge the two corresponding FastQ files to get longer reads (with FLASh or COPE).

    It seems like I have to sort the FastQ files before.

    Does anyone have an idea how I can sort FastQ files by their identifier?

    Thank you.

  • #2
    If you want to sort the reads in every FastQ file by the read ids, I would like to use awk:

    # cat my_input.fastq | awk 'BEGIN{line_no=0;} line_no<=3{line_str = line_str $_ "\t"; line_no ++;} line_no == 4{print line_str; line_str="";line_no = 0}'| cut -f 1-4|sort -k 1,1 | sed 's/\t/\n/g' > my_output.fastq

    I tested this command on a short FastQ file; it should be OK for longer ones.
    Last edited by yangliao; 05-22-2013, 04:20 AM.

    Comment


    • #3
      Originally posted by jmpi View Post
      Hi,

      I want to merge the two corresponding FastQ files to get longer reads (with FLASh or COPE).

      It seems like I have to sort the FastQ files before.

      Does anyone have an idea how I can sort FastQ files by their identifier?

      Thank you.
      First, what do you mean by "sorted" and are you sure you need to do any kind of sorting? All current sequencers output paired end read data in ordered files. By ordered I mean that the first read in the R1 file matches the first read in the R2 file, second R1 == second R2 and so on. This is what almost all tools which take paired input files expect. The reads do not have to "sorted" in any conventional sense (e.g. alphabetically, numerically) they just have to be in matched order.

      Unless something was done to your read files after they were output by the sequencer they will be in matched order and you shouldn't have to do anything with them to input them to FLASH or COPE.

      Comment


      • #4
        I just found out that I did not get the original sequence. So, my problem is solved. Thank you both for your help.

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Current Approaches to Protein Sequencing
          by seqadmin


          Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
          04-04-2024, 04:25 PM
        • seqadmin
          Strategies for Sequencing Challenging Samples
          by seqadmin


          Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
          03-22-2024, 06:39 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 04-11-2024, 12:08 PM
        0 responses
        27 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        30 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 09:21 AM
        0 responses
        26 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-04-2024, 09:00 AM
        0 responses
        52 views
        0 likes
        Last Post seqadmin  
        Working...
        X