[Bio] / Sprout / SaplingTaxonomyLoader.pm Repository:
ViewVC logotype

Diff of /Sprout/SaplingTaxonomyLoader.pm

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

revision 1.1, Wed Mar 23 18:42:34 2011 UTC revision 1.2, Thu Apr 21 19:58:18 2011 UTC
# Line 337  Line 337 
337      while (! eof $ih) {      while (! eof $ih) {
338          # Get the next name.          # Get the next name.
339          my ($taxID, $name, undef, $type) = $self->GetTaxData($ih);          my ($taxID, $name, undef, $type) = $self->GetTaxData($ih);
340          $self->Add('taxnames-in' => 1);          $stats->Add('taxnames-in' => 1);
341          # Is this a scientific name?          # Is this a scientific name?
342          if ($type =~ /scientific/i) {          if ($type =~ /scientific/i) {
343              # Yes. Save it if it is the first for this ID.              # Yes. Save it if it is the first for this ID.
# Line 346  Line 346 
346              }              }
347              # Add it to the name list.              # Add it to the name list.
348              push @{$nameLists{$taxID}}, $name;              push @{$nameLists{$taxID}}, $name;
349              $self->Add('taxnames-scientific' => 1);              $stats->Add('taxnames-scientific' => 1);
350          } elsif ($type =~ /synonym|equivalent/i) {          } elsif ($type =~ /synonym|equivalent/i) {
351              # Here it's not scientific, but it's generally useful, so we keep it.              # Here it's not scientific, but it's generally useful, so we keep it.
352              push @{$nameLists{$taxID}}, $name;              push @{$nameLists{$taxID}}, $name;
353              $self->Add('taxnames-other' => 1);              $stats->Add('taxnames-other' => 1);
354          }          }
355      }      }
356      # Now we read in the taxonomy nodes. For each node, we generate a TaxonomicGrouping      # Now we read in the taxonomy nodes. For each node, we generate a TaxonomicGrouping
# Line 401  Line 401 
401          if (! $primaryNames{$taxID}) {          if (! $primaryNames{$taxID}) {
402              if ($merges{$taxID}) {              if ($merges{$taxID}) {
403                  $taxID = $merges{$taxID};                  $taxID = $merges{$taxID};
404                  $self->Add('merged-names' => 1);                  $stats->Add('merged-names' => 1);
405                  Trace("$genomeID has alternate taxonomy ID $taxID.") if T(2);                  Trace("$genomeID has alternate taxonomy ID $taxID.") if T(2);
406              } else {              } else {
407                  $taxID = undef;                  $taxID = undef;
408                  $self->Add('missing-groups' => 1);                  $stats->Add('missing-groups' => 1);
409                  Trace("$genomeID has no taxonomy group.") if T(1);                  Trace("$genomeID has no taxonomy group.") if T(1);
410              }              }
411          }          }

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3