[Bioperl-l] nexus to fasta converter

Amit R Indap indapa at CS.Arizona.EDU
Mon Jan 27 10:45:21 EST 2003


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>



More information about the Bioperl-l mailing list