Learn R Programming

glmmSeq (version 0.0.1)

glmmGene: Glmm for sequencing results of a single gene

Description

Glmm for sequencing results of a single gene

Usage

glmmGene(
  modelFormula,
  countdata,
  gene,
  metadata,
  id,
  dispersion,
  sizeFactors = NULL,
  reducedFormula = "",
  modelData = NULL,
  control = glmerControl(optimizer = "bobyqa"),
  zeroCount = 0.125,
  removeDuplicatedMeasures = FALSE,
  removeSingles = FALSE,
  verbose = FALSE,
  ...
)

Arguments

modelFormula

the model formula. For more information of formula structure see lme4::glmer().

countdata

the sequencing data

gene

the row name in countdata to be used

metadata

a data frame of sample information

id

Column name in metadata which contains the sample IDs to be used in pairing

dispersion

a numeric for the gene dispersion

sizeFactors

size factors (default=NULL). If provided the glmer offset is set to log(sizeFactors).For more information see lme4::glmer()

reducedFormula

Reduced design formula (default="")

modelData

something something

control

the glmer control (default=glmerControl(optimizer="bobyqa")). For more information see lme4::glmerControl().

zeroCount

numerical value to offset zeroes for the purpose of log (default=0.125)

removeDuplicatedMeasures

whether to remove duplicated conditions/repeated measurements for a given time point (default=FALSE).

removeSingles

whether to remove individuals with only one measurement (default=FALSE)

verbose

Logical whether to display messaging (default=FALSE)

...

Other parameters to pass to lme4::glmer().

Value

Returns the fit for the general linear mixed model of a single gene

Examples

Run this code
# NOT RUN {
data(PEAC_minimal_load)

disp <- apply(tpm, 1, function(x){
(var(x, na.rm=TRUE)-mean(x, na.rm=TRUE))/(mean(x, na.rm=TRUE)**2)
})

MS4A1fit <- glmmGene(~ Timepoint * EULAR_6m + (1 | PATID),
                      gene = 'MS4A1',
                      id = 'PATID',
                      countdata = tpm,
                      metadata = metadata,
                      dispersion = disp['MS4A1'],
                      verbose=FALSE)

MS4A1fit
# }

Run the code above in your browser using DataLab