Entering edit mode
3.5 years ago
Bioinfonext
▴
460
Hi,
Could anyone please suggest how can get rid of the below error in DESeq2 analysis?
library('DESeq2')
countMatrix = read.table("Count.txt",header=T,sep='\t',check.names=F)
dim(countMatrix)
colData <- read.table("metadata.txt", check.names=F)
rownames(colData)
dim(colData)
colnames(countMatrix)
all(rownames(colData) %in% colnames(countMatrix))
count <- countMatrix[,-1]
rownames(count) <- countMatrix[,1]
rownames(count)
all(rownames(colData) %in% colnames(count))
all(rownames(colData) == colnames(count))
count <- count[, rownames(colData)]
all(rownames(colData) == colnames(count))
dds <- DESeqDataSetFromMatrix(countData=count,colData=colData,design=~Season)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds <- DESeq(dds, test="Wald")
estimating size factors
Error in estimateSizeFactorsForMatrix(counts(object), locfunc = locfunc, :
every gene contains at least one zero, cannot compute log geometric means
Thanks
Thanks, but I am not sure how to add pseudocount 1 to count data and then how I should proceed further? after estimating the size factor should I use the wald test command?
Thanks
Before doing that, did you check if your
count matrix
has one or more samples with all0
values? Is so, simply run:I checked samples count with below command shows that no samples with all 0.
Many thanks
Just use: