mascCalc: Perform a test for differential abundance for a cell state...

Description Usage Arguments Value

View source: R/powerCalcFuncs.R

Description

Given a metadata table, this function will test a desginated cell state cluster (clusterName) for differential abundance (expansion or depletion between conditions) with MASC

Usage

1
mascCalc(meta, clusterCol, clusterName, null_mod, full_mod)

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.

clusterName

The name of the cell state cluster that will be tested forr differential abundance.

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

Value

Returns a p-value (numeric) obtained from MASC analysis

importFrom dplyr group_by tally pull importFrom lme4 glmer glmerControl .makeCC


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