-
Notifications
You must be signed in to change notification settings - Fork 0
wormOA.pm dumper overview
Karen Yook edited this page Jun 6, 2013
·
1 revision
(tazendra or mangolassi) ~postgres/public_html/cgi-bin/oa/wormOA.pm
use &initWormFields to load a specific OA, each of them has a 3 letter code that corresponds to the postgres table name. For example 'mop' is for the molecule oa and the 'mop_' tables in postgres
mop calls &initWormMopFields currently around line 1200
mop hash set :
$fields{mop}{id}{type} = 'text'; $fields{mop}{id}{label} = 'pgid'; $fields{mop}{id}{tab} = 'all'; $fields{mop}{paper}{type} = 'multiontology'; $fields{mop}{paper}{label} = 'WBPaper'; $fields{mop}{paper}{tab} = 'all'; $fields{mop}{paper}{ontology_type} = 'WBPaper'; $fields{mop}{name}{type} = 'text'; $fields{mop}{name}{label} = 'Name'; $fields{mop}{name}{tab} = 'all';
most correspond to a postgres table (except mop {id}s), which refer to the pgid. So in the example above, there are 2 postgres tables, mop_paper and mop_name
- {type} is the type of data the table holds text/bigtext/ontology/dropdown/toggle/multiontology/multidropdown
- {label} is the field name in the OA
- {tab} is which tab number it should show in. 'all' shows up in all tabs, used in OAs with no numbered tabs
- {ontology_type} refers to the type of ontology/multiontology values used for autocomplete and validation.
- {ontology_table} is used if the ontology_type is 'obo', and the value refers to the obo_table that is updated via cronjob or populated just once. e.g.
$fields{mop}{chebi}{type} = 'ontology'; $fields{mop}{chebi}{label} = 'ChEBI_ID'; $fields{mop}{chebi}{tab} = 'all'; $fields{mop}{chebi}{ontology_type} = 'obo'; $fields{mop}{chebi}{ontology_table} = 'chebi';
in this case
$fields{mop}{chebi}{ontology_type} = 'obo'; $fields{mop}{chebi}{ontology_table} = 'chebi'; maps to obo_<name|data|syn>_chebi
if the {type} is dropdown, there's a {dropdown_type} which refers to the type of data like the {ontology_type}, but the values are hardcoded further down in the code instead of stored in postgres for querying.