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

Diff of /FigKernelPackages/NCBI_taxonomy.pm

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

revision 1.2, Sun Jan 2 22:11:17 2011 UTC revision 1.3, Sun Jan 2 23:43:13 2011 UTC
# Line 23  Line 23 
23  #      Division                   #  GenBank division (not 3-letter abbrev)  #      Division                   #  GenBank division (not 3-letter abbrev)
24  #      GeneticCode                #  Genetic code number  #      GeneticCode                #  Genetic code number
25  #      Lineage                    #  Lineage text, semicolon separated  #      Lineage                    #  Lineage text, semicolon separated
26  #      LineageShort               #  Lineage text, semicolon separated  #      LineageAbbrev              #  Lineage text, semicolon separated
27  #      LineageExIds               #  List of full lineage taxids  #      LineageExIds               #  List of full lineage taxids
28  #      LineageExNames             #  List of full lineage names  #      LineageExNames             #  List of full lineage names
29  #      MitochondrialGeneticCode   #  Mitochondrial genetic code number  #      MitochondrialGeneticCode   #  Mitochondrial genetic code number
# Line 52  Line 52 
52  #  It does not seem to be possible to get the short lineage without loading  #  It does not seem to be possible to get the short lineage without loading
53  #  the taxonmy browser page.  Oh bother.  #  the taxonmy browser page.  Oh bother.
54  #  #
55  #    $lineage = lineage_short( $taxid );  #    $lineage = lineage_abbreviated( $taxid );
56  #  #
57  #-------------------------------------------------------------------------------  #-------------------------------------------------------------------------------
58  #  Functions for doing the major steps:  #  Functions for doing the major steps:
# Line 143  Line 143 
143              my @values = taxonomy_datum( $taxon_xml, @{ $path{ $key } } );              my @values = taxonomy_datum( $taxon_xml, @{ $path{ $key } } );
144              $results{ $key } = \@values if @values;              $results{ $key } = \@values if @values;
145          }          }
146          $results{ LineageShort } = [ lineage_short( $taxid ) ];          $results{ LineageAbbrev } = [ lineage_abbreviated( $taxid ) ];
147          return \%results;          return \%results;
148      }      }
149    
# Line 152  Line 152 
152      else      else
153      {      {
154          my $key = cannonical_key( $options->{ key } );          my $key = cannonical_key( $options->{ key } );
155          if ( $key eq 'LineageShort' )          if ( $key eq 'LineageAbbrev' )
156          {          {
157              my $datum = lineage_short( $taxid );              my $datum = lineage_abbreviated( $taxid );
158              return wantarray ? ( $datum ) : [ $datum ];              return wantarray ? ( $datum ) : [ $datum ];
159          }          }
160          $path = $path{ $key };          $path = $path{ $key };
# Line 176  Line 176 
176              m/^Gen/i      ? 'GeneticCode'              :              m/^Gen/i      ? 'GeneticCode'              :
177              m/^Lin.*Id/i  ? 'LineageExIds'             :              m/^Lin.*Id/i  ? 'LineageExIds'             :
178              m/^Lin.*Nam/i ? 'LineageExNames'           :              m/^Lin.*Nam/i ? 'LineageExNames'           :
179              m/^Lin.*Sh/i  ? 'LineageShort'             :              m/^Lin.*Ab/i  ? 'LineageAbbrev'             :
180                m/^Lin.*Sh/i  ? 'LineageAbbrev'             :
181              m/^Lin/i      ? 'Lineage'                  :              m/^Lin/i      ? 'Lineage'                  :
182              m/^Mit/i      ? 'MitochondrialGeneticCode' :              m/^Mit/i      ? 'MitochondrialGeneticCode' :
183              m/^Par/i      ? 'Parent'                   :              m/^Par/i      ? 'Parent'                   :
# Line 286  Line 287 
287  #  It does not seem to be possible to get the short lineage without loading  #  It does not seem to be possible to get the short lineage without loading
288  #  the taxonmy browser page.  Oh bother.  #  the taxonmy browser page.  Oh bother.
289  #  #
290  #    $lineage = lineage_short( $taxid );  #    $lineage = lineage_abbreviated( $taxid );
291  #  #
292  #-------------------------------------------------------------------------------  #-------------------------------------------------------------------------------
293  sub lineage_short  sub lineage_abbreviated
294  {  {
295      my $curl = SeedAware::executable_for( 'curl' )      my $curl = SeedAware::executable_for( 'curl' )
296          or die "Could not find executable for 'curl'.\n";          or die "Could not find executable for 'curl'.\n";

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3