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

Diff of /Sprout/SHDrugSearch.pm

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

revision 1.1, Wed Nov 8 23:18:54 2006 UTC revision 1.2, Fri Nov 10 22:00:19 2006 UTC
# Line 35  Line 35 
35    
36  =back  =back
37    
38    =cut
39    
40    # Table of drug topic category codes.
41    my %CodeTable = (
42                     'ES'   => 'essential',
43                     'ES-X' => 'essential, determined by experiment',
44                     'ES-L' => 'essential, from the literature',
45                     'KA-T' => 'known Antibiotic target',
46                     'KA-I' => 'known Antibiotic Inhibitor',
47                     'VA'   => 'virulence associated',
48                     'VA-K' => 'known virulence associated',
49                     'VA-P' => 'putative virulence assocated'
50                    );
51    
52  =head2 Virtual Methods  =head2 Virtual Methods
53    
54  =head3 Form  =head3 Form
# Line 100  Line 114 
114          # Initialize the result counter.          # Initialize the result counter.
115          $retVal = 0;          $retVal = 0;
116          # Get a query that will return the features for the project.          # Get a query that will return the features for the project.
117          my $query= $sprout->Get(['ContainsTopic', 'ContainsAnalysisOf', 'PDB',          my $query= $sprout->Get(['ContainsTopic', 'DrugTopic', 'ContainsAnalysisOf', 'PDB',
118                                   'DescribesProteinForFeature', 'Feature'],                                   'DescribesProteinForFeature', 'Feature'],
119                                  "ContainsTopic(from-link) = ?", [$project]);                                  "ContainsTopic(from-link) = ?", [$project]);
120          # Create a feature data object to manage our results.          # Create a feature data object to manage our results.
# Line 117  Line 131 
131                                        title => "display this protein's page in the Protein Data Bank",                                        title => "display this protein's page in the Protein Data Bank",
132                                        alt =>  "display this protein's page in the Protein Data Bank",                                        alt =>  "display this protein's page in the Protein Data Bank",
133                                        target => "_blank"}, $pdbID);                                        target => "_blank"}, $pdbID);
134                  # Get the PDB title.                  # Get the topic category. This explains why the PDB is interesting.
135                  my ($pdbTitle) = $record->Value('PDB(title)');                  my ($categoryCode) = $record->Value('DrugTopic(category)');
136                    my $category = $CodeTable{$categoryCode};
137                  # Store this feature in the data object.                  # Store this feature in the data object.
138                  $fd->Store($record);                  $fd->Store($record);
139                  # Add the PDB columns.                  # Add the PDB columns.
140                  $fd->AddExtraColumns('Free PDB' => $pdbInfo, 'Title' => $pdbTitle);                  $fd->AddExtraColumns('Free PDB' => $pdbInfo, 'Reason' => $category);
141                  # Put it in the results list.                  # Put it in the results list.
142                  $self->PutFeature($fd);                  $self->PutFeature($fd);
143                  $retVal++;                  $retVal++;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3