Question: Can't make sva comparison despite very distinct batch effects
0
gravatar for jjrin
22 months ago by
jjrin10
jjrin10 wrote:

I continuously receive this error when I try to run sva with my count data

R code for sva:

# Loading all variables 
library(sva)
dat  <- dds_matrix
idx  <- rowMeans(dat) > 1
dat  <- dat[idx,]
mod  <- model.matrix(~batch, colData(dds))
mod0 <- model.matrix(~1, colData(dds))
svseq <- svaseq(dat, mod, mod0)

I receive this error message.

Error in solve.default(t(mod) %*% mod) : Lapack routine dgesv: system is exactly singular: U[4,4] = 0

I have very distinct batches which can be seen in this plot.

PCA plot of my data set, the colors indicate my batches

I have clearly dictated the batches as factors and this exact process has worked before. This is with a new, but very similar data set.

If it is simply not possible to remove these batch effects, how would I go about bringing these two batches closer together, they are definitely the same condition and the variance is likely due to batch effects, not biological significance.

batch effect factors sva • 1.1k views
ADD COMMENTlink modified 22 months ago • written 22 months ago by jjrin10

what is your contrast of interest? if you model sva on your known batch, it will look for covariates that are independet of it.

ADD REPLYlink written 22 months ago by Martombo2.6k
Please log in to add an answer.

Help
Access

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