[Bioperl-l] nexus to fasta converter

nkuipers nkuipers at uvic.ca
Mon Jan 27 12:27:12 EST 2003


Hello,

I found a couple of links regarding NEXUS file format...sadly, one is under 
construction, but the second one may help you answer your question about 
non-standard file format:

http://phylogeny.arizona.edu/nexus/description.html
http://www.biology.usu.edu/biol6750/Lecture%207.htm

Luck,

Nathanael Kuipers

---
Center for Biomedical Research
Dept. of Biology, University of Victoria
Victoria BC, Canada

>===== Original Message From Amit R Indap <indapa at CS.Arizona.EDU> =====
>Hi,
>
>I am trying to write a nexus to fasta file converter. I was looking at
>the AlignIO documentation and went from there. My problem is that my
>program never enters the while loop. As far as I know, nexus is one
>of the formats supported by AlignIO. Could it be that I have a
>non-standard nexus file?
>
>#!/usr/bin/perl
>use Bio::AlignIO;
>$file = "APX.nex";
>$stream = Bio::AlignIO->new(-file => $file, '-format' => 'nexus');
>$out = Bio::AlignIO->new(-file => ">out.aln.fasta" , '-format' =>
>'fasta');
>
>while ( my $aln = $stream->next_aln() ) {
>    print "testing\n"; # never gets here
>    $out->write_aln($aln);
>}
>
>---------------------------
>
>Amit Indap
>indapa at cs.arizona.edu
>
>I dunno, I dream in Perl sometimes...
>                        --Larry Wall in  <8538 at jpl-devvax.JPL.NASA.GOV>
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l at bioperl.org
>http://bioperl.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list