run_go: Run GO analysis on parallel.

Description Usage Arguments Value See Also Examples

View source: R/get_ontologies.R

Description

run_parallel_go splits provided data frame into a list of data frames based on the values in the column set_label and using isplit function. It then runs get_all_ontologies in parallel using foreach by sending each data frame onto a worker.

Usage

1
2
run_go(dat, species = c("human", "mouse"), universe, ontologies, cores,
  run_parallel = TRUE)

Arguments

dat

Data frame with two columns: entrez and set_label. The column entrez should contain ENTREZ gene identifiers; the column set_label should contain labels for identifiers that will be analyzed as a group.

species

Character string specifying the species, must be one of two "human" (default) or "mouse". For GO analysis we use org.Hs.eg.db, and for mouse org.Mm.eg.db.

universe

Character vector of unique ENTREZ gene identifiers to be used as a universe.

ontologies

Character vector of ontologies for which to run the analysis. If not provided the analysis will be run for all ontologies: cellular component (CC), biological process (BP) and molecular function (MF).

cores

Integer value representing the number of cores to use. This parameter is optional. If not provided getDoParWorkers function will be called to determine the number of workers.

run_parallel

Boolean indicating whether to run the execution in parallel. Default is TRUE. If FALSE parameter cores will be ignored.

Value

Data frame with the results of GO enrichment.

See Also

get_ontology to understand the output format.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# load test data:
data("human_symbol")
remove duplicate rows:
dat_clean <- deduplicate_rows(human_symbol)
# map symbol to ENTREZ gene id:
dat_mapped <- map_genes(dat_clean, id = "symbol", species = "human")
# extract universe
universe <- unique(dat_mapped$entrez)
# run GO enrichment in parallel for all three ontologies
res <- run_go(dat_mapped, species = "human", universe = universe)

## End(Not run)

vitalinakomashko/parallelGO documentation built on May 18, 2019, 1:32 p.m.