Module: EnsemblREST::Sequence
- Defined in:
- lib/ensemblrest/sequence.rb
Class Method Summary collapse
-
.id(id, options = {}) ⇒ FastaFormat
Request multiple types of sequence by stable identifier.
-
.id_post(ids, options = {}) ⇒ JSON
Request multiple types of sequence by a stable identifier list.
-
.region(region, species = 'human', options = {}) ⇒ FastaFormat
Returns the genomic sequence of the specified region of the given species.
-
.region_post(regions, species = 'human', options = {}) ⇒ JSON
Request multiple types of sequence by a list of regions.
Class Method Details
.id(id, options = {}) ⇒ FastaFormat
Request multiple types of sequence by stable identifier.
22 23 24 |
# File 'lib/ensemblrest/sequence.rb', line 22 def id(id, = {}) return EnsemblREST.get("sequence/id/#{id}", {format: 'fasta'}.merge()) end |
.id_post(ids, options = {}) ⇒ JSON
Request multiple types of sequence by a stable identifier list.
41 42 43 |
# File 'lib/ensemblrest/sequence.rb', line 41 def id_post(ids, = {}) return EnsemblREST.post("sequence/id", {"ids" => ids}, {format: 'json'}.merge()) end |
.region(region, species = 'human', options = {}) ⇒ FastaFormat
Returns the genomic sequence of the specified region of the given species.
32 33 34 |
# File 'lib/ensemblrest/sequence.rb', line 32 def region(region, species = 'human', = {}) return EnsemblREST.get("sequence/region/#{species}/#{region}", {format: 'fasta'}.merge()) end |
.region_post(regions, species = 'human', options = {}) ⇒ JSON
Request multiple types of sequence by a list of regions.
51 52 53 |
# File 'lib/ensemblrest/sequence.rb', line 51 def region_post(regions, species = 'human', = {}) return EnsemblREST.post("sequence/region/#{species}", {"regions" => regions}, {format: 'json'}.merge()) end |