[Bioperl-l] Array call in Bio::AlignIO

Edward Wijaya ewijaya at singnet.com.sg
Fri Apr 15 01:19:54 EDT 2005


Hi,

Is there a way to create object "$in" from an array and in plain format instead of filehandle (DATA or FILE) in fasta format.

--
Regards,
Edward WIJAYA
SINGAPORE


__BEGIN__
#!/usr/bin/perl -w
use strict;
use Bio::AlignIO;
    
  # How can I change this method call so that instead of FH 
  # it takes data from an array, like this:
  # @array = qw /AAAAAAAAAAAAAAA AAAAAAAGGAAACCA/;

    my $in  = Bio::AlignIO->new(-fh   => \*DATA,
                                -format => 'fasta');

    while ( my $aln = $in->next_aln() ) {

     print "IDENTITY : ", $aln->percentage_identity, "\n";
     print "CONSENSUS: ", $aln->consensus_string(28), "\n";

    }

__DATA__
>Seq1
AAAAAAAAAAAAAAA
>Seq2
AAAAAAAGGAAACCA


More information about the Bioperl-l mailing list