Hi;
I am working with an interesting design and have setup the contrasts with DESeq2 and unsure if it setup correct as I get quite alot significant genes.
The setup is as follows:
6 neurontypes (each with three replicates) which can be subdivided into 2 groups (LTMR and Nociceptors). I want to compare each neurontype against all neurontypes of the opposite group. So for example given that neurontype1 is in LTMR - what genes are DE between neurontype1 and all Nociceptor samples? The code I used is pasted below:
# Create DESeq2 dataset
se <-SummarizedExperiment(assays=SimpleList(counts=exprs(sub.eset)), colData=DataFrame(pData(sub.eset)))
dds <- DESeqDataSet(se=se, design = ~ neurontype)
dds <- DESeq(dds)
# Create list object for the results
resultsAll <- vector("list", 6)
# adding the effects across all neurontypes within a group to create background contrast
bg.ltmr <- resultsNames(dds)[grep("LTMR", resultsNames(dds))]
bg.nociceptor <- resultsNames(dds)[grep("Nociceptor", resultsNames(dds))]
# Extract data of specified contrasts with appropriate background
for (n in 2:length(resultsNames(dds))){
r <- resultsNames(dds)[n]
if (r %in% bg.ltmr) contrast <- list(r, c(bg.nociceptor))
if (r %in% bg.nociceptor) contrast <- list(r, c(bg.ltmr))
res <- results(dds, contrast=contrast)
resultsAll[n-1] <- list(res)
}
names(resultsAll) <- resultsNames(dds)[-1]
I get about ~3000 genes significant for each of the neurontypes which seems a bit high to me. Any thoughts on if there is a better way to do this?
Thanks!
I am working with an interesting design and have setup the contrasts with DESeq2 and unsure if it setup correct as I get quite alot significant genes.
The setup is as follows:
6 neurontypes (each with three replicates) which can be subdivided into 2 groups (LTMR and Nociceptors). I want to compare each neurontype against all neurontypes of the opposite group. So for example given that neurontype1 is in LTMR - what genes are DE between neurontype1 and all Nociceptor samples? The code I used is pasted below:
# Create DESeq2 dataset
se <-SummarizedExperiment(assays=SimpleList(counts=exprs(sub.eset)), colData=DataFrame(pData(sub.eset)))
dds <- DESeqDataSet(se=se, design = ~ neurontype)
dds <- DESeq(dds)
# Create list object for the results
resultsAll <- vector("list", 6)
# adding the effects across all neurontypes within a group to create background contrast
bg.ltmr <- resultsNames(dds)[grep("LTMR", resultsNames(dds))]
bg.nociceptor <- resultsNames(dds)[grep("Nociceptor", resultsNames(dds))]
# Extract data of specified contrasts with appropriate background
for (n in 2:length(resultsNames(dds))){
r <- resultsNames(dds)[n]
if (r %in% bg.ltmr) contrast <- list(r, c(bg.nociceptor))
if (r %in% bg.nociceptor) contrast <- list(r, c(bg.ltmr))
res <- results(dds, contrast=contrast)
resultsAll[n-1] <- list(res)
}
names(resultsAll) <- resultsNames(dds)[-1]
I get about ~3000 genes significant for each of the neurontypes which seems a bit high to me. Any thoughts on if there is a better way to do this?
Thanks!
Comment