Entering edit mode
9 months ago
neha.jnu463
•
0
I have multiple fastq files like this:
TK273759_R1.fastq
TK273760_R1.fastq
TK273761_R1.fastq
TK273762_R1.fastq
TK273763_R1.fastq
I used this command to subsample 500000 reads from those files:
seqtk sample -s100 not_bear_dna/{i}_R1.fastq 500000 > subsample/{i}_R1.fastq
I get this error:
[E::stk_sample] failed to open the input file/stream.
I am not sure what I am doing wrong here, it works for a single fastq file but not for all. Here's my command when I subsample from only one fastq file:
sample -s100 not_bear_dna/TK273759_R1.fastq 500000 > subsample/TK273759_R1.fastq
I appreciate your kind help!
You have not shown us your full command - it looks like the seqtk command is part of a loop.
This is the full command I used:
If it's outside a loop,
$i
probably does not have the value you think it does. Please do not run commands blindly, understand what each part of it does.Got it now. Thank you.