View source: R/run_congenital_enrichment.R
run_congenital_enrichment | R Documentation |
First, this function computes the mean difference in association p-values
between a given phenotype and the congenital and non-congenital versions
of a cell type (the fetal_nonfetal_pdiff
column).
It then sorts the results from the largest to the smallest difference.
Here, a positive difference indicates that the phenotype is more associated
with the fetal/embryonic version of the cell type, while a negative difference
indicates that the phenotype is more associated with the adult version.
Next, it runs enrichment analyses for the top and bottom N phenotypes
using the dag_enrich_on_offsprings function.
Finally, it run enrichment analyses for the top and bottom N cell types.
run_congenital_enrichment(
results,
hpo = HPOExplorer::get_hpo(),
cl = KGExplorer::filter_ontology(KGExplorer::get_ontology("cl"), keep_descendants =
"cell"),
gpt_annot = HPOExplorer::gpt_annot_codify(),
fetal_keywords = c("fetal", "fetus", "primordial", "hESC", "embryonic"),
celltype_col = "author_celltype",
top_n_phenotypes = 10,
top_n_hpo = 50,
top_n_cl = top_n_hpo,
q_threshold = 0.05,
prune = TRUE,
...
)
results |
The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results |
hpo |
Human Phenotype Ontology object, loaded from get_ontology. |
cl |
Cell Ontology (CL) object from
|
gpt_annot |
A data.table of GPT annotations. |
fetal_keywords |
A character vector of keywords to identify fetal cell types. |
celltype_col |
The column name of the cell type. |
top_n_phenotypes |
Number of top and bottom phenotypes to return. |
top_n_hpo |
Number of top and bottom phenotypes to run enrichment analyses on. |
top_n_cl |
Number of top and bottom cell types to run enrichment analyses on. |
q_threshold |
The q value threshold to subset the |
prune |
Prune redundant ancestral terms from the enrichment results using prune_ancestors. |
... |
Arguments passed on to
|
Named list of enrichment results.
results <- load_example_results()[ctd=="HumanCellLandscape"]
out <- run_congenital_enrichment(results=results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.