[Bio] / FigWebPages / Attributes.html Repository:
ViewVC logotype

Diff of /FigWebPages/Attributes.html

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

revision 1.4, Tue Jul 12 14:34:15 2005 UTC revision 1.5, Mon Jul 18 03:12:11 2005 UTC
# Line 6  Line 6 
6                  <h3 style="text-align: center">Contents</h3>                  <h3 style="text-align: center">Contents</h3>
7                          <li><a href="#overview">Overview</a></li>                          <li><a href="#overview">Overview</a></li>
8                          <li><a href="#definitions">Definitions</a></li>                          <li><a href="#definitions">Definitions</a></li>
9                            <li><a href="#filelocations">File Locations</a></li>
10                            <li><a href="#scripts">Scripts for working with attributes</a></li>
11                          <li><a href="#methods">Methods for accessing attributes</a></li>                          <li><a href="#methods">Methods for accessing attributes</a></li>
12                            <ul>
13                          <li><a href="#get_attributes">get_attributes</a></li>                          <li><a href="#get_attributes">get_attributes</a></li>
14                          <li><a href="#add_attribute">add_attribute</a></li>                          <li><a href="#add_attribute">add_attribute</a></li>
15                          <li><a href="#delete_attribute">delete_attribute</a></li>                          <li><a href="#delete_attribute">delete_attribute</a></li>
# Line 19  Line 22 
22                          <li><a href="#guess_value_format">guess_value_format</a></li>                          <li><a href="#guess_value_format">guess_value_format</a></li>
23                          <li><a href="#attribute_location">attribute_location</a></li>                          <li><a href="#attribute_location">attribute_location</a></li>
24                  </ul>                  </ul>
25                    </ul>
26    
27  <p>I have added attributes to the database in a more significant way. This page is to document those attributes and ways to access/modify them. The page has two sections, a non-technical section for general discussion and overview, and a technical section for behind-the-scenes type information.</p>  <p>I have added attributes to the database in a more significant way. This page is to document those attributes and ways to access/modify them. The page has two sections, a non-technical section for general discussion and overview, and a technical section for behind-the-scenes type information.</p>
28    
# Line 70  Line 74 
74                  <li><em>URL</em>. The URL is optional, and not required for any data set.                  <li><em>URL</em>. The URL is optional, and not required for any data set.
75          </ul>          </ul>
76          <br>          <br>
77          <li style="font-weight: 700">File Locations</li>          <li style="font-weight: 700"><a name="filelocations">File Locations</a></li>
78          <ul>          <ul>
79                  <li><em>General Attributes</em> Attributes are stored in the following locations:</li>                  <li><em>General Attributes</em> Attributes are stored in the following locations:</li>
80                  <ul>                  <ul>
81                          <li>$FIG_Config::organisms/xxxxx/Attributes contains the genome and organism attributes</li>                          <li>$FIG_Config::organisms/xxxxx/Attributes contains the genome and organism attributes</li>
82                          <li>$FIG_Config::organisms/xxxxx/Features/peg/Attributes contains the attributes for pegs</li>                          <li>$FIG_Config::organisms/xxxxx/Features/peg/Attributes contains the attributes for pegs</li>
83                          <li>$FIG_Config::organisms/xxxxx/Features/rna/Attributes contains the attributes for rnas... etc</li>                          <li>$FIG_Config::organisms/xxxxx/Features/rna/Attributes contains the attributes for rnas... etc</li>
84                          <li>Note that no general attributes should be stored in $FIG_Config::global (see below)</li>                          <li>Note that general attributes should not normally be stored in $FIG_Config::global (see below)</li>
85                  </ul>                  </ul>
86                    <li>All attributes files can hold comments as long as the line begins with a pound sign. Blank lines are also ignored.
87                  <br>                  <br>
88                  <li><em>Deleted Attributes</em>                  <li><em>Modified attributes</em></li>
89                  <ul>                  <ul>
90                          <li>Deleted attributes are stored in the text file $FIG_Config::global/Attributes/deleted_attributes. The only information that is stored here is the ID and the key. Note that this will currently delete all occurences of this key from this ID (hence with multiple values, all will be deleted).</li>                          <li>Modified attributes are stored in the files transaction_log</li>
91                            <li>There are separate transaction_logs in each of the locations where attributes are stored (e.g. the Features/peg/Attributes, Organism/nnnn.nn/Attributes, and Global/Attributes directories<li>
92                            <li>The transaction_log file has the following format:
93                            <ol>
94                                    <li>Method. This must be one of ADD/CHANGE/DELETE</li>
95                                    <li>Feature ID (e.g. peg, genome, or RNA number)</li>
96                                    <li>Key</li>
97                                    <li>Old value</li>
98                                    <li>Old URL</li>
99                                    <li>New value</li>
100                                    <li>New URL</li>
101                            </ol>
102                            <li>The old value, old, url, new value, and new url are optional depending on the method. For example, old value/url can be null if the method is add, and new value/new url can be null if the method is delete.</LI>
103                            <li>If the old value and old URL are ommitted and the method is delete all attributes that match key will be deleted from the feature</li>
104    
105                  </ul>                  </ul>
106                  <br>                  <br>
107                  <li><em>Metadata</em></li>                  <li><em>Metadata</em></li>
# Line 96  Line 115 
115                          </ol>                          </ol>
116                  </ul>                  </ul>
117          </ul>          </ul>
118            <li style="font-weight: 700"><a name="scripts">Scripts for working with attributes</a></li>
119            <li>Here are a few common scripts that you may want to use:
120            <ol>
121                    <li>load_attributes</li>
122                    <p>This will delete the current attributes database, look through all the potential places that attributes are stored and add those attributes into the database. Both genome-specific and global attributes will be added. Finally, each of the transaction_logs are processed and the data added back into the database. This is used to add new data to a database, and to rebuild an existing database.</p>
123                    <li>gather_attributes</li>
124                    <p>Atrributes are stored in disparate locations (global, genome, etc) and this will look through all the various locations and print out any attributes that are found. This can be piped through sort -u to remove any duplicate attributes.</p>
125                    <li>distribute_attributes</li>
126                    <p>This script will take any attributes on STDIN and write them to their appropriate locations.</p>
127                    <li>dump_attributes</li>
128                    <p>Dumps the current value of each attribute from the database, so these have all the changes in transaction_log already enacted.</p>
129            </ol>
130    
131    
132    
133  </ol>  </ol>
134    
135    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3