-
Notifications
You must be signed in to change notification settings - Fork 43
LoadingOntologies
Ontologies describe the traits that can be characterized (measured, estimated, etc) in a given crop. If an appropriate ontology does not exist for the crop in question, it has to be created. This can be a long and difficult task, as it can be difficult to find a consensus, especially in larger projects.
Recommended tools for creating and editing ontologies are DAGEdit or Protege.
If a suitable ontology is available, it can be loaded into Breedbase. Currently, only loading from the backend is supported for the initial loads. The ontology needs to be available in .obo format, which both DAGEdit and Protege can produce.
The ontology consists of separate types of terms: traits, methods, scales, and variables. In Breedbase, often only the traits and variables are loaded. The traits are an abstract description of the character under consideration, whereas the variable is combination of a trait, method, and a scale. Variables are the only entities that can have associated measurements.
The loading script is in the Chado GitHub repo. Before the initial load, an entry has to be made in the cv table in the database:
breedbase# insert into cv (name, description) values ('cvname', 'cvdescription');
as well as the db table:
breedbase# insert into db (name, description) values ('dbname', 'dbdescription');
The dbname is often of the form CO_NNN for CropOntology ontologies. The dbname is used as a prefix for the numeric code of the term, such as GO:0001234 or CO_332:0063636.
The cvname has to match the cv name in the obo file.
To load the ontology, use the script gmod_load_cvterms.pl in the Chado repo at Chado/chado/bin/gmod_load_cvterms.pl:
perl gmod_load_cvterms.pl -s CO_NNN -n cvname -u -v -H breedbase_db -D breedbase -p password -r postgres -d Pg file.obo
The loaded ontology has to be indexed for certain features, such as the ontology browser, to work correctly:
perl gmod_make_cvtermpath.pl -c cvname -v -D breedbase_db -H breedbase_db -u postgres -p password
The variables can have associated limits, which will be exported to the Fieldbook app. There are two main types of variables, categorical and numeric. Numeric variables can have lower and upper limits, whereas categorical variables can specify the category names.