Count unique sequences present in FASTQ files
Unique Count
Unique Count identifies and counts distinct nucleotide sequences present in FASTQ files. It helps estimate sequence diversity and detect redundancy within sequencing datasets.
.fastq)
.fastq.gz)
Count unique sequences in a FASTQ file:
awk 'NR%4==2' input.fastq | sort -u | wc -l
For compressed FASTQ files:
zcat input.fastq.gz | awk 'NR%4==2' | sort -u | wc -l
Using SeqKit:
seqkit stats input.fastq.gz
seqkit rmdup -s input.fastq.gz \
-o unique.fastq.gz