This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting reads from fastq files with BBMAP?

Hi I have a file with list of read ids I would like to extract from a pair-end read. This file only contains 1000 reads. When i use bbmap to accomplish this with the following command however, the resulting size of the fastq files are very similar to original and so are

/bbmap/filterbyname.sh in1=${fq1} in2=${fq2} out1=strip2_R1.fq.gz out2=strip2_R2.fq.gz names=names2.txt

This should only have 1000 reads in the new files but its in the millions!

Is there something I'm doing incorrectly? thanks!

bbmap fastq

What does names2.txt look like (show us output of head -5 names2.txt)? Remember to remove @ or > identifiers from read names in names2.txt. One read name per line in file.

Hi, ok here is how the first few lines look like.

NAME1
K00153:706:H3VMJBBXY:4:1101:12601:1279
K00153:706:H3VMJBBXY:4:1101:25875:1279
K00153:706:H3VMJBBXY:4:1101:17563:1297
K00153:706:H3VMJBBXY:4:1101:18355:1297
K00153:706:H3VMJBBXY:4:1101:28178:1297
K00153:706:H3VMJBBXY:4:1101:8501:1314
K00153:706:H3VMJBBXY:4:1101:11180:1314
K00153:706:H3VMJBBXY:4:1101:22262:1314
K00153:706:H3VMJBBXY:4:1101:22648:1314

You may need to add substring=t. These should work.

0 answers

No answers yet.

Log in to answer this question.