gen_results | R Documentation |
Generates EWCE results on multiple gene lists in parallel by calling
ewce_para
. It allows you to stop the analysis and then continue later
from where you left off as it checks the results output directory for
finished gene lists and removes them from the input.
It also excludes gene lists with
less than 4 unique genes (which cause errors in EWCE analysis).
gen_results(
ctd,
gene_data,
list_name_column = "hpo_id",
gene_column = "gene_symbol",
list_names = unique(gene_data[[list_name_column]]),
reps = 100,
annotLevel = 1,
genelistSpecies = "human",
sctSpecies = "human",
force_new = FALSE,
bg = get_bg(species1 = genelistSpecies, species2 = sctSpecies, overwrite = force_new),
min_genes = 4,
cores = 1,
parallel_boot = FALSE,
save_dir_tmp = NULL,
save_dir = tempdir(),
verbose = 1,
...
)
ctd |
CellTypeDataset generated using generate_celltype_data. |
gene_data |
data frame of gene list names and genes (see get_gene_lists). |
list_name_column |
The name of the gene_data column that has the gene list names. |
gene_column |
The name of the gene_data column that contains the genes. |
list_names |
character vector of gene list names. |
reps |
Number of random gene lists to generate (Default: 100, but should be >=10,000 for publication-quality results). |
annotLevel |
An integer indicating which level of |
genelistSpecies |
Species that |
sctSpecies |
Species that |
force_new |
Overwrite previous results
in the |
bg |
List of gene symbols containing the background gene list
(including hit genes). If |
min_genes |
Minimum number of genes per list (default: 4) |
cores |
The number of cores to run in parallel (e.g. 8) |
parallel_boot |
Parallelise at the level of bootstrap iterations, rather than across gene lists. |
save_dir_tmp |
Folder to save intermediate results files to
(one file per gene list). Set to |
save_dir |
Folder to save merged results in. |
verbose |
Print messages. |
... |
Arguments passed on to
|
The gene_data should be a data frame that contains a column of gene list names (e.g. the column may be called "hpo_name"), and a column of genes (e.g. "gene_symbol"). For example:
hpo_name | gene_symbol |
"Abnormal heart" | gene X |
"Abnormal heart" | gene Y |
"Poor vision" | gene Z |
"Poor vision" | gene Y |
etc... | |
For more information on this see docs for get_gene_list (get_gene_lists).
All results as a dataframe.
gene_data <- HPOExplorer::load_phenotype_to_genes()
list_names <- unique(gene_data$hpo_id)[seq(5)]
ctd <- load_example_ctd()
all_results <- gen_results(ctd = ctd,
gene_data = gene_data,
list_names = list_names,
reps = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.