Module: Phenoscape::Terms
- Defined in:
- lib/phenoscaperb/Terms.rb
Class Method Summary collapse
-
.all_ancestors(iri:, verbose: nil, options: nil) ⇒ Hash
Return all ancestor superclasses of a given term.
-
.all_descendants(iri:, verbose: nil, options: nil) ⇒ Hash
Return all descendant subclasses of a given term.
-
.classification(iri:, verbose: nil, options: nil) ⇒ Hash
Return direct superclasses, direct subclasses, and equivalent classes of a given term.
-
.label(iri:, verbose: nil, options: nil) ⇒ Hash
Retrieve a label for a given term IRI.
-
.labels(iris:, verbose: nil, options: nil) ⇒ Hash
Retrieve a label for each term IRI in a list.
-
.least_common_subsumers(iris:, definedBy:, verbose: nil, options: nil) ⇒ Hash
Return all descendant subclasses of a given term.
-
.search(text:, type: nil, property: nil, verbose: nil, options: nil) ⇒ Hash
Search for terms in the KB by text match on a property value.
-
.search_classes(text:, definedBy:, limit: nil, verbose: nil, options: nil) ⇒ Hash
Search for classes from a particular ontology.
-
.term(iri:, verbose: nil, options: nil) ⇒ Hash
Return detail info for a given term.
Class Method Details
.all_ancestors(iri:, verbose: nil, options: nil) ⇒ Hash
Return all ancestor superclasses of a given term
150 151 152 153 154 155 |
# 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, , nil).perform end |
.all_descendants(iri:, verbose: nil, options: nil) ⇒ Hash
Return all descendant subclasses of a given term
169 170 171 172 173 174 |
# 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, , nil).perform end |
.classification(iri:, verbose: nil, options: nil) ⇒ Hash
Return direct superclasses, direct subclasses, and equivalent classes of a given term
131 132 133 134 135 136 |
# 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, , nil).perform end |
.label(iri:, verbose: nil, options: nil) ⇒ Hash
Retrieve a label for a given term IRI.
91 92 93 94 95 96 |
# 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, , nil).perform end |
.labels(iris:, verbose: nil, options: nil) ⇒ Hash
Retrieve a label for each term IRI in a list
112 113 114 115 116 117 |
# 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, , nil).perform end |
.least_common_subsumers(iris:, definedBy:, verbose: nil, options: nil) ⇒ Hash
Return all descendant subclasses of a given term
. definedBy: “??”
)
192 193 194 195 196 197 |
# 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, , nil).perform end |
.search(text:, type: nil, property: nil, verbose: nil, options: nil) ⇒ Hash
Search for terms in the KB by text match on a property value.
51 52 53 54 55 56 |
# File 'lib/phenoscaperb/Terms.rb', line 51 def self.search(text:, type: nil, property: nil, verbose: nil, options: nil) arguments = { text: text, type: type, property: property }.tostrings opts = arguments.delete_if { |k, v| v.nil? } Request.new("term/search", opts, verbose, , nil).perform end |
.search_classes(text:, definedBy:, limit: nil, verbose: nil, options: nil) ⇒ Hash
Search for classes from a particular ontology.
72 73 74 75 76 77 |
# 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, , nil).perform end |
.term(iri:, verbose: nil, options: nil) ⇒ Hash
Return detail info for a given term. Currently this is the label and an optional definition.
30 31 32 33 34 35 |
# 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, , nil).perform end |