[Bioperl-l] Convert Fasta to Phylip
Jason Stajich
jason.stajich at duke.edu
Sat May 28 23:09:07 EDT 2005
AlignIO does both of them.
you need to say
-interleave => 0
for phylip format as non-interleaved (although most programs will
handle both I think).
AlignIO::nexus
writes files fine for PAUP, I use it all the time.
I have to pare down seq ids so they're unique in phylip format for
PAML,PHYML,MB,PROTML.
there are a couple of options you need to apply to make MB compliant
nexus files (plus make sure there are no dashes in your seqids).
I store everything in fasta MSA format and then convert to phylip/
nexus as necessary since it is easy to manage and will let you have
long seq descriptions (I know selex/stockholm will too but fasta
comes directly out of MUSCLE too).
-jason
On May 28, 2005, at 10:10 PM, Alberto Davila wrote:
> Hi all,
>
> Talking about format conversion, I recently needed to deal with
> Phylip, Paup and PhyML (http://atgc.lirmm.fr/phyml/) and
> unfortunately it is still a pain to convert files among them.
> ClustalW can generate an output in Phylip interleave format, but
> not the non-interlevae one. Seqret (Emboss) claims to be able to
> convert between those 2 Phylip formats, but did not work to me.
> Would be there any Bioperl module to dela with that ? or plans to
> expand the SeqIO module to deal with both Phylip formats and Paup
> (nexus) ?
>
> Thanks, Alberto
>
> At 10:54 25/5/2005, you wrote:
>
>> You should send an example of the file you are trying to convert. It
>> works fine for me and you can see a test file in t/data/testaln.fasta
>>
>> -jason
>>
>> On May 25, 2005, at 5:58 AM, Ferdinand Marlétaz wrote:
>>
>>
>>> Hi,
>>>
>>> I'd like to ask something : I have a fasta file with pieces of
>>> manually controlled alignement (with - for "Gaps") and I've tried
>>> to read it with AlignIO ( just like my $in = Bio::AlignIO->new(-
>>> file => $inputfilename , '-format' => 'fasta'); ) in order to
>>> convert it to phylip formatted sequence but... it reply me MSG: Got
>>> a sequence with no letters in it cannot guess alphabet [] . So, I'd
>>> like to understand how to convert a fasta alignement containing
>>> file into a phylip file for phylogeny.
>>> Thank you very much !
>>>
>>> Cheers
>>>
>>> Ferdi
>>>
>>> _____________________________
>>> Ferdinand Marlétaz
>>> Evolution et phylogénie des métazoaires
>>> UMR 6540 DIMAR
>>> Rue Batterie des Lions
>>> 13007 MARSEILLE
>>> Tel. 04 91 04 16 54
>>> Port. 06 30 35 58 49
>>> Mail. Ferdinand.Marletaz at ens-lyon.f
>>>
>>
>> --
>> Jason Stajich
>> jason.stajich at duke.edu
>> http://www.duke.edu/~jes12/
>>
>
>
>
--
Jason Stajich
Duke University
http://www.duke.edu/~jes12/
More information about the Bioperl-l
mailing list