Converting txt file into fasta file

Converting txt file into fasta file

1

Dear All,
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.

Any help ?


program


R

• 41 views

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
MADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTID
FPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREA
DIDGDGQVNYEEFVQMMTAK*

>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
IENY

More details can be found all over the internet, wikipedia is a great starting point.


Login
before adding your answer.

Traffic: 2978 users visited in the last hour

Read more here: Source link