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

Diff of /Sprout/CustomAttributes.pm

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

revision 1.5, Fri Nov 10 21:20:37 2006 UTC revision 1.6, Fri Nov 10 21:59:34 2006 UTC
# Line 20  Line 20 
20    
21  The full suite of ERDB retrieval capabilities is provided. In addition,  The full suite of ERDB retrieval capabilities is provided. In addition,
22  custom methods are provided specific to this application. To get all  custom methods are provided specific to this application. To get all
23  the values of the attribute C<essential> in the B<Feature> entity, you  the values of the attribute C<essential> in a specified B<Feature>, you
24  would code  would code
25    
26      my @values = $attrDB->GetAttributeValues($fid, Feature => 'essential');      my @values = $attrDB->GetAttributes([Feature => $fid], 'essential');
27    
28  where I<$fid> contains the ID of the desired feature. Each attribute has  where I<$fid> contains the ID of the desired feature. Each attribute has
29  an alternate index to allow searching for attributes by value.  an alternate index to allow searching for attributes by value.
# Line 76  Line 76 
76    
77  =back  =back
78    
79    The DBD file is critical, and must have reasonable contents before we can
80    begin using the system. In the old system, attributes were only provided
81    for Genomes and Features, so the initial XML file was the following.
82    
83        <Database>
84          <Title>SEED Custom Attribute Database</Title>
85          <Entities>
86            <Entity name="Feature" keyType="id-string">
87              <Notes>A [i]feature[/i] is a part of the genome
88              that is of special interest. Features may be spread
89              across multiple contigs of a genome, but never across
90              more than one genome. Features can be assigned to roles
91              via spreadsheet cells, and are the targets of
92              annotation.</Notes>
93            </Entity>
94            <Entity name="Genome" keyType="name-string">
95              <Notes>A [i]genome[/i] describes a particular individual
96              organism's DNA.</Notes>
97            </Entity>
98          </Entities>
99        </Database>
100    
101    It is not necessary to put any tables into the database; however, you should
102    run
103    
104        AttrDBRefresh
105    
106    periodically to insure it has the correct Genomes and Features in it. When
107    converting from the old system, use
108    
109        AttrDBRefresh -migrate
110    
111    to initialize the database and migrate the legacy data. You should only need
112    to do that once.
113    
114  =head2 Implementation Note  =head2 Implementation Note
115    
116  The L</Refresh> method reloads the entities in the database. If new  The L</Refresh> method reloads the entities in the database. If new

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3