neat, thank you!
• 0 views
•
link
Hi all,
I was wondering if anybody knows a smart way (a command or a one-liner) to accomplish the following task.
There is a paried-end fastq file with lots of N's in it.
I need to get a subset of 25,000 matched paired-end reads with no Ns in it.
seqtk seq has a tool that does something similar, but it doesn't work with paired-end reads.
Would welcome any suggestions!
Thank you in advance.
Untested but should work using reformat.sh from BBMap suite.
reformat.sh -Xmx4g in1=R1.fq.gz in2=R2.fq.gz out=stdout.fq.gz maxns=0 | reformat.sh -Xmx4g in=stdin.fq.gz out1=Sampled.R1.fq.gz out2=Sampled.R2.fq.gz samplereadstarget=25000
If enough reads don't remain after initial filtering you could upsample=t to get 25K.
neat, thank you!
Log in to answer this question.
try
--max-n 0with cutadapt