Thank you very much! It works very well!
Split large fastq based on value in description line
I have a large fastq.gz file with around 2 million reads. The description line of each read contains additional metadata separated by whitespace. Among these metadata there is a parameter "barcode=". I would like to split my fastq.gz into separate fastq.gz files based on the barcode number following "barcode=". Any suggestion how to do it?
Thanks in advance!
• 2,495 views
•
link
3 answers
• 0 views
•
link
While @Bob's solution will work, there are dedicated packages (porechop, qcat and last) to demutiplex nanopore reads. They will also help with removing adapters.
• 0 views
•
link
Thank you! Although seqkit worked fine I will surely look into your suggestions as well.
• 0 views
•
link
zcat file.gz | mawk 'BEGIN{FS=" "}{if(/^@/){OF=substr($7,9)}{print $0>OF".fq"}}'
The output is non-compressed fastq files though
• 0 views
•
link
Log in to answer this question.
Can you show a couple of example reads?
I've created a dummy read set: