Module: Phenoscape::Taxa

Defined in:
lib/phenoscaperb/Taxa.rb

Class Method Summary collapse

Class Method Details

.annotations(entity: nil, quality: nil, in_taxon: nil, parts: false, historical_homologs: false, serial_homologs: false, limit: 20, offset: 0, total: false, verbose: nil, options: nil) ⇒ Hash

Retrieve taxa annotations

Examples:

require 'phenoscaperb'

tax = Phenoscape::Taxa
tax.annotations(entity: "http://purl.obolibrary.org/obo/UBERON_0001703", quality: "http://purl.obolibrary.org/obo/PATO_0000052", in_taxon: "http://purl.obolibrary.org/obo/VTO_0037519", parts: true, historical_homologs: false, serial_homologs: false, limit: 20, offset: 0, total: true)

Parameters:

  • verbose (Boolean) (defaults to: nil)

    Print request headers to stdout. Default: false

  • options (Hash) (defaults to: nil)

    Hash of options for configuring the request, passed on to Faraday.new

    • timeout [Fixnum] open/read timeout Integer in seconds

    • open_timeout [Fixnum] read timeout Integer in seconds

    • proxy [Hash] hash of proxy options

      • uri [String] Proxy Server URI

      • user [String] Proxy server username

      • password [String] Proxy server password

    • params_encoder [Hash] not sure what this is

    • bind [Hash] A hash with host and port values

    • boundary [String] of the boundary value

    • oauth [Hash] A hash with OAuth details

  • entity (String) (defaults to: nil)

    Anatomical class expression

  • quality (String) (defaults to: nil)

    Quality class expression

  • in_taxon (String) (defaults to: nil)

    A taxon group to limit the results

  • parts (boolean) (defaults to: false)

    whether to include phenotypes of parts of the entity. default: false

  • historical_homologs (boolean) (defaults to: false)

    whether to include historical homologs of the entity in the query. default: false

  • serial_homologs (boolean) (defaults to: false)

    whether to include serial homologs of the entity in the query. default: false

  • total (boolean) (defaults to: false)

    whether to return the total result count rather than the results. default: false

Returns:



104
105
106
107
108
109
110
111
112
# File 'lib/phenoscaperb/Taxa.rb', line 104

def self.annotations(entity: nil, quality: nil, in_taxon: nil, parts: false, historical_homologs: false,
    serial_homologs: false, limit: 20, offset: 0, total: false, verbose: nil, options: nil)

  arguments = { entity: entity, quality: quality, in_taxon: in_taxon, parts: parts, 
    historical_homologs: historical_homologs, serial_homologs: serial_homologs, 
    limit: limit, offset: offset, total: total }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("taxon/annotations", opts, verbose, options, nil).perform
end

.taxon(iri:, verbose: nil, options: nil) ⇒ Hash

Return detail info for a given taxon. Currently this is the label, extinction status, and an optional rank.

Examples:

require 'phenoscaperb'

tax = Phenoscape::Taxa
tax.taxon(iri: "http://purl.obolibrary.org/obo/VTO_0067193")

Parameters:

  • verbose (Boolean) (defaults to: nil)

    Print request headers to stdout. Default: false

  • options (Hash) (defaults to: nil)

    Hash of options for configuring the request, passed on to Faraday.new

    • timeout [Fixnum] open/read timeout Integer in seconds

    • open_timeout [Fixnum] read timeout Integer in seconds

    • proxy [Hash] hash of proxy options

      • uri [String] Proxy Server URI

      • user [String] Proxy server username

      • password [String] Proxy server password

    • params_encoder [Hash] not sure what this is

    • bind [Hash] A hash with host and port values

    • boundary [String] of the boundary value

    • oauth [Hash] A hash with OAuth details

  • iri (String)

    a taxon IRI

Returns:



30
31
32
33
34
35
# File 'lib/phenoscaperb/Taxa.rb', line 30

def self.taxon(iri:, verbose: nil, options: nil)

  arguments = { iri: iri }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("taxon", opts, verbose, options, nil).perform
end

.taxon_with_rank(rank:, in_taxon:, verbose: nil, options: nil) ⇒ Hash

Retrieve all taxa with a given taxonomic rank, within the given super-taxon. Ranks are term IRIs from the taxonomic rank ontology such as order, family, genus, species.

