Yes, y would be the scaledcounts from DESeq. Should I use rawcounts here??
I am trying to makeContrasts between samples such that I can identify differentially regulated genes in a single sample.. (not a pairwise comparison). Therefore, one of the suggestions was to use limma makecontrasts. And I would like to know how to transform DESeq scaled/normalised counts to use in limma. Below is my code snipped as to how I get my normalised counts
design <- data.frame(row.names = colnames( countTable ),condition = pheno$Condition, libType = rep("single-end",dim(pheno)[1]))
conds<-as.factor(design$condition)
cds <- newCountDataSet( countTable, conds )
# estimateSizeFactors -----------------------------------------------------
cds <- estimateSizeFactors( cds )
sizeFactors( cds )
cds<-estimateDispersions(cds)
#Normalised Counts for other analysis
#Make a counts table that is scaled by the size factors
temp = t(sizeFactors(cds))
sizematrix<-matrix(data=temp, nrow=nrow(countTable), ncol=ncol(temp), byrow=TRUE)
scaledcounts = countTable/sizematrix
head(scaledcounts)
Now, I am following the limma guide for voom() to convert to log2-cpm
library(limma)
design<-model.matrix(~Cell_type) # Cell_type<-c(rep(1,3),rep(2,3),rep(3,3),rep(4,3))
v<-voom(y,design,plot=TRUE)
How can I make contrasts such that I can identify genes that are upregulated or downregulated in just one cell_type? Also please comment, if the above transformation from RNA-Seq to Limma is valid.
Thanks!
1 answer
Follow the examples in Chapter 16 of the Limma User's Guide to apply voom to raw count data. It's not clear how you built your y object from the code you provided, but if they aren't simply the raw counts (you suggested you are using the DESeq "scaled/normalized" counts), then you are mostly likely doing it wrong.
Also, please specify what you mean when you say you want to "identify genes that are upregulated or down regulated in just one cell type." It's not clear to me what you're after.
Update
It was just brought to my attention that a very recent tech report for voom is available here, and is certainly worth a read.
Yes, you should. Like I said, follow the examples found in the limma user's guide.
Log in to answer this question.