Question: SVA analysis output R
gravatar for robertt_bw
2.6 years ago by
robertt_bw0 wrote:

Dear Community,

I performed a surrogate variable analysis on my RNA-seq data using the SVA package in R and want to use the identified surrogate variables as covariates in my DE design formula. There were more than 5 significant SV identified - human samples from different locations and different timepoints, hence high heterogeneity and several confounding factors. The output of sva is anyway limited to the first 5 SV identified and I was unable to successfully increase the number of sv included in the svaseq output file. I am using the code given below:



I couldn't find any helps/options adapting the output in the vignette/R help/forum, hence the question. Thanks in advance for any help!

rna-seq sva R • 1.6k views
ADD COMMENTlink modified 2.6 years ago by lessismore770 • written 2.6 years ago by robertt_bw0
gravatar for lessismore
2.6 years ago by
lessismore770 wrote:

Hey, Can you supply the entire code you used for this unsupervised batch effect correction?

ADD COMMENTlink written 2.6 years ago by lessismore770

Here you go:

edata=data.matrix(x, rownames.force = TRUE)


mod = model.matrix(~as.factor(meta2), data=meta2)

mod0 = model.matrix(~1, data=meta2) =,mod,method="leek")

[1] 9


Do you spot any obvious mistake?

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by robertt_bw0

Seems fine, recently they developed batchQC library, here is an example.

nbatch <- 3
ncond <- 2
npercond <- 10
data.matrix <- rnaseq_sim(ngenes=50, nbatch=nbatch, ncond=ncond, npercond=
npercond, basemean=10000, ggstep=50, bbstep=2000, ccstep=800,
basedisp=100, bdispstep=-10, swvar=1000, seed=1234)
batch <- rep(1:nbatch, each=ncond*npercond)
condition <- rep(rep(1:ncond, each=npercond), nbatch)
pdata <- data.frame(batch, condition)
modmatrix = model.matrix(~as.factor(condition), data=pdata)
sva.object <- batchQC_sva(data.matrix, mod=modmatrix)
batchQC_fsva_adjusted(data.matrix, modmatrix, sva.object)

tell me what you got

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by lessismore770
Please log in to add an answer.


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