Converting txt file into fasta file
1
0
Entering edit mode
2.5 years ago
mohsamir2016 ▴ 30

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 • 846 views
ADD COMMENT
0
Entering edit mode

post example lines and expected output.

ADD REPLY
0
Entering edit mode
2.5 years ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2753 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6