seqtk icon indicating copy to clipboard operation
seqtk copied to clipboard

mutfa: Add option to allow mutating a nucleotide with the same case as the reference nucleotide

Open ghuls opened this issue 12 years ago • 0 comments

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

ghuls avatar Dec 20 '13 13:12 ghuls