The two flanking non-N bases are missing (G and T for seq_1).
$ seqkit replace -s -p "([^N]|^)N{10}([^N]|$)" -r $(printf 'Z%.0s' {1..10}) test.fasta
>seq_1
ATZZZZZZZZZZCGA
$ seqkit replace -s -p "([^N]|^)N{10}([^N]|$)" -r $(echo -e '${1}'$(printf 'Z%.0s' {1..10})'${2}') test.fasta
>seq_1
ATGZZZZZZZZZZTCGA
• 0 views
•
link
Perfect! Thank you.
Please check the comment below.