Question: Qusage/nlme package for adding random effects in gene set enrichment analysis
0
7 months ago by
Diana10
Diana10 wrote:

Hi there!

I am trying to perform a gene set enrichment analysis with qusage package in order to incorporate one random effect. I am comparing two groups of patients on one contrast (which is basically my only fixed effect in my design) and I have multiple samples per patient (which is my random effect).

This is my code:

# First I uploaded (1) all Genesets from the MSigDB/Broadway institue, (2) my logcpm matrix constructed with edgeR/limma and (3) my design
library(qusage)
library(nlme)
eset <- top500logcpm
fixedeffects <- Design$SVZstatus # contrast factor con.fac <- Design$SVZstatus
contrast = "SVZ - nonSVZ"
sampleID <- Design$Name subject <- Design$Subject
qusage.result.random<-qgen(eset, Design,
fixed=fixedeffects,
contrast.factor=fixedeffects,
contrast=contrast,
geneSets=geneSets,
random=subject,
design.sampleid="sampleID")


Unfortunately, I get this error:

Error in [.data.frame(design, , design.sampleid) :
undefined columns selected


I checked my column names in my design, but there are no typo's... What am I doing wrong? Your help is appreciated!

qusage gsea • 129 views
ADD COMMENTlink
modified 7 months ago • written 7 months ago by Diana10
Answer: Qusage/nlme package for adding random effects in gene set enrichment analysis
0
7 months ago by
Diana10
Diana10 wrote:

I have found a solution: it is sufficient to provide the column name of the design (so in my case: fixedeffects <- ~SVZstatus instead of fixedeffects <- Design\$SVZstatus). Now it works. :)

ADD COMMENTlink written 7 months ago by Diana10
Please log in to add an answer.

Content
Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 479 users visited in the last hour