organism_for: Make sure the resource supports the organism and it has the...

View source: R/taxonomy.R

organism_forR Documentation

Make sure the resource supports the organism and it has the ID

Description

Make sure the resource supports the organism and it has the ID

Usage

organism_for(organism, resource, error = TRUE)

Arguments

organism

Character or integer: name or NCBI Taxonomy ID of the organism.

resource

Charater: name of the resource.

error

Logical: raise an error if the organism is not supported in the resource. Otherwise it only emits a warning.

Value

Character: the ID of the organism as it is used by the resource. NA if the organism can not be translated to the required identifier type.

Examples

organism_for(10116, 'chalmers-gem')
# [1] "Rat"
organism_for(6239, 'chalmers-gem')
# [1] "Worm"
# organism_for('foobar', 'chalmers-gem')
# Error in organism_for("foobar", "chalmers-gem") :
# Organism `foobar` (common_name: `NA`; common_name: `NA`)
# is not supported by resource `chalmers-gem`. Supported organisms:
# Human, Mouse, Rat, Zebrafish, Drosophila melanogaster (Fruit fly),
# Caenorhabditis elegans (PRJNA13758).


saezlab/OmnipathR documentation built on Oct. 16, 2024, 11:49 a.m.