ensimpl_snps.modules.api package

Submodules

ensimpl_snps.modules.api.views module

ensimpl_snps.modules.api.views.region()

Get SNPs for a particular Ensembl version and species.

The following is a list of the valid parameters:

Param Type Description
version integer the Ensembl version number
species string the species identifier (example ‘Hs’, ‘Mm’)
region string a region like “1:10000000-10500000”
limit string max number of items to return, defaults to 100,000

If successful, a JSON response will be returned with the following elements:

Element Type Description
num_snps integer the number of snps found
snps list a list of snps, each element contains snp data
The elements in the snp data are:
  • chromosome
  • position
  • SNP identifier
  • reference allele
  • alternate allele

If an error occurs, a JSON response will be sent back with just one element called message along with a status code of 500.

Returns:The response which is a JSON response.
Return type:flask.Response
ensimpl_snps.modules.api.views.snps()

Get SNPs for a particular Ensembl version and species.

The following is a list of the valid parameters:

Param Type Description
version integer the Ensembl version number
species string the species identifier (example ‘Hs’, ‘Mm’)
ids list a list of ids to find

If successful, a JSON response will be returned with the following elements:

Element Type Description
num_snps integer the number of snps found
snps list a list of snps, each element contains snp data
num_unknown integer the number of snp ids not found
unknown list a list of the snp ids not found
The elements in the snp data are:
  • chromosome
  • position
  • SNP identifier
  • reference allele
  • alternate allele

If an error occurs, a JSON response will be sent back with just one element called message along with a status code of 500.

Returns:The response which is a JSON response.
Return type:flask.Response
ensimpl_snps.modules.api.views.support_jsonp(func)

Wraps JSONified output for JSONP requests.

ensimpl_snps.modules.api.views.versions()

Get the version and species information.

No parameters are needed.

If successful, a JSON response will be returned with a single version element containing a list of versions consisting of the following items:

Param Type Description
version integer the Ensembl version number
species string the species identifier (example ‘Hs’, ‘Mm’)
assembly string the genome assembly information
assembly_patch string the genome assembly patch number

If an error occurs, a JSON response will be sent back with just one element called message along with a status code of 500.

Returns:The response which is a JSON response.
Return type:flask.Response

Module contents