[Bioperl-l] nexus to fasta converter

James Wasmuth james.wasmuth at ed.ac.uk
Mon Jan 27 21:05:48 EST 2003



Look at  http://www.sander.embl-ebi.ac.uk/Services/webin/help/webin-align/align_format_help.html#nexus

Alternatively open the file in Clustalx and then resave it in nexus 
format, which should work, and let you know that the code does work...

Sorry I can't be more helpful...

J

Amit R Indap wrote:

>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