error when estimating Dispersions for count table data in DESeq
1
0
Entering edit mode
梁芳 ▴ 10
@-6638
Last seen 10.3 years ago
Hello?everyone, I?am?working?in?the?Beijing?Institute?of?Genomics,?Chinese?Academy?of? Science.?I?used?the?DESeq?to?analyze?my?RNA- seq?data,?following?the?instruction?file?"Di erential?expression?of?RNA-Seq?data?at?the?gene?level?the?DESeq?packag e"?step?by?step.?It?didn't?show?any?error?information?until?I?typed?th e?command?"cds?=?estimateDispersions(?cds?)".?The?error?message?was: Error?in?if?(nr?=2.")?: ??argument?is?of?length?zero My?input?file?is?attached.?Could?someone?let?me?know?what?the?problem? is? ps. the above error message didn't show up for the test data "pasilla", so there should be no problem with the software. Following?is?the?code: library("DESeq"); CountTable?=?read.table("test.txt",?header=TRUE,?row.names=1); Design?=?data.frame(row.names?=?colnames(CountTable),?condition?=?c("t reated",?"treated",?"untreated",?"untreated")); cds?=?newCountDataSet(CountTable,?Design); cds?=?estimateSizeFactors(cds); cds?=?estimateDispersions(cds); Thanks! Fang?Liang -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test.txt URL: <https: stat.ethz.ch="" pipermail="" bioconductor="" attachments="" 20140708="" 0975235b="" attachment.txt="">
• 1.3k views
ADD COMMENT
0
Entering edit mode
Simon Anders ★ 3.8k
@simon-anders-3855
Last seen 4.4 years ago
Zentrum für Molekularbiologie, Universi…
Hi On 08/07/14 07:45, ?? wrote: > [...] command "cds = estimateDispersions( cds )". The error message was: > > Error in if (nr < 2) stop("nrow(modelMatrix) must be >=2.") : > argument is of length zero > Following is the code: > library("DESeq"); > CountTable = read.table("test.txt", header=TRUE, row.names=1); > Design = data.frame(row.names = colnames(CountTable), condition = c("treated", "treated", "untreated", "untreated")); > cds = newCountDataSet(CountTable, Design); > cds = estimateSizeFactors(cds); > cds = estimateDispersions(cds); For simple two-group comparisons, you should pass a factor rather than a data frame. Otherwise, you have to specify explicitly when calling 'estimateDispersion' which column of the data frame to use. Try: cds = newCountDataSet(CountTable, Design$condition) instead of cds = newCountDataSet(CountTable) and it should work. HOWEVER: Please consider starting over and using DESeq2, the successor to DESeq. We have made considerable improvements there, compared to DESeq, both in terms of usability (your problem would not have arisen with DESeq2) and of inferential power. Simon
ADD COMMENT

Login before adding your answer.

Traffic: 556 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