build.designmatrix.single: Constructs a design matrix for running CSIDE with a single...

View source: R/CSIDE_class.R

build.designmatrix.singleR Documentation

Constructs a design matrix for running CSIDE with a single explanatory variable

Description

The design matrix contains an intercept column and a column of the explanatory variable.

Usage

build.designmatrix.single(myRCTD, explanatory.variable)

Arguments

myRCTD

an RCTD object with annotated cell types e.g. from the run.RCTD function.

explanatory.variable

a named numeric vector representing the explanatory variable used for explaining differential expression in CSIDE. Names of the variable are the SpatialRNA pixel names, and values should be standardized between 0 and 1.

Value

A design matrix containing the covariates for running CSIDE. The rownames represent pixel names and are a subset of the pixels in the SpatialRNA object. The columns each represent a covariate for explaining differential expression.


dmcable/RCTD documentation built on Feb. 24, 2024, 11:03 p.m.