Skip to content

Endpoints: Overlap

Christopher Anna edited this page Aug 8, 2018 · 2 revisions

wormbase_parasite.endpoint_groups.overlap

OverlapMixin

OverlapMixin(self, /, *args, **kwargs)

A mixin with methods for accessing the Overlap section of the Wormbase ParaSite REST API

This mixin provides access to the following endpoints:

GET /overlap/id/:id
GET /overlap/region/:species/:region
GET /overlap/translation/:id

Any arguments listed with a * are required

get_overlapping_features

OverlapMixin.get_overlapping_features(self, feature, id, biotype=None, db_type=None, logic_name=None, misc_set=None, object_type=None, species=None, species_set='mammals')

GET overlap/id/:id

Arguments

  • feature* (str): The type of feature to retrieve. Must be one or more of ['gene', 'transcript', 'cds', 'exon', 'repeat', 'simple', 'misc'] Multiple values are accepted
  • id* (str): A stable ID
  • biotype (str): Default: None
  • db_type (str): Default: None
  • logic_name (str): Default: None
  • misc_set (str): Default: None
  • object_type (str): Default: None
  • species (str): Default: None
  • species_set (str): Default: 'mammals'

Example

client = wormbase_parasite.WormbaseClient()
client.get_overlapping_features('none', 'WBGene00221255')

Raises

  • Exception: If an invalid value is provided for feature

Returns

data (list): a list of dictionaries representing the data returned by the API

See also: https://parasite.wormbase.org/rest/documentation/info/overlap_id

get_overlap_by_region

OverlapMixin.get_overlap_by_region(self, feature, region, species, biotype=None, cell_type=None, db_type='core', logic_name=None, misc_set=None, object_type=None, species_set='mammals', trim_downstream=False, trim_upstream=False)

GET overlap/region/:species/:region

Arguments

  • feature* (str): The type of feature to retrieve. Must be one or more of ['gene', 'transcript', 'cds', 'exon', 'repeat', 'simple', 'misc'] Multiple values are accepted

  • region* (str): Query region. A maximum of 5MB is allowed to be requested at any one time

  • species* (str): Default: None

  • biotype (str): Default: None

  • db_type (str): Default: None

  • logic_name (str): Default: None

  • misc_set (str): Default: None

  • object_type (str): Default: None

  • species_set (str): Default: 'mammals'

Example

client = wormbase_parasite.WormbaseClient()
client.get_overlap_by_region('none', 'Bm_v4_Chr2_contig_001:13847151-13862157', 'brugia_malayi_prjna10729')

Returns

data (list): a list of dictionaries representing the data returned by the API

See also: https://parasite.wormbase.org/rest/documentation/info/overlap_region

get_features_for_translation

OverlapMixin.get_features_for_translation(self, id, db_type=None, feature='protein_feature', species=None, data_type=None)

GET overlap/translation/:id

Arguments

  • id* (str): A stable ID
  • db_type (str): Default: None
  • feature (str): The type of feature to retrieve. Must be one or more of ['protein_feature', 'residue_overlap', 'translation_exon']
  • species (str): Default: None
  • data_type (str): Default: 'none'

Example

client = wormbase_parasite.WormbaseClient()
client.get_features_for_translation('Bm4789')

Returns

data (list): a list of dictionaries representing the data returned by the API

See also: https://parasite.wormbase.org/rest/documentation/info/overlap_translation

Clone this wiki locally