module EnsemblRest::ComparativeGenomics
Public Class Methods
alignment_block(species, region, opts = {})
click to toggle source
Retrieves genomic alignments as separate blocks based on its location
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 6 def self.alignment_block(species, region, opts = {}) opts = EnsemblRest.parse_options opts path = EnsemblRest.build_path "/alignment/block/region/#{species}/#{region}", opts if opts['content-type'] == 'ruby' plain_opts = opts.clone plain_opts['content-type'] = 'application/json' return JSON.parse ComparativeGenomics.alignment_block species, region, plain_opts end return EnsemblRest.fetch_data path, opts, 'compara' end
alignment_slice(species, region, opts = {})
click to toggle source
Retrieves genomic alignments as a single slice based on its location
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 21 def self.alignment_slice(species, region, opts = {}) opts = EnsemblRest.parse_options opts path = EnsemblRest.build_path "/alignment/slice/region/#{species}/#{region}", opts if opts['content-type'] == 'ruby' plain_opts = opts.clone plain_opts['content-type'] = 'application/json' return JSON.parse ComparativeGenomics.alignment_slice species, region, plain_opts end return EnsemblRest.fetch_data path, opts, 'compara' end
genetree_id(id, opts = {})
click to toggle source
Retrieves Gene Tree dumps for a given Gene Tree stable identifier
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 38 def self.genetree_id(id, opts = {}) return _genetree_generic id, 'id', opts end
genetree_member_id(id, opts = {})
click to toggle source
Retrieves the Gene Tree that contains the given stable identifier
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 44 def self.genetree_member_id(id, opts = {}) return _genetree_generic id, 'member', opts end
genetree_member_symbol(species, symbol, opts = {})
click to toggle source
Retrieves a Gene Tree containing the Gene identified by the given symbol
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 66 def self.genetree_member_symbol(species, symbol, opts = {}) opts = EnsemblRest.parse_options opts path = EnsemblRest.build_path "/genetree/member/symbol/#{species}/#{symbol}", opts if opts['content-type'] == 'ruby' plain_opts = opts.clone plain_opts['content-type'] = 'text/x-phyloxml+xml' return Bio::PhyloXML::Parser.new genetree_member_symbol(species, symbol, plain_opts) end return EnsemblRest.fetch_data path, opts, 'compara' end
homology_id(id, opts = {})
click to toggle source
Retrieves homology information by ensembl gene id
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 82 def self.homology_id(id, opts = {}) opts = EnsemblRest.parse_options opts path = EnsemblRest.build_path "/homology/id/#{id}", opts if opts['content-type'] == 'ruby' plain_opts = opts.clone plain_opts['content-type'] = 'application/json' data = JSON.parse ComparativeGenomics.homology_id id, plain_opts return build_homology_class data end return EnsemblRest.fetch_data path, opts, 'compara' end
homology_symbol(species, symbol, opts = {})
click to toggle source
Retrieves homology information by symbol
# File lib/bio-ensembl-rest/comparative-genomics.rb, line 99 def self.homology_symbol(species, symbol, opts = {}) opts = EnsemblRest.parse_options opts path = EnsemblRest.build_path "/homology/symbol/#{species}/#{symbol}", opts if opts['content-type'] == 'ruby' plain_opts = opts.clone plain_opts['content-type'] = 'application/json' data = JSON.parse ComparativeGenomics.homology_symbol species, symbol, plain_opts return build_homology_class data end return EnsemblRest.fetch_data path, opts, 'compara' end