GBrowse2 REST API

From GMOD
Revision as of 21:54, 24 January 2011 by Lstein (Talk | contribs)

Jump to: navigation, search

This article describes the GBrowse2 REST API.

For the main GBrowse 2.0 HOWTO article, see: GBrowse 2.0 HOWTO.

The GBrowse2 REST API

Getting Information from the Server

You can get a list of public data sources from the GBrowse server, and interrogate each one for a list and description of the tracks it supports.

Getting a List of Sources

Invoke gbrowse with "action=list":

http://somewhere.com/gb2/gbrowse/?action=list

This will return a plain text tab-delimited document like the following:

# Name   Description                Species                   TaxID CoordinateType  BuildAuthority  BuildVersion BuildURL
elegans  C. elegans genes           Caenorhabditis elegans    6239  Chromosome      WS              180          http://www.dasregistry.org/coordsys/CS_DS109
yeast    Yeast chromosomes 1+2      Saccharomyces cerevisiae  4932  Chromosome      SGD             1            http://www.dasregistry.org/coordsys/CS_DS69
bamtest  BAM/SAM Test
homo_36  Human NCI 36i coordinates
volvox   Volvox Tutorial Database

Each row is a data source. The fields are:

Name
Data source name to use in subsequent calls to gbrowse.
Description
Human readable text describing the data source
Species (optional)
Human readable species name.
TaxID (optional)
NCBI taxon ID.
CoordinateType (optional)
Description of the type of coordinate, such as "Chromosome" or "Contig"
BuildAuthority (optional)
The group that maintains the coordinate system. See http://www.dasregistry.org/help_coordsys.jsp for a list of codes.
BuildVersion (optional)
Version of the build.
BuildURL (optional)
URL that will provide information about the build (can also be used as a unique ID for the build).

These fields are derived from GBrowse.conf and the "metadata" option in the configuration file for the data source.

Generating Static Images

To generate static images of a region in PNG, SVG or PDF format, invoke gbrowse_img:

 $HOST/gb2/gbrowse_img/SOURCE/?ARGS
SOURCE
The data source, such as


Focusing on a Region

Selecting Tracks and Subtracks

Uploading Datasets

Linking to Remote Datasets

Obtaining Metadata