Hi all,

I have fasta sequence of some proteins and I want to convert fasta format to phylip file format to build phylogenetic tree using ggtree. I tried online EMBOSS seqret tool to convert  fasta file to phylip format but I got error when i read in ggtree.

my input sequence

    >proteinsA
    MGDSRDLCPHLDSIGEVTKEDLLLKSKGTCQSCGVTGPNLWACLQVACPYVGCGESFADH
    RTDKKPALCKSYQKLVSEVWHKKRPSYVVP
    >proteinsB
    MTGSNSHITILTLKVLPHFESLGKQEKIPNKMSAFRNHCPHLDSVGEITKEDLIQKSLGT
    SHVSFP
    >proteinsC
    MGDSRDLCPHLDSIGEVTKEDLLLKSKGTCQSCGVTGPNLWACLQVACPYVGCGESFADD
    ITTEETMEEDKSQSDVDFQSCESCSNSDRAENENGSRCFSEDNNETTMLIQDDENN

and EMBOSS seqret output is..

     3 116

    proteinsA MGDSRDLCPH LDSIGEVTKE DLLLKSKGTC QSCGVTGPNL WACLQVACPY
    proteinsB MTGSNSHITI LTLKVLPHFE SLGKQEKIPN KMSAFRNHCP HLDSVGEITK
    proteinsC MGDSRDLCPH LDSIGEVTKE DLLLKSKGTC QSCGVTGPNL WACLQVACPY
    
              VGCGESFADH RTDKKPALCK SYQKLVSEVW HKKRPSYVVP ----------
              EDLIQKSLGT SHVSFP---- ---------- ---------- ----------
              VGCGESFADD ITTEETMEED KSQSDVDFQS CESCSNSDRA ENENGSRCFS
    
              ---------- ------
              ---------- ------
              EDNNETTMLI QDDENN

But I got error in reading this phylip file...

    tree <- read.phylip("emboss_seqret_output.txt")

&nbsp;

    Error in read.phylip("emboss_seqret_output.txt") : 
      input file is not phylip tree format...

Could you please help me what is problem with my input file or can you please suggest me to some alternative ways.

Thanks a lot.
I found a nice tutorial to build Phylogenetic Trees from fasta sequence... 

http://www.cbs.dtu.dk/courses/biosys/binfintro/phylogeny.php

Step 1: Open the sequence file (fasta), select the entire file, and copy the sequences. 

Step 2 : Align the  sequences in using the mafft server at EBI with default settings as follows

Step 3: Open the TreeHugger web server. (The TreeHugger server constructs a neighbor joining tree from an aligned set of sequences). 

Step 4: Download data in Newick/Phylip format"  (treehugger_newick.nwk)

Step 5: Visualizing using ggtree

    library(ggtree)
    tree <- read.tree("treehugger_newick.nwk")
    ggtree(tree) + geom_tiplab()

