How do I rename fasta headers? 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 &quot;(.)&quot; --replacement &quot;{kv}&quot; --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 &quot;(.)&quot; matches multiple targets in &quot;chr_I&quot;, 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 '&gt;' mySequence.fasta
&gt;chr_I
&gt;chr_II
&gt;chr_III
&gt;chr_IV
&gt;chr_V
&gt;chr_X
Why not use sed instead?

sed -e 's/chr_I/I/' -e 's/chr_V/V/' -e 's/chr_X/X/' mySequence.fasta &gt; mySeq.fasta


Or even simpler:

sed 's/chr_//' mySequence.fasta &gt; mySeq.fasta