Question: Error with Reporting Tool and DESeq2
0
4.6 years ago by
United States
noushin.farnoud0 wrote:

Hi All,

I can not publish the report for only a "subset" of  genes in DESeqDataSet, while the original DeseqtDataSet can be published without any problem. I can not figure why this happens.

For example:

library(DESeq2)
library(ReportingTools)

data(mockRnaSeqData)
conditions <- c(rep("case",3), rep("control", 3))
mockRna.dse <- DESeqDataSetFromMatrix(countData = mockRnaSeqData, colData = as.data.frame(conditions), design = ~ conditions)

colData(mockRna.dse)$conditions <- factor(colData(mockRna.dse)$conditions, levels=c("control", "case"))

## Generate DESeqDataSet object
mockRna.dse <- DESeq(mockRna.dse)

## Now the results can be published...
library("org.Mm.eg.db")
report1 <- HTMLReport(shortName = 'Report1.html', title = 'RNA-seq analysis', reportDirectory = "./reports")

publish(mockRna.dse,report1, pvalueCutoff=0.05, annotation.db="org.Mm.eg.db", factor=colData(mockRna.dse)$conditions, reportDir="./reports") finish(report1) This will generate "report1" successfully. But if I add: temp <- mockRna.dse[1:100,] # a subset of the original DeSeq dataset library("org.Mm.eg.db") report2 <- HTMLReport(shortName = 'Report2.html', title = 'RNA-seq analysis', reportDirectory = "./reports") publish(temp,report2, pvalueCutoff=0.10, annotation.db="org.Mm.eg.db", factor = colData(temp)$conditions, reportDir="./reports")
finish(report2)

"Error: Ids do not appear to be Entrez Ids for the specified species."

I do not understand why, as these are the same Entrez IDs as in the first report!!

Thank You,
Noushin

deseq2 publish • 973 views
modified 4.6 years ago by James W. MacDonald50k • written 4.6 years ago by noushin.farnoud0
Answer: Error with Reporting Tool and DESeq2
2
4.6 years ago by
United States
James W. MacDonald50k wrote:

You are telling ReportingTools that you only want to publish a table with p-values < 0.05, but the subset you supply has no p-values less than that, so you end up with a data.frame with zero rows. If you ask for the row.names of a zero-row data.frame (which is what ReportingTools is doing here), you get character(0) returned, which is obviously not an Entrez ID for any species, hence the error.

Arguably the error should be different, something like 'No data fulfill your filtering criterion', or 'After filtering on p < 0.05, there are no data to publish'.