[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.21, Fri Sep 17 20:04:05 2010 UTC revision 1.22, Fri Sep 17 20:18:15 2010 UTC
# Line 2471  Line 2471 
2471      #  Remove shared gaps      #  Remove shared gaps
2472    
2473      my $mask1 = gap_mask( $seq1 );      my $mask1 = gap_mask( $seq1 );
2474      my $mask2 = gap_mask->( $seq2 );      my $mask2 = gap_mask( $seq2 );
2475      my $mask  = $mask1 | $mask2;      my $mask  = $mask1 | $mask2;
2476      $seq1    &=  $mask;          # Apply mask to sequence      $seq1     = $seq1 & $mask;          # Apply mask to sequence
2477      $seq1     =~ tr/\000//d;     # Delete null characters      $seq1     =~ tr/\000//d;     # Delete null characters
2478      $seq2    &=  $mask;          # Apply mask to sequence      $seq2     = $seq2 & $mask;          # Apply mask to sequence
2479      $seq2     =~ tr/\000//d;     # Delete null characters      $seq2     =~ tr/\000//d;     # Delete null characters
   
2480      #  Remove terminal gaps      #  Remove terminal gaps
2481    
2482      $mask  = $mask1 & $mask2;      $mask  = $mask1 & $mask2;
# Line 2497  Line 2496 
2496      # Runs with one or more identities      # Runs with one or more identities
2497    
2498      my %cnt;      my %cnt;
2499      foreach ( $xor =~ m/(\000+)/ ) { $cnt{ length }++ }      foreach ( $xor =~ m/(\000+)/g ) { $cnt{ length($_) }++ }
2500    print Dumper( \%cnt );
2501      map { my $n = $_;      map { my $n = $_;
2502            my $ttl = 0;            my $ttl = 0;
2503            for ( grep { $_ >= $n } keys %cnt ) { $ttl += $cnt{$_} * ( $_ - ($n-1) ) }            for ( grep { $_ >= $n } keys %cnt ) { $ttl += $cnt{$_} * ( $_ - ($n-1) ) }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3