detectOrganism: Detect organism

Description Usage Arguments Details Value Supported organisms Note See Also Examples

View source: R/detectOrganism.R

Description

Supports organism detection from Ensembl identifier or genome build.

Usage

1

Arguments

object

character.

Details

Only the first match is returned. We're using a while loop approach here so we can skip transgenes or spike-ins. The function fails after a maximum of 50 unknowns, for speed.

Value

character(1). Full latin organism name. Stops on match failure.

Supported organisms

Note

BiocGenerics::organism() character method conflicts with annotate package, which gets loaded into the namespace when DESeq2 is attached. Instead, we're exporting the character method here as a separate function named detectOrganism.

Updated 2019-08-21.

See Also

BiocGenerics::organism().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Match by gene identifier.
detectOrganism("ENSG00000000003")

## Match by genome build.
detectOrganism("GRCh38")  # Ensembl
detectOrganism("hg38")    # UCSC

## Match by alternate organism name.
detectOrganism("H. sapiens")
detectOrganism("hsapiens")

## The function will skip transgenes/spike-ins until we find a match.
detectOrganism(c("EGFP", "TDTOMATO", "ENSG00000000003"))

## But it only returns the first match, if there are multiple genomes.
detectOrganism(c("ENSG00000000003", "ENSMUSG00000000001"))

acidgenomics/freerange documentation built on Jan. 8, 2020, 3:45 a.m.