Examples:

require 'phenoscaperb'

tax = Phenoscape::Taxa
tax.taxon_with_rank(rank: "http://purl.obolibrary.org/obo/TAXRANK_0000003", in_taxon: "http://purl.obolibrary.org/obo/VTO_0000009")

Parameters:

  • verbose (Boolean) (defaults to: nil)

    Print request headers to stdout. Default: false

  • options (Hash) (defaults to: nil)

    Hash of options for configuring the request, passed on to Faraday.new

    • timeout [Fixnum] open/read timeout Integer in seconds

    • open_timeout [Fixnum] read timeout Integer in seconds

    • proxy [Hash] hash of proxy options

      • uri [String] Proxy Server URI

      • user [String] Proxy server username

      • password [String] Proxy server password

    • params_encoder [Hash] not sure what this is

    • bind [Hash] A hash with host and port values

    • boundary [String] of the boundary value

    • oauth [Hash] A hash with OAuth details

  • rank (String)

    a rank IRI

  • in_taxon (String)

    a taxon IRI

Returns:



50
51
52
53
54
55
# File 'lib/phenoscaperb/Taxa.rb', line 50

def self.taxon_with_rank(rank:, in_taxon:, verbose: nil, options: nil)

  arguments = { rank: rank, in_taxon: in_taxon }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("taxon/with_rank", opts, verbose, options, nil).perform
end

.with_phenotype(entity: nil, quality: nil, in_taxon: nil, parts: false, historical_homologs: false, serial_homologs: false, limit: 20, offset: 0, total: false, verbose: nil, options: nil) ⇒ Hash

Retrieve taxa with annotated phenotypes related to the given anatomical entity or quality.

Examples:

require 'phenoscaperb'

tax = Phenoscape::Taxa
tax.with_phenotype(entity: "<http://purl.obolibrary.org/obo/UBERON_0008897>", quality: "<http://purl.obolibrary.org/obo/PATO_0000052>", in_taxon: "http://purl.obolibrary.org/obo/VTO_0059975")
tax.with_phenotype(entity: "<http://purl.obolibrary.org/obo/UBERON_0008897>", quality: "<http://purl.obolibrary.org/obo/PATO_0000052>", in_taxon: "http://purl.obolibrary.org/obo/VTO_0059975", total: true)

Parameters:

  • verbose (Boolean) (defaults to: nil)

    Print request headers to stdout. Default: false

  • options (Hash) (defaults to: nil)

    Hash of options for configuring the request, passed on to Faraday.new

    • timeout [Fixnum] open/read timeout Integer in seconds

    • open_timeout [Fixnum] read timeout Integer in seconds

    • proxy [Hash] hash of proxy options

      • uri [String] Proxy Server URI

      • user [String] Proxy server username

      • password [String] Proxy server password

    • params_encoder [Hash] not sure what this is

    • bind [Hash] A hash with host and port values

    • boundary [String] of the boundary value

    • oauth [Hash] A hash with OAuth details

  • entity (String) (defaults to: nil)

    Anatomical class expression in OWL Manchester syntax

  • quality (String) (defaults to: nil)

    Quality class expression in OWL Manchester syntax

  • in_taxon (String) (defaults to: nil)

    A taxon group to limit the results

  • parts (boolean) (defaults to: false)

    whether to include phenotypes of parts of the entity. default: false

  • historical_homologs (boolean) (defaults to: false)

    whether to include historical homologs of the entity in the query. default: false

  • serial_homologs (boolean) (defaults to: false)

    whether to include serial homologs of the entity in the query. default: false

  • total (boolean) (defaults to: false)

    whether to return the total result count rather than the results. default: false

Returns:



76
77
78
79
80
81
82
83
84
# File 'lib/phenoscaperb/Taxa.rb', line 76

def self.with_phenotype(entity: nil, quality: nil, in_taxon: nil, parts: false, historical_homologs: false,
    serial_homologs: false, limit: 20, offset: 0, total: false, verbose: nil, options: nil)

  arguments = { entity: entity, quality: quality, in_taxon: in_taxon, parts: parts, 
    historical_homologs: historical_homologs, serial_homologs: serial_homologs, 
    limit: limit, offset: offset, total: total }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("taxon/with_phenotype", opts, verbose, options, nil).perform
end