Run many phenotype-cell type association tests in parallel using iterate_lm.
run_phenomix(
ctd_name,
annotLevel = seq(length(ctd)),
ymat,
test_method = "glm",
metric = "specificity",
ctd = load_example_ctd(file = paste0("ctd_", ctd_name, ".rds")),
save_path = file.path(tempfile(), "results", paste0("phenomix_", test_method, "_",
metric), paste0("phenomix_", ctd_name, "_results.tsv.gz")),
multivariate = FALSE,
workers = NULL,
force_new = FALSE,
...
)
Name of the CTD to load.
An integer indicating which level of sct_data
to
analyse (Default: 1).
gene x celltype matrix.
Association testing method to use.
Which matrix within the CTD to use (e.g. "mean_exp","specificity","specificity_quantiles").
CellTypeDataset generated using generate_celltype_data.
Path to save the table of aggregated results to.
If TRUE
, runs tests with each column in
xmat
as a multivariate predictor in a single model
(one model per column in yvar
). IfFALSE
,
runs tests with each column in xmat
as a univariate predictor in
separate models (one model per column in yvar
).
Number (>1) or proportion (<1) of worker cores to use.
Overwrite previous results
in the save_dir_tmp
.
Additional parameters passed to the statistical test function.
if (FALSE) { # \dontrun{
ymat <- HPOExplorer::hpo_to_matrix()
ymat <- ymat[,1:10]
lm_res <- run_phenomix(ctd_name = "HumanCellLandscape",
annotLevel = 3,
ymat = ymat,
save_path=tempfile())
} # }