This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Apply a batch effect with "combatseq" in wgcna

I have 336 samples, with two conditions of fibrosis and normal , and male and female genders , and Chinese, Indian, Malay , Caucasian , Bruneian, and not reported nationalities, I want to apply the batch effect by combat to this study before doing WGCNA. and I use DESeq2 for normalization data

How do I use the following function? I'm very confused to use scripts and I can't set scripts for my data For example, what should I define as a batch? and how set counts in this script

ComBat_seq(
    counts,
    batch,
    group = NULL,
    covar_mod = NULL,
    full_mod = TRUE,
    shrink = FALSE,
    shrink.disp = FALSE,
    gene.subset.n = NULL
 )

 count_matrix <- matrix(rnbinom(400, size=10, prob=0.1), nrow=50, ncol=8)
 batch <- c(rep(1, 4), rep(2, 4))

 adjusted <- ComBat_seq(count_matrix, batch=batch, group=NULL)

Thank you for your help

deseq2 r batch combatseq wgcna

0 answers

No answers yet.

Log in to answer this question.