Count reads, sequences, bases and length statistics from FASTA/FASTQ files
Count Reads / Sequences
Count Reads reports the total number of reads (FASTQ) or sequences (FASTA) in one or more input files. Optional statistics include total bases, average read length, and read-length distributions.
.fastq,
.fq)
.fasta,
.fa,
.fna)
.gz)
Count reads in FASTQ:
echo $(wc -l < sample.fastq) / 4 | bc
Count reads in compressed FASTQ:
echo $(zcat sample.fastq.gz | wc -l) / 4 | bc
Count sequences in FASTA:
grep -c "^>" sample.fasta
Using SeqKit:
seqkit stats sample.fastq.gz
seqkit stats *.fastq.gz