Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Splitting a FastQ file into two

    Hello folks,

    I happen to have a small problem which seemed to be trivial at first, but keeps me busy for a while now already. Maybe you can help...

    Problem:

    I need to split 615M paired reads currently in two FastQ files into two file pairs with 308M reads each.

    Solution attempt A:

    I unsuccessfully tried to use line count based tools like split or awk, but since newline characters occur in the quality scores, these tools respectively I screwed up badly.

    Solution attempt B:
    Code:
    bbmap/reformat.sh  in=...  in2=... out=... out2=... reads=308000000
    bbmap/reformat.sh  in=...  in2=... out=... out2=... skipreads=308000000
    resulted in


    Input is being processed as paired
    Input: 615307122 reads 91326404105 bases
    Output: 615307122 reads (100.00%) 91326404105 bases (100.00%)

    for the first command and in

    Input is being processed as paired
    Input: 615307122 reads 91326404105 bases
    Output: 0 reads (0.00%) 0 bases (0.00%)

    for the second command. Effectively those read commands seem to be ignored (BBMap Version 38.76).


    Solution attempt C:
    Code:
    famas --in=...  --in2=... --out=.XXXXXX.fq.gz  --out2=.XXXXXX.fq.gz  -x 308000000
    flooded the output directory with thousands of subfiles files (instead of the actually needed two files each) until the file system couldn't cope with the number of open files anymore and ran out of file descriptors (famas version 0.0.12).


    ERROR(famas.c|open_output_one:1056): Couldn't open =...compressed.065534.fq.gz
    ERROR(famas.c|main:1163): Couldn't open output files. Exiting...


    Since it took me a while to clean that mess up on the cluster again, I am somewhat reluctant to try out more now. Any ideas what I made wrong or suggestions which tools work better?

    Thanks a lot for reading and help!
    Thias

  • #2
    Cross-posted and answered at: https://www.biostars.org/p/451453/

    Comment


    • #3
      Indeed, the issue is solved by now using seqkit split2.

      My apologies for not indicating this here. I had posted here first but the thread was lingering in moderation for ~24h and thus I decided to ask for help on Biostars. It had not yet shown up when I got the answer on Biostars and I subsequently forgot to check back here. Thanks a lot to everyone none the less!

      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...
        Today, 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, 07:17 AM
      0 responses
      11 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
      20 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-29-2024, 10:49 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Working...
      X