Module: Phenoscape::Genes

Defined in:
lib/phenoscaperb/Genes.rb

Class Method Summary collapse

Class Method Details

.affecting_entity_phenotype(iri:, quality: nil, parts: nil, historical_homologs: nil, serial_homologs: nil, limit: nil, offset: nil, total: nil, verbose: nil, options: nil) ⇒ Hash

Search for classes from a particular ontology.

Examples:

require 'phenoscaperb'

ge = Phenoscape::Genes
ge.affecting_entity_phenotype(iri: "http://purl.obolibrary.org/obo/UBERON_0003097")

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)

    anatomical entity IRI

  • quality (String) (defaults to: nil)

    uality IRI

  • parts (boolean) (defaults to: nil)

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

  • historical_homologs (boolean) (defaults to: nil)

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

Returns:



72
73
74
75
76
77
78
79
80
# File 'lib/phenoscaperb/Genes.rb', line 72

def self.affecting_entity_phenotype(iri:, quality: nil, parts: nil, historical_homologs: nil,
    serial_homologs: nil, limit: nil, offset: nil, total: nil, verbose: nil, options: nil)

  arguments = { iri: iri, quality: quality, 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("gene/affecting_entity_phenotype", opts, verbose, options, nil).perform
end

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

Return detail info for a given gene

Examples:

require 'phenoscaperb'

ge = Phenoscape::Genes
ge.gene(iri: "http://www.informatics.jax.org/marker/MGI:104842")

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 gene IRI

Returns:



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

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

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

.search(text:, taxon: nil, verbose: nil, options: nil) ⇒ Hash

Search for genes by gene symbol.

Examples:

require 'phenoscaperb'

ge = Phenoscape::Genes
ge.search(text: "coil")

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

  • text (String)

    the input text to search

  • taxon (String) (defaults to: nil)

    NCBI IRI for taxon

Returns:



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

def self.search(text:, taxon: nil, verbose: nil, options: nil)

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