mixedModelDE: Run a mixed model on GeoMxSet

View source: R/NanoStringGeoMxSet-de.R

mixedModelDER Documentation

Run a mixed model on GeoMxSet

Description

Run a mixed model on GeoMxSet

Usage

mixedModelDE(
  object,
  elt = "exprs",
  modelFormula = NULL,
  groupVar = "group",
  nCores = 1,
  multiCore = TRUE,
  pAdjust = "BY",
  pairwise = TRUE
)

Arguments

object

name of the object class to perform QC on

  1. NanoStringGeoMxSet, use the NanoStringGeoMxSet class

elt

assayDataElement of the geoMxSet object to run the DE on

modelFormula

formula used in DE, if null, the design(object) is used

groupVar

= "group", sample annotation to group the data for comparing means

nCores

= 1, number of cores to use, set to 1 if running in serial mode

multiCore

= TRUE, set to TRUE to use multiCore, FALSE to run in cluster mode

pAdjust

= "BY" method for p-value adjustment

pairwise

boolean to calculate least-square means pairwise differences

Value

mixed model output list

Examples

datadir <- system.file("extdata", "DSP_NGS_Example_Data", package = "GeomxTools")
demoData <- readRDS(file.path(datadir, "/demoData.rds"))
target_demoData <- aggregateCounts(demoData)
target_demoData <- normalize(target_demoData, norm_method="quant")
pData(target_demoData)[["slide"]] <-
    factor(pData(target_demoData)[["slide name"]])
protocolData(target_demoData)[["pool_rep"]] <-
    factor(protocolData(target_demoData)[["pool_rep"]])
mixedOutmc <- mixedModelDE(target_demoData,
                           elt = "exprs_norm",
                           modelFormula = ~ pool_rep +  (1 | slide),
                           groupVar = "pool_rep",
                           nCores = 2,
                           multiCore = TRUE,
                           pAdjust = NULL
)


Nanostring-Biostats/GeomxTools documentation built on Sept. 24, 2024, 4:51 p.m.