Module: Phenoscape::Studies

Defined in:
lib/phenoscaperb/Studies.rb

Class Method Summary collapse

Class Method Details

.matrix(iri:, ret: "hash", verbose: nil, options: nil) ⇒ Hash

Return a data matrix in NeXML format containing the data for a given study.

Examples:

require 'phenoscaperb'

tax = Phenoscape::Studies
st.matrix(iri: "http://www.pfeilbook.com/07pala/pdf/2_48d15.pdf")

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)

    the study IRI

Returns:



94
95
96
97
98
99
# File 'lib/phenoscaperb/Studies.rb', line 94

def self.matrix(iri:, ret: "hash", verbose: nil, options: nil)

  arguments = { iri: iri }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("study/matrix", opts, verbose, options, ret, "text/plain").perform
end

.phenotypes(iri:, limit: 20, offset: 0, total: false, verbose: nil, options: nil) ⇒ Hash

Character states and their phenotypes annotated within a study

Examples:

require 'phenoscaperb'

tax = Phenoscape::Studies
st.phenotypes(iri: "http://www.pfeilbook.com/07pala/pdf/2_48d15.pdf")

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)

    the study IRI

  • limit (Integer) (defaults to: 20)

    maximum results to return

  • offset (Integer) (defaults to: 0)

    index of results to begin returning

  • total (boolean) (defaults to: false)

    whether to return the total result count rather than the results

Returns:



75
76
77
78
79
80
# File 'lib/phenoscaperb/Studies.rb', line 75

def self.phenotypes(iri:, limit: 20, offset: 0, total: false, verbose: nil, options: nil)

  arguments = { iri: iri, limit: limit, offset: offset, total: total }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("study/phenotypes", opts, verbose, options, nil).perform
end

.query(taxon:, entity:, verbose: nil, options: nil) ⇒ Hash

Return studies containing taxa which are members of the optional input taxon expression and are have annotated phenotypes which are relevant to the optional input entity expression.

Examples:

require 'phenoscaperb'

st = Phenoscape::Studies
st.query(taxon: "<http://purl.obolibrary.org/obo/VTO_0037519>", entity: "<http://purl.obolibrary.org/obo/UBERON_0001703>")

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

  • taxon (String)

    Taxonomic class expression in OWL Manchester syntax

  • entity (String)

    Anatomical class expression in OWL Manchester syntax

Returns:



31
32
33
34
35
36
# File 'lib/phenoscaperb/Studies.rb', line 31

def self.query(taxon:, entity:, verbose: nil, options: nil)

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

.taxa(iri:, limit: 20, offset: 0, total: false, verbose: nil, options: nil) ⇒ Hash

Taxa annotated within a study

Examples:

require 'phenoscaperb'

tax = Phenoscape::Studies
st.taxa(iri: "http://www.pfeilbook.com/07pala/pdf/2_48d15.pdf")

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)

    the study IRI

  • limit (Integer) (defaults to: 20)

    maximum results to return

  • offset (Integer) (defaults to: 0)

    index of results to begin returning

  • total (boolean) (defaults to: false)

    whether to return the total result count rather than the results

Returns:



53
54
55
56
57
58
# File 'lib/phenoscaperb/Studies.rb', line 53

def self.taxa(iri:, limit: 20, offset: 0, total: false, verbose: nil, options: nil)

  arguments = { iri: iri, limit: limit, offset: offset, total: total }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("study/taxa", opts, verbose, options, nil).perform
end