I have collected 20 sequences for a gene in 20 species in a txt file. I need to convert this file into a fasta file, so that to read it in R function to perform sequence alignment and phylogenetic. I knew that R have a function for “system.file”, whihc is for fasta files in a packages not an external one as in my case.
To generate a FASTA file, just follow the definition of a FASTA file. Basically, an uninterrupted chain of amino acids or nucleotide letters which are preceded by an identifier line that starts with “>”
>MCHU - Calmodulin - Human, rabbit, bovine, rat, and chicken
>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
More details can be found all over the internet, wikipedia is a great starting point.