Website:WormBase::API
From WormBaseWiki
Jump to navigationJump to searchNOTE: This document is likely out of date. Consult WormBase::Model.pm for the most up-to-date documentation.
The following AceDB model elements are handled generically in the reimplementation. This maximizes code reuse and makes model and template writing easier and faster.
Common elements are provided by WormBase::Model, superclass for all WormBase::Model::* classes. Should you come across any of these elements when converting a model, you can use them automatically without writing a line of code.
Usage: To use any of the common elements:
- your Model class should inherit from WormBase::Model.
- you should specify the name of the AceDB model element in lowercase in the configuration file
Element/Tag | Notes | Returns |
---|---|---|
Name | Scalar. Name of the object as text. | |
References | Array reference of Paper objects drawn from the Reference tag of an object. Got it? | |
Remark | To be grammatically correct, the accessor to Remark tags in AceDB is actually "remarks" | Array reference of remarks as text. |
Species | Species as an Ace::Object. |
Model Helpers
Element/Tag | Notes | Returns |
---|---|---|
ID2species | convert a protein ID into its corresponding species | Scalar string corresponding to the species. |
genetic_position | ||
interpolated_position | ||
best_blastp_matches |
Todo
Evidence (to be handled by View)
Phenotype
API Data Structure
Each method of each API class will return a hashref with the following generic structure:
{ description => 'a short human readable description, no more than 5000 words', data => 'a string, arrayref, or hashref, as needed and described', }
Examples
find some examples