[Bioperl-guts-l] bioperl commit

Heikki Lehvaslaiho heikki at pub.open-bio.org
Fri Jan 30 13:18:34 EST 2004


heikki
Fri Jan 30 13:18:33 EST 2004
Update of /home/repository/bioperl/bioperl-live/Bio
In directory pub.open-bio.org:/tmp/cvs-serv7181/Bio

Modified Files:
	SimpleAlign.pm 
Log Message:
started adding sequence alignments that store sequences in a file. coding by Albert Vilella

bioperl-live/Bio SimpleAlign.pm,1.76,1.77
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/SimpleAlign.pm,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- /home/repository/bioperl/bioperl-live/Bio/SimpleAlign.pm	2003/11/14 08:15:12	1.76
+++ /home/repository/bioperl/bioperl-live/Bio/SimpleAlign.pm	2004/01/30 18:18:33	1.77
@@ -1431,9 +1431,11 @@
 
 sub symbol_chars{
    my ($self,$includeextra) = @_;
-   if( ! defined $self->{'_symbols'} ) {
-       $self->warn("Symbol list was not initialized");
-       return ();
+
+   unless ($self->{'_symbols'}) { 
+       foreach my $seq ($self->each_seq) { 
+           map { $self->{'_symbols'}->{$_} = 1; } split(//,$seq->seq);
+       }
    }
    my %copy = %{$self->{'_symbols'}};
    if( ! $includeextra ) {
@@ -1717,7 +1719,11 @@
     my ($temp,$len);
 
     foreach $seq ( $self->each_seq() ) {
-	$temp = CORE::length($seq->seq());
+        if ($self->isa("Bio::Seq::LargeSeqI")) {
+            $temp = $seq->length();
+        } else {
+            $temp = CORE::length($seq->seq());
+        }
 	if( $temp > $length ) {
 	    $length = $temp;
 	}



More information about the Bioperl-guts-l mailing list