lh3 / seqtk

Toolkit for processing sequences in FASTA/Q formats
MIT License
1.35k stars 310 forks source link

CutN fails when sequence begins with Ns #211

Open hloucks opened 2 months ago

hloucks commented 2 months ago

Using seqtk version 1.4-r122 seqt fails to identify Ns at the beginning of the contig

Example

>test
NNNNNNNATCTA
>test2
AATTCNNNA

seqtk cutN -g -n1 test.fa
test2   5   8

seqtk gap -l 1 test.fa
test    0   7
test2   5   8

CutN identifies the stretch of Ns in the second contig but not if the first which begins with Ns. Seqtk gap works as expected.