Error with Reporting Tool and DESeq2
1
0
Entering edit mode
@noushinfarnoud-6928
Last seen 3 months ago
United States

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)

I receive the error that:

"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!!

I greatly appreciate your help. 

Thank You,
Noushin

publish deseq2 • 1.7k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 14 hours ago
United States

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'.

ADD COMMENT
0
Entering edit mode

Thanks Jamess! Above, I had increased the p-value cutoff for the "temp" subset to 0.1 just in case that was the cause. It seems even 0.1 was not large enough and when I increased it to 1, in fact it published the results successfully. As you said what was confusing me was the "error msg".

ADD REPLY

Login before adding your answer.

Traffic: 912 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6