[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.34, Mon Dec 16 20:33:03 2013 UTC revision 1.35, Tue Aug 12 20:19:44 2014 UTC
# Line 186  Line 186 
186  #  #
187  #  @sims = oligomer_similarity( $seq1, $seq2, \%opts )  #  @sims = oligomer_similarity( $seq1, $seq2, \%opts )
188  #  #
189    #  Verify the structure of an [ id, desc, sequence ] triple and
190    #  the structure of an array of sequence triples:
191    #
192    #  $bool = is_sequence_triple( $triple )
193    #  $bool = is_array_of_sequence_triples( \@triples )
194    #
195  #===============================================================================  #===============================================================================
196    
197  use strict;  use strict;
# Line 2648  Line 2654 
2654  }  }
2655    
2656    
2657    #-------------------------------------------------------------------------------
2658    #  Verify the structure of an [ id, desc, sequence ] triple and
2659    #  the structure of an array of sequence triples
2660    #
2661    #     $bool = is_sequence_triple( $triple )
2662    #     $bool = is_array_of_sequence_triples( \@triples )
2663    #
2664    #-------------------------------------------------------------------------------
2665    sub is_sequence_triple
2666    {
2667        $_[0] && ref( $_[0] eq 'ARRAY' ) && ( @$_[0] == 3 ) && defined( $_[0]->[0] ) && defined( $_[0]->[2] );
2668    }
2669    
2670    sub is_array_of_sequence_triples
2671    {
2672        $_[0] && ref( $_[0] eq 'ARRAY' ) && @{ $_[0] } == grep { is_sequence_triple( $_ ) } @{ $_[0] };
2673    }
2674    
2675  1;  1;

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3