Change Fasta file header for multiple sequence

Hi everyone,

I am still a beginner in R. I would like some help in terms of changing the header files of my DNA sequences all at once. I have a fastsa file with multiple DNA (COI ) sequences that I downloaded from the NCBI repository. I now want to only keep the seqeunce ID , Genus and Species name only as header files for all sequences, i.e


for all my sequnces.
Is this possible? using packages like stringr and the str_ function. If so please help would really appreciate it.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.