Create Data Object for Poisson MASH Analysis

pois_mash_set_data(Y, condition, si, subgroup)

Arguments

Y

J x N matrix of counts with features (e.g., genes) as rows and observations (e.g., cells) as columns.

condition

Factor with N entries and R levels in which condition[i] specifies the condition status of the ith observation.

si

Vector of size factors for each observation.

subgroup

Factor with R entries and M levels giving the subgroup status of each of R conditions. Default is no subgroups (that is, M = 1 level). If not set to NULL, the names of subgroup must match the levels of condition.

Value

A “pois.mash” data object for poisson mash analysis, including the following components:

X

J x R matrix of count data collapsed over conditions, with features as rows and conditions as columns.

s

Vector of length R adjusting for sequencing depth of each of R conditions.

subgroup

Vector with M levels specifying the subgroup status of each of R conditions.