[Bioperl-l] I don't get the plain sequence

Kevin Brown Kevin.M.Brown at asu.edu
Thu Feb 19 17:23:00 UTC 2009


Bio::AlignIO returns a Bio::Align::AlignI object from next_aln.
get_seq_by_pos returns a Bio::LocatableSeq object which has a seq method
that sets or returns the sequence of the LocatableSeq

http://bioperl.org/cgi-bin/deob_interface.cgi

So, to get the actual sequence you would do:

while (my $aln = $input->next_aln()) {
  push @nuc_seqs, $aln;
  $seq1 = $aln->get_seq_by_pos(1)->seq();
  $seq2 = $aln->get_seq_by_pos(2)->seq();
}

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org 
> [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of manni122
> Sent: Thursday, February 19, 2009 10:16 AM
> To: Bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] I don't get the plain sequence
> 
> 
> Hi, maybe I am somehow unable to display the plain sequence from a
> Bio::AlignIO object.
> I put 2 aligned sequences in an array 
>   
> while (my $aln = $input->next_aln()) {
>   push @nuc_seqs, $aln;
>   $seq1 = $aln->get_seq_by_pos(1);
>   $seq2 = $aln->get_seq_by_pos(2);
> }
> 
> How do I get to know the sequences stored in the variables. I 
> couldn't find
> a hint. Thanks for help...
> -- 
> View this message in context: 
> http://www.nabble.com/I-don%27t-get-the-plain-sequence-tp22104
> 800p22104800.html
> Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 




More information about the Bioperl-l mailing list