getPvals.MASC: Test clusters for an expansion (or depletion) between...

Description Usage Arguments Value

View source: R/powerCalcFuncs.R

Description

Given the results of a simulated dataset (meta), this function will test all of the new clusters for differential abundance (expansion or depletion) between conditions.

Usage

1
2
3
4
5
6
7
8
getPvals.MASC(
  meta,
  clusterCol,
  null_mod,
  full_mod,
  mc.cores = 1,
  adj_method = "bonferroni"
)

Arguments

meta

A metadata table received as output from simulating datasets (via simDataset.base or simDataset.withMASC). The metadata table should contain the following columns: "cellstate" which refers to the assigned cell state during simulation, "sample" which refers to the sample the cell was assigned to, "batch" which refers to the batch the cell was assigned to, and "condition" which refers to the condition the cell was assigned to (case or control).

clusterCol

The name of the metadata column containing the new cell state clusters. Our functions designate this column "new_clus" in the saved results.

null_mod

The right-hand side of the formula that will be used as the null model in MASC analysis

full_mod

The right-hand side of the formula that will be used as the full model in MASC analysis

mc.cores

The number of cores that will be used for simulating the dataset and clustering. The computation time will depend on the number of simulated cells.

adj_method

The p-value correction method that will be used via the "p.adjust" function

Value

Returns a dataframe containing the calculated MASC p-values for each new cluster, as well as corrected p-values (default Bonferroni corrected)


immunogenomics/scpost documentation built on July 28, 2021, 4:03 a.m.