I got a problem, I explain the point.
I have one fasta file such:
>seqA
AAAAATTTGG
>seqB
ATTGGGCCG
>seqC
ATTGGCC
>seqD
ATTGGACAG
and a dataframe :
seq name New name seq
seqB BOBO
seqC JOHN
and I simpy want to change my ID seq name in the fasta file if there is the same seq name in my dataframe and change it to the new name seq, it would give:
New fasta fil:
>seqA
AAAAATTTGG
>BOBO
ATTGGGCCG
>JOHN
ATTGGCC
>seqD
ATTGGACAG
Thank you very much
Outside R :
Export your data frame out and remove the headers (let eg file be test.txt). From the above example, following would be test.txt (tab separated)
Run following command on example fasta file above:
output:
Download seqkit from here: http://bioinf.shenwei.me/seqkit/download/
Thanks for your help but is there a solution with python?