[BioC] RNA-Seq, generate batch-free count matrix

Gordon K Smyth smyth at wehi.EDU.AU
Sat Aug 2 13:11:54 CEST 2014


Thanks Steve, that is what I had meant to write.

Gordon

On Fri, 1 Aug 2014, Steve Lianoglou wrote:

> So, removing batch effects from soup to nuts:
>
> ## ------------------------------------------------
> library(edgeR)
> y <- DGEList(counts=counts)
>
> ## Filter non-expressed genes:
> A <- aveLogCPM(y)
> y2 <- y2[A>1,]
>
> ## Then normalize and compute log2 counts-per-million with an offset
> y2 <- calcNormFactors(y2)
> logCPM <- cpm(y2, log=TRUE, prior.count=5)
>
> ## Then remove batch correct:
> logCPMc <- removeBatchEffect(logCPM, batch)
> ## ------------------------------------------------
>
> Thanks,
> -steve
>
> -- 
> Steve Lianoglou
> Computational Biologist
> Genentech
>

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list