seqtk
seqtk copied to clipboard
mutfa: Add option to allow mutating a nucleotide with the same case as the reference nucleotide
Can an option (e.g. --keepcase) being added to mutfa to allow keeping the case of the reference nucleotide for the introduced mutation?
FASTA file:
$ cat test.fa
>seq1
AAAACCCCGGGGTTTT
>seq2
aaaaccccggggtttt
File with mutations:
$ cat in.snp
seq1 2 bla T
seq1 8 bla A
seq1 15 bla a
seq2 2 bla T
seq2 8 bla A
seq2 15 bla a
Normal mutfa command:
$ seqtk mutfa test.fa in.snp
>seq1
ATAACCCAGGGGTTaT
>seq2
aTaacccAggggttat
Change reference nucleotide, but keep case (uppercase/lowercase) of reference nucleotide:
$ seqtk mutfa --keepcase test.fa in.snp
>seq1
ATAACCCAGGGGTTAT
>seq2
ataacccaggggttat