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
          Recent Advances in Sequencing Analysis Tools
          by seqadmin


          The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
          Yesterday, 07:48 AM
        • seqadmin
          Essential Discoveries and Tools in Epitranscriptomics
          by seqadmin




          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
          04-22-2024, 07:01 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Today, 06:57 AM
        0 responses
        9 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 07:17 AM
        0 responses
        13 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-02-2024, 08:06 AM
        0 responses
        19 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-30-2024, 12:17 PM
        0 responses
        22 views
        0 likes
        Last Post seqadmin  
        Working...
        X