On This Page:
See Also:
8.C.1. Introduction:
Genboree resource state is communicated via representations which are text-based formats describing the data. By default, representations are expressed as JSON data structures. JSON is a straight-forward, cheap to generate and parse, non-verbose syntax that is excellent for communicating simple data structures. Furthermore, its syntax is similar to that of many modern programming languages and should look familiar to most developers. Also, as valid Javascript code, it is suitable for Ajax use. Individual resources are typically expressed as JSON hashes (a.k.a. JSON objects), whose keys/properties are named fields appropriate for the specific resource. Collections of resources are expressed as JSON arrays (lists) of individual resources. Support for other syntaxes is also present, to some degree. YAML, for example, which has many of the aforementioned advantages, is fully supported by the API and can be used instead of JSON. XML equivalent syntax is less robust and more verbose, but is supported for resource retrieval. Finally, some resources can be or must be expressed as enhanced LFF, the native Genboree format for genome annotations and entrypoints. Requesting a non-default syntax is done via the optional format parameter. Currently, this help document will focus on the more important issue of the resource data structures, using the default syntax (JSON).
8.C.2 Resource Representation Table
The table below indicates the representations for currently exposed resources. New resources will be added over time; if you wish to request a particular syntax or data structure representation for resources of interest, please contact us.
The representation types in the table encode both a data structure and the supported syntaxes. These types will
be encountered in the reference links (in the refs key) to indicate the type of link,
and in node names for XML.
e.g. 'TxtList_JSON.YAML.XML' The representation types are clickable links to a detailed description in the next section.
8.C.3. Resource Representations
Most Genboree resources have data structure-based representations that can be formated using JSON syntax, YAML syntax, and in some cases XML syntax. A minority have specific formats that are more appropriate, such as LFF for annotations and FASTA for DNA sequence. The current representations listed below are expressed in the default JSON syntax.
8.C.3.1 Common Envelope:
All data structure representations are wrapped in a simple envelope that provides status information under the status key and the data structure itself under the data key. { "data" => <jsonRepresentation>, # One of the data strcutures below "status" => { "statusCode" => "<value>", # Status code as -text-. "msg" => "<value>" # Status msg. Useful if something went wrong. } }
8.C.3.2 Data Representations:
These data structures correspond to specific representations referred to in the table above. The data structure goes in place of the jsonRepresentation place-holder in the Common Envelope above.
Count: ( repType » Count_JSON.YAML.XML ) { "count" : <value> # The count (an integer) }
Text: ( repType » Txt_JSON.YAML.XML ) { "text" : "<value>", # The text value. "refs" : # Link(s) to more info, if available, keyed by repType. { "<repType>" : "<coreURI>" } }
Text List: ( repType » TxtList_JSON.YAML.XML ) [ # List of Txt objects. { "text" : "<value>", # The text value "refs" : # Link(s) to more info, if available, keyed by repType. { "<repType>" : "<coreURI>" } }, ... ]
Ref: ( repType » Ref_JSON.YAML.XML ) { "url" : <value> # The reference URL to an API resource }
Unlocked Ref List: ( repType » UnlockedRefList_JSON.YAML.XML ) [ # List of Txt objects. { "url" : <value> # The reference URL to an API resource "key" : <value> # The unlock key for the API resource }, ... ]
User [Detailed]: ( repType » UsrDetailed_JSON.YAML.XML ) { "login" : "<login>", "firstName" : "<firstName>", "lastName" : "<lastName>", "institution" : "<institution>", "telephone" : "<telephone>", "email" : "<email>", "refs" : { } }
User [Detailed] List: ( repType » UsrDetailedList_JSON.YAML.XML ) [ { "login" : "<login>", "firstName" : "<firstName>", "lastName" : "<lastName>", "institution" : "<institution>", "telephone" : "<telephone>", "email" : "<email>", "refs" : { } }, ... ]
User [Partial]: ( repType » UsrPartial_JSON.YAML.XML ) { "login" : "<login>", "firstName" : "<firstName>", "lastName" : "<lastName>", "institution" : "<institution>", "email" : "<email>", "refs" : { } }
User [Partial] List: ( repType » UsrPartialList_JSON.YAML.XML ) [ { "login" : "<login>", "firstName" : "<firstName>", "lastName" : "<lastName>", "institution" : "<institution>", "email" : "<email>", "refs" : { } }, ... ]
Group [Detailed]: ( repType » GrpDetailed_JSON.YAML.XML ) { "name" : "<groupName>", "description" : "<description>", "refs" : { } }
Group [Detailed] List: ( repType » GrpDetailedList_JSON.YAML.XML ) [ { "name" : "<groupName>", "description" : "<description>", "refs" : { } }, ... ]
Role: ( repType » Role_JSON.YAML.XML ) { "role" : "<roleName>", # Must be: subscriber, author or administrator "permissionBits" : "<value>", # currently unimplemented "refs" : { } }
Database [Detailed]: ( repType » DbDetailed_JSON.YAML.XML ) { "name" : "<databaseName>", "refSeqId" : "<refSeqId>", # refSeqId is a unique id. For use in composing browser URLs, etc. "species" : "<species>", "version" : "<version>", "description" : "<description>", "entrypoints" : { "count" : "<value>", # Count of ALL the entrypoints "entrypoints" : # List of EpDetailed objects. [ # - can be a -partial- list if there are lots (>100) { "name" : "<value>", "length" : "<value>" , "refs" : # Link(s) to more info, if available, keyed by repType. { "EpDetailed_JSON.YAML.XML" : "<coreURI>" # Link to the entrypoint resource itself. } }, ... ] }, "refs" : { } }
Entrypoint/Chromosome [Detailed]: ( repType » EpDetailed_JSON.YAML.XML ) { "name" : "<value>", "length" : "<value>" , "refs" : { } }
Entrypoint/Chromosome [Detailed] List: ( repType » DbDetailedList_JSON.YAML.XML ) { "count" : "<value>", # Count of ALL the entrypoints "entrypoints" : # List of EpDetailed objects. [ # - can be a -partial- list if there are lots (>100) { "name" : "<value>", "length" : "<value>" , "refs" : # Link(s) to more info, if available, keyed by repType. { "EpDetailed_JSON.YAML.XML" : "<coreURI>" # Link to the entrypoint resource itself. } ... ] }
Track [Detailed]: ( repType » TrkDetailed_JSON.YAML.XML ) { "name" : "<typeA>:<subtypeB>", "description" : "<value>", "url" : "<value>", "urlLabel" : "<value>", "annoAttributes" : # List of attribute names associated with track (if any) [ # . list of Txt objects { "text" : "<value>", "refs" : { } }, ... ], "refs" : { } }
Track [Detailed] List: ( repType » TrkDetailedList_JSON.YAML.XML ) [ { "name" : "<typeA>":"<subtypeB>", "description" : "<value>", "url" : "<value>", "urlLabel" : "<value>", "classes" : # List of classes (categories) associated with track (if any) [ # . list of Txt objects { "text" : "<value>", "refs" : { } }, ... ], "annoAttributes" : # List of attribute names associated with track (if any) [ # . list of Txt objects { "text" : "<value>" "refs" : { } }, ... ], "refs" : { "TrkDetailed_JSON.YAML.XML" : "<coreURI>" # Link to the track resource itself. } }, ... ]
Track Link: ( repType » TrkLink_JSON.YAML.XML ) { "url" : "<value>", "linkText" : "<value>", "refs" : { } }
Track Link List: ( repType » TrkLinkList_JSON.YAML.XML ) [ { "url" : "<value>", "linkText" : "<value>", "refs" : { } }, ... ]
Attribute Display: ( repType » AttrDisplay_JSON.YAML.XML ) { "color" : "<value>", "rank" : "<value>", "flags" : "<value>", "refs" : { } }
Track Attribute [Detailed]: ( repType » TrkAttrDetailed_JSON.YAML.XML ) { "name" : "<value>", "value" : "<value>", "display" : { "color" : "<value>", "rank" : "<value>", "flags" : "<value>", "refs" : { } } "defaultDisplay" : { "color" : "<value>", "rank" : "<value>", "flags" : "<value>", "refs" : { } } "refs" : { } }
Track Attribute [Detailed] List: ( repType » TrkAttrDetailedList_JSON.YAML.XML ) [ { "name" : "<value>", "value" : "<value>", "display" : { "color" : "<value>", "rank" : "<value>", "flags" : "<value>", "refs" : { } } "defaultDisplay" : { "color" : "<value>", "rank" : "<value>", "flags" : "<value>", "refs" : { } } "refs" : { } }, ... ]
Project News List: ( repType » PrjNewsList_JSON.YAML.XML ) [ # List of ALL PrjNews items { # . items not individually exposed (yet) "date" : "<date>", # -> format: YYYY/MM/DD only (same day items sorted by texts) "updateText" : "<value>", # -> could prefix with A,B,C or 1,2,3 to order same day items "refs" : { } }, ... ]
Project Link List: ( repType » PrjLinkList_JSON.YAML.XML ) [ # List of ALL PrjLink items { # . items not individually exposed (yet) "url" : "<url>", "linkDesc" : "<value>", "linkText" : "<value>", "refs" : { } }, ... ]
Project Quick Links List: ( repType » PrjQLinkList_JSON.YAML.XML ) [ # List of ALL PrjQLink items { # . items not individually exposed (yet) "url" : "<url>", "linkText" : "<value>", "refs" : { } }, ... ]
User [Detailed]: ( repType » UsrDetailed_JSON.YAML.XML ) { "login" : "<value>", "firstName" : "<value>", "lastName" : "<value>", "institution" : "<value>", "telephone" : "<value>", "email" : "<value>", "refs" : { } }
Tabular Layout: ( repType » Layout.YAML.XML ) { "name" : "<value>", # The name of this layout. "description" : "<value>", # The description of this layout. "userId" : "<value>", # The ID of the user who created this layout. "created" : "<date>", # The date on which this layout was created. "modified" : "<datetime>", # The date / time this layout was last modified. "columns" : "<value>", # A CSV list of the attributes in the order they are displayed. # The attribute names are prepended with either an 'l' or an 'a' # depending on their type. 'l' = LFF standard attribute, # 'a' = user-defined attribute. "sort" : "<value>", # A CSV list of the attributes used in the sort order, encoded # the same as the "columns" field "groupMode" : "<value>", # Either "terse", "verbose", or an empty string for ungrouped mode. "refs" : # Link(s) to more info, if available, keyed by repType. { "<repType>" : "<coreURI>" } }
Tabular Layout List: ( repType » LayoutList_JSON.YAML.XML ) [ # List of Layout objects. Layout, ... ]
LFF Annotations List: ( repType » AnnoList_LFF.LAYOUT )
This corresponds to the [ annotations ] section
in the DAS LFF format specification. See the detailed description of Genboree's enhanced LFF format for annotations, or
the a user defined Tabular Layout (format=layout). Tabular Layouts are stored in the
user databases or can be specified using HTTP request payloads.
LFF Entrypoint/Chromosome List: ( repType » LffEpList ) # EntrypointName EntrypointType EntrypointLength
chr1 Chromosome 247249719
chr2 Chromosome 242951149
chr20 Chromosome 62435964
FASTA: ( repType » FASTA ) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||