[Bio] / FigKernelPackages / gjoseqlib.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/gjoseqlib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30, Wed Aug 8 18:04:04 2012 UTC revision 1.31, Fri Dec 7 19:15:05 2012 UTC
# Line 1197  Line 1197 
1197    
1198    
1199  #-----------------------------------------------------------------------------  #-----------------------------------------------------------------------------
1200  #  Remove all alignment gaps from sequences:  #  Remove all alignment gaps from sequences. This function minimally rewrites
1201    #  sequence entries, saving memory if nothing else.
1202  #  #
1203  #   @packed_seqs = pack_sequences(  @seqs )  # Also handles single sequence  #   @packed_seqs = pack_sequences(  @seqs )  # Also handles single sequence
1204  #   @packed_seqs = pack_sequences( \@seqs )  #   @packed_seqs = pack_sequences( \@seqs )
# Line 1210  Line 1211 
1211      $_[0] && ( ref( $_[0] ) eq 'ARRAY' ) && @{$_[0]} && defined( $_[0]->[0] )      $_[0] && ( ref( $_[0] ) eq 'ARRAY' ) && @{$_[0]} && defined( $_[0]->[0] )
1212          or return ();          or return ();
1213    
1214      my @seqs = ( ref( $_[0]->[0] ) eq 'ARRAY' ) ? @{$_[0] } : @_;      my @seqs = map { $_->[2] =~ /[^A-Za-z*]/ ? [ @$_[0,1], pack_seq( $_->[2] ) ] : $_ }
1215                   ( ref( $_[0]->[0] ) eq 'ARRAY' ) ? @{$_[0] } : @_;
1216    
1217      my @seqs2 = map { [ $_->[0], $_->[1], pack_seq( $_->[2] ) ] } @seqs;      wantarray ? @seqs : \@seqs;
   
     wantarray ? @seqs2 : \@seqs2;  
1218  }  }
1219    
1220    

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3