Question: Error with Reporting Tool and DESeq2
0
gravatar for noushin.farnoud
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)

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

deseq2 publish • 973 views
ADD COMMENTlink 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
gravatar for James W. MacDonald
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'.

ADD COMMENTlink written 4.6 years ago by James W. MacDonald50k

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 REPLYlink written 4.6 years ago by noushin.farnoud0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 283 users visited in the last hour