Module: EnsemblREST::Overlap

Defined in:
lib/ensemblrest/overlap.rb

Class Method Summary collapse

Class Method Details

.id(id, features = [], options = {}) ⇒ JSON

Retrieves features (e.g. genes, transcripts, variations etc.) that overlap a region defined by the given identifier.

structural_variation, somatic_structural_variation, constrained, regulatory, segmentation, motif, chipseq, array_probe

Parameters:

  • id (String)

    An Ensembl stable ID

  • features (Array) (defaults to: [])

    The type of feature to retrieve. Multiple values are accepted. Array of gene, transcript, cds, exon, repeat, simple, misc, variation, somatic_variation,

  • options (Hash) (defaults to: {})

    Optional arguments for the service please goto rest.ensembl.org/documentation/info/overlap_id

Returns:

  • (JSON)

    Requested response



34
35
36
# File 'lib/ensemblrest/overlap.rb', line 34

def id(id, features = [], options = {})
	return EnsemblREST.get("overlap/id/#{id}", {format: 'json', feature: features}.merge(options))
end

.region(region, features = [], species = 'human', options = {}) ⇒ JSON

Request multiple types of sequence by a list of regions.

structural_variation, somatic_structural_variation, constrained, regulatory, segmentation, motif, chipseq, array_probe

Parameters:

  • region (Array)

    Query regions. A maximum of 10Mb is allowed to be requested at any one time

  • features (Array) (defaults to: [])

    The type of feature to retrieve. Multiple values are accepted. Array of gene, transcript, cds, exon, repeat, simple, misc, variation, somatic_variation,

  • species (String) (defaults to: 'human')

    Species name/alias

  • options (Hash) (defaults to: {})

    Optional arguments for the service please goto rest.ensembl.org/documentation/info/overlap_region

Returns:

  • (JSON)

    Requested response



23
24
25
# File 'lib/ensemblrest/overlap.rb', line 23

def region(region, features = [], species = 'human', options = {})
	return EnsemblREST.get("overlap/region/#{species}/#{region}", {format: 'json', feature: features}.merge(options))
end

.translation(id, options = {}) ⇒ JSON

Retrieve features related to a specific Translation as described by its stable ID (e.g. domains, variations).

Parameters:

Returns:

  • (JSON)

    Requested response



43
44
45
# File 'lib/ensemblrest/overlap.rb', line 43

def translation(id, options = {})
	return EnsemblREST.get("overlap/translation/#{id}", {format: 'json'}.merge(options))
end