[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.6, Thu Oct 29 18:31:48 2009 UTC revision 1.7, Wed Nov 25 21:00:45 2009 UTC
# Line 138  Line 138 
138          my ($fid, $locationString, $aliases, $type, undef, undef, $assignment,          my ($fid, $locationString, $aliases, $type, undef, undef, $assignment,
139              $assignmentMaker, $quality) = @$feature;              $assignmentMaker, $quality) = @$feature;
140          $self->Track(Features => $fid, 1000);          $self->Track(Features => $fid, 1000);
141          # Fix the assignment for non-PEG features.          # Fix missing assignments. For RNAs, the assignment may be in the alias list.
142          if (! defined $assignment) {          if (! defined $assignment) {
143                if ($type eq 'rna') {
144              $assignment = $aliases;              $assignment = $aliases;
145              $assignmentMaker ||= 'master';              $assignmentMaker ||= 'master';
146                } else {
147                    $assignment = '';
148                }
149          }          }
150          # Convert the location string to a list of location objects.          # Convert the location string to a list of location objects.
151          my @locs = map { BasicLocation->new($_) } split /\s*,\s*/, $locationString;          my @locs = map { BasicLocation->new($_) } split /\s*,\s*/, $locationString;
# Line 228  Line 232 
232          if ($type eq 'peg') {          if ($type eq 'peg') {
233              # Get the translation.              # Get the translation.
234              my $proteinSequence = $fig->get_translation($fid);              my $proteinSequence = $fig->get_translation($fid);
235                if (! $proteinSequence) {
236                    Trace("No protein sequence found for $fid.") if T(2);
237                    $self->Add(missingProtein => 1);
238                    # Here there was some sort of error and the protein sequence did
239                    # not come back. Ask for the DNA and translate it instead.
240                    my $dna = $fig->get_dna_seq($fid);
241                    $proteinSequence = FIG::translate($dna, undef, 1);
242                }
243              # Compute the ID.              # Compute the ID.
244              $proteinID = ERDB::DigestKey($proteinSequence);              $proteinID = ERDB::DigestKey($proteinSequence);
245              # Create the protein record.              # Create the protein record.

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3