I'm attempting to downsample a bam file I have to 10 Million reads using seqtk.
For example:
seqtk sample -s100 myfile.bam 10000000 > myfile_10m.bam
However, when I run this, there are 0 lines in my bam file. This doesn't seem to be correct.
I'm curious if there is another way to downsample a BAM file to 10 Million reads?
reformat.sh
from BBMap suite.Use one of the sampling options below:
Along with any of processing parameters you want:
seqtk (https://github.com/lh3/seqtk) expects FASTA or FASTQ as input.
Reduce read count as in select
a). Any 10M reads or
b).only high quality top 10M reads?