[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.14, Wed Jun 15 20:04:50 2011 UTC revision 1.15, Fri Jun 24 20:46:53 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;      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 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);
209        # Compute the MD5 identifiers for the genome and its contigs.
210        my $genomeMD5Data = MD5Computer->new_from_fasta("$FIG_Config::organisms/$genomeID/contigs");
211      # Loop through them.      # Loop through them.
212      for my $feature (@$featureList) {      for my $feature (@$featureList) {
213          # Get this feature's data.          # Get this feature's data.
# Line 262  Line 264 
264                  $self->Add(badAttachment => 1);                  $self->Add(badAttachment => 1);
265              }              }
266          }          }
267            # Compute the MD5 identifier.
268            my $md5Alias = $genomeMD5Data->ComputeGeneMD5(map { $_->String() } @locs);
269          # Emit the feature record.          # Emit the feature record.
270          $self->PutE(Feature => $fid, feature_type => $type,          $self->PutE(Feature => $fid, feature_type => $type,
271                      sequence_length => $seqLen, function => $assignment,                      sequence_length => $seqLen, function => $assignment,
# Line 374  Line 378 
378                  $self->PutR(IsIdentifiedBy => $fid, $aliasID, conf => $aliasConf);                  $self->PutR(IsIdentifiedBy => $fid, $aliasID, conf => $aliasConf);
379              }              }
380          }          }
381            # Make the MD5 identifier an alias.
382            $self->PutE(Identifier => "md5g|$md5Alias", natural_form => $md5Alias,
383                        source => 'MD5');
384            $self->PutR(IsIdentifiedBy => $fid, "md5g|$md5Alias", conf => 'A');
385          # Finally, this feature is an alias of itself.          # Finally, this feature is an alias of itself.
386          $self->PutE(Identifier => $fid, natural_form => $fid,          $self->PutE(Identifier => $fid, natural_form => $fid,
387                      source => 'SEED');                      source => 'SEED');

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3