Hello
I am trying to use deseq.
I think I follow all instruction, but it does not work.
The following is the error message
Error in glm.fit(x = numeric(0), y = numeric(0), weights = NULL, start = c(0.1, :
object 'fit' not found
Calls: estimateDispersions ... parametricDispersionFit -> glm -> eval -> eval -> glm.fit
In addition: Warning messages:
1: In glm.fit(x = numeric(0), y = numeric(0), weights = NULL, start = c(0.1, :
no observations informative at iteration 1
2: glm.fit: algorithm did not converge
Execution halted
The following is count table (tab delimetered)
gene treated treated notTreated notTreated
test1 0 0 1 2
test3 394 718 1162 1513
test3 0 0 0 0
test4 0 0 0 0
test5 0 0 0 0
The following is my r script
#!/usr/bin/env Rscript
library(DESeq)
#parameters
args = commandArgs(trailingOnly=TRUE)
inFname=args[1]
outDir=args[2]
type1=args[3]
type2=args[4]
countTable <- read.delim(inFname, header=TRUE)
rownames(countTable) <- countTable$gene
countTable <- countTable[,-1]
#treatment infomation
conds <- factor(c(type1, type1, type2, type2))
cds <- newCountDataSet(countTable, conds)
#nomalization
cds <- estimateSizeFactors( cds )
head(counts(cds))
#variance estimation
cds <- estimateDispersions( cds )
print("------------------------------")
cds
print("==============================")
#calling differential expression
res = nbinomTest(cds, type1, type2)
head(res)
pdfFname = paste0(outDir, "graph.pdf")
pdf(pdfFname)
plotMA(res)
dev.off()
Can you tell me what I have done wrong.
Thank you