module EnsemblREST::Sequence

Public Instance Methods

id(id, options = {}) click to toggle source

Request multiple types of sequence by stable identifier.

@param [String] id An Ensembl stable ID @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/sequence_id @return [FastaFormat] requested sequence

# File lib/ensemblrest/sequence.rb, line 22
def id(id, options = {})
        return EnsemblREST.get("sequence/id/#{id}", {format: 'fasta'}.merge(options))
end
id_post(ids, options = {}) click to toggle source

Request multiple types of sequence by a stable identifier list.

@param [Array] ids Ensembl stable IDs @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/sequence_id_post @return [JSON] Requested response

# File lib/ensemblrest/sequence.rb, line 41
def id_post(ids, options = {})
        return EnsemblREST.post("sequence/id", {"ids" => ids}, {format: 'json'}.merge(options))
end
region(region, species = 'human', options = {}) click to toggle source

Returns the genomic sequence of the specified region of the given species.

@param [String] regionQuery region. A maximum of 10Mb is allowed to be requested at any one time @param [String] species Species name/alias @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/sequence_region @return [FastaFormat] requested sequence

# File lib/ensemblrest/sequence.rb, line 32
def region(region, species = 'human', options = {})
        return EnsemblREST.get("sequence/region/#{species}/#{region}", {format: 'fasta'}.merge(options))
end
region_post(regions, species = 'human', options = {}) click to toggle source

Request multiple types of sequence by a list of regions.

@param [Array] regions Query regions. A maximum of 10Mb is allowed to be requested at any one time @param [String] species Species name/alias @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/sequence_region_post @return [JSON] Requested response

# File lib/ensemblrest/sequence.rb, line 51
def region_post(regions, species = 'human', options = {})
        return EnsemblREST.post("sequence/region/#{species}", {"regions" => regions}, {format: 'json'}.merge(options))
end