module Phenoscape::Terms

Public Class Methods

all_ancestors(iri:, verbose: nil, options: nil) click to toggle source

Return all ancestor superclasses of a given term

@!macro phenoscape_params @!macro phenoscape_options @param iri [String] one or more taxon IRIs @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.all_ancestors(iri: "http://purl.obolibrary.org/obo/UBERON_0011618")
# File lib/phenoscaperb/Terms.rb, line 150
def self.all_ancestors(iri:, verbose: nil, options: nil)

  arguments = { iri: iri }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/all_ancestors", opts, verbose, options, nil).perform
end
all_descendants(iri:, verbose: nil, options: nil) click to toggle source

Return all descendant subclasses of a given term

@!macro phenoscape_params @!macro phenoscape_options @param iri [String] one or more taxon IRIs @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.all_descendants(iri: "http://purl.obolibrary.org/obo/UBERON_0011618")
# File lib/phenoscaperb/Terms.rb, line 169
def self.all_descendants(iri:, verbose: nil, options: nil)

  arguments = { iri: iri }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/all_descendants", opts, verbose, options, nil).perform
end
classification(iri:, verbose: nil, options: nil) click to toggle source

Return direct superclasses, direct subclasses, and equivalent classes of a given term

@!macro phenoscape_params @!macro phenoscape_options @param iri [String] one or more taxon IRIs @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.classification(iri: "http://purl.obolibrary.org/obo/UBERON_0011618")
# File lib/phenoscaperb/Terms.rb, line 131
def self.classification(iri:, verbose: nil, options: nil)

  arguments = { iri: iri }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/classification", opts, verbose, options, nil).perform
end
label(iri:, verbose: nil, options: nil) click to toggle source

Retrieve a label for a given term IRI.

@!macro phenoscape_params @!macro phenoscape_options @param iri [String] a taxon IRI @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.label(iri: "http://purl.obolibrary.org/obo/UBERON_0011618")
# File lib/phenoscaperb/Terms.rb, line 91
def self.label(iri:, verbose: nil, options: nil)

  arguments = { iri: iri }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/label", opts, verbose, options, nil).perform
end
labels(iris:, verbose: nil, options: nil) click to toggle source

Retrieve a label for each term IRI in a list

@!macro phenoscape_params @!macro phenoscape_options @param iris [String] one or more taxon IRIs @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.labels(iris: [
  "http://purl.obolibrary.org/obo/UBERON_0011618"
])
# File lib/phenoscaperb/Terms.rb, line 112
def self.labels(iris:, verbose: nil, options: nil)

  arguments = { iris: iris }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/labels", opts, verbose, options, nil).perform
end
least_common_subsumers(iris:, definedBy:, verbose: nil, options: nil) click to toggle source
Return all descendant subclasses of a given term

@!macro phenoscape_params
@!macro phenoscape_options
@param iris [String] one or more taxon IRIs
@param definedBy [String] the ontology identifier IRI in which the search terms are defined, e.g. http://purl.obolibrary.org/obo/uberon.owl
@return [Hash] A hash

@example
     require 'phenoscaperb'

     tm = Phenoscape::Terms
     tm.least_common_subsumers(
        iris: "http://purl.obolibrary.org/obo/UBERON_0011618",

. definedBy: “??”

)
# File lib/phenoscaperb/Terms.rb, line 192
def self.least_common_subsumers(iris:, definedBy:, verbose: nil, options: nil)

  arguments = { iris: iris, definedBy: definedBy }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/least_common_subsumers", opts, verbose, options, nil).perform
end
search_classes(text:, definedBy:, limit: nil, verbose: nil, options: nil) click to toggle source

Search for classes from a particular ontology.

@!macro phenoscape_params @!macro phenoscape_options @param text [String] the input text to search @param definedBy [String] the ontology identifier IRI in which the search terms are defined, e.g. purl.obolibrary.org/obo/uberon.owl @param limit [integer] limit records @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.search_classes(text: "fin", definedBy: "??")
# File lib/phenoscaperb/Terms.rb, line 72
def self.search_classes(text:, definedBy:, limit: nil, verbose: nil, options: nil)

  arguments = { text: text, definedBy: definedBy, limit: limit }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("term/search_classes", opts, verbose, options, nil).perform
end
term(iri:, verbose: nil, options: nil) click to toggle source

Return detail info for a given term. Currently this is the label and an optional definition.

@!macro phenoscape_params @!macro phenoscape_options @param iri [String] a term IRI @return [Hash] A hash

@example

require 'phenoscaperb'

tm = Phenoscape::Terms
tm.term(iri: "http://purl.obolibrary.org/obo/UBERON_0011618")
# File lib/phenoscaperb/Terms.rb, line 30
def self.term(iri:, verbose: nil, options: nil)

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