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

Diff of /Sprout/FeatureSaplingLoader.pm

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

revision 1.12, Sun Feb 13 13:02:30 2011 UTC revision 1.19, Tue Sep 13 21:07:59 2011 UTC
# Line 27  Line 27 
27      use HyperLink;      use HyperLink;
28      use AliasAnalysis;      use AliasAnalysis;
29      use LoaderUtils;      use LoaderUtils;
     use Digest::MD5;  
30      use SeedUtils;      use SeedUtils;
31        use gjoseqlib;
32        use MD5Computer;
33      use base 'BaseSaplingLoader';      use base 'BaseSaplingLoader';
34    
35  =head1 Sapling Feature Load Group Class  =head1 Sapling Feature Load Group Class
# Line 201  Line 202 
202          $self->Add(missingAliasFile => 1);          $self->Add(missingAliasFile => 1);
203          $aliasHash = {};          $aliasHash = {};
204      }      }
205        # Get all of this genome's protein sequences.
206        my %seqs = map { $_->[0] => $_->[2] } gjoseqlib::read_fasta("$FIG_Config::organisms/$genomeID/Features/peg/fasta");
207      # Get all of this genome's features.      # Get all of this genome's features.
208      my $featureList = $fig->all_features_detailed_fast($genomeID);      my $featureList = $fig->all_features_detailed_fast($genomeID);
209      # Loop through them.      # Loop through them.
# Line 324  Line 327 
327          my $proteinID;          my $proteinID;
328          if ($type eq 'peg') {          if ($type eq 'peg') {
329              # Get the translation.              # Get the translation.
330              my $proteinSequence = $fig->get_translation($fid);              my $proteinSequence = $seqs{$fid};
331              if (! $proteinSequence) {              if (! $proteinSequence) {
332                  Trace("No protein sequence found for $fid.") if T(2);                  Trace("No protein sequence found for $fid.") if T(ERDBLoadGroup => 2);
333                  $self->Add(missingProtein => 1);                  $self->Add(missingProtein => 1);
334                  # Here there was some sort of error and the protein sequence did                  # Here there was some sort of error and the protein sequence did
335                  # not come back. Ask for the DNA and translate it instead.                  # not come back. Ask for the DNA and translate it instead.
# Line 351  Line 354 
354          for my $aliasTuple (@$aliasList) {          for my $aliasTuple (@$aliasList) {
355              my ($aliasID, $aliasType, $aliasConf) = @$aliasTuple;              my ($aliasID, $aliasType, $aliasConf) = @$aliasTuple;
356              # Get the natural form. If there is none, then the canonical              # Get the natural form. If there is none, then the canonical
357              # form IS the natural form.              # form IS the natural form. Note we have to make a special check
358              my $natural = AliasAnalysis::Type($aliasType => $aliasID) || $aliasID;              # for locus tags, which have an insane number of variants.
359                my $natural;
360                if ($aliasID =~ /LocusTag:(.+)/) {
361                    $natural = $1;
362                } else {
363                    $natural = AliasAnalysis::Type($aliasType => $aliasID) || $aliasID;
364                }
365              # Create the identifier record.              # Create the identifier record.
366              $self->PutE(Identifier => $aliasID, natural_form => $natural,              $self->PutE(Identifier => $aliasID, natural_form => $natural,
367                          source => $aliasType);                          source => $aliasType);

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.19

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3