[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.15, Fri Jun 24 20:46:53 2011 UTC revision 1.19, Tue Sep 13 21:07:59 2011 UTC
# Line 206  Line 206 
206      my %seqs = map { $_->[0] => $_->[2] } gjoseqlib::read_fasta("$FIG_Config::organisms/$genomeID/Features/peg/fasta");      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);
     # Compute the MD5 identifiers for the genome and its contigs.  
     my $genomeMD5Data = MD5Computer->new_from_fasta("$FIG_Config::organisms/$genomeID/contigs");  
209      # Loop through them.      # Loop through them.
210      for my $feature (@$featureList) {      for my $feature (@$featureList) {
211          # Get this feature's data.          # Get this feature's data.
# Line 264  Line 262 
262                  $self->Add(badAttachment => 1);                  $self->Add(badAttachment => 1);
263              }              }
264          }          }
         # Compute the MD5 identifier.  
         my $md5Alias = $genomeMD5Data->ComputeGeneMD5(map { $_->String() } @locs);  
265          # Emit the feature record.          # Emit the feature record.
266          $self->PutE(Feature => $fid, feature_type => $type,          $self->PutE(Feature => $fid, feature_type => $type,
267                      sequence_length => $seqLen, function => $assignment,                      sequence_length => $seqLen, function => $assignment,
# Line 378  Line 374 
374                  $self->PutR(IsIdentifiedBy => $fid, $aliasID, conf => $aliasConf);                  $self->PutR(IsIdentifiedBy => $fid, $aliasID, conf => $aliasConf);
375              }              }
376          }          }
         # Make the MD5 identifier an alias.  
         $self->PutE(Identifier => "md5g|$md5Alias", natural_form => $md5Alias,  
                     source => 'MD5');  
         $self->PutR(IsIdentifiedBy => $fid, "md5g|$md5Alias", conf => 'A');  
377          # Finally, this feature is an alias of itself.          # Finally, this feature is an alias of itself.
378          $self->PutE(Identifier => $fid, natural_form => $fid,          $self->PutE(Identifier => $fid, natural_form => $fid,
379                      source => 'SEED');                      source => 'SEED');

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3