Seqfilter Seqfilter is a small tool written in C on top of the excellent [[https://github.com/attractivechaos/klib][klib]] library by Heng Li. It allows filtering of fasta and fastq files based on sequence IDs and sequence length. The fasta and fastq input files may be gzipped.
Get it!
git clone --recursive https://github.com/clwgg/seqfilter
cd seqfilter make
Negative filtering ('-n') means that all sequences without ID matches are kept (subsequently, if no ID file is supplied, all sequences are without ID matches).
seqfilter -i in.fq -l ids.txt -o out.fq
seqfilter -m 30 -i in.fq -l ids.txt -o out.fq
seqfilter -n -m 30 -i in.fq -o out.fq
seqfilter -i in.fa -l <(printf "mt\n") -o mt.fa
seqfilter -n -i in.fa -l <(printf "mt\n") -o in_no-mt.fa