I am trying to use the seqkit replace command to replace chromosome names in the format chr_I, chr_II, ...
to I, II, ...
. I am using the following command:
seqkit replace -p "(.)" --replacement "{kv}" --kv-file keyValues.txt mySequence.fasta
My keyValues.txt
file contains the following:
chr_I I
chr_II II
...
The two columns are separated by a tabulation.
I get the following output:
[INFO] read key-value file: keyValues.txt
[INFO] 6 pairs of key-value loaded
[ERRO] pattern "(.)" matches multiple targets in "chr_I", this will cause chaos
I don't know what I am doing wrong. I chose the (.)
pattern to match the whole header but it seems to be wrong. Any help would be appreciated.
Update
All the headers are shown below:
grep '>' mySequence.fasta
>chr_I
>chr_II
>chr_III
>chr_IV
>chr_V
>chr_X
will cause chaos
). $\endgroup$