Hello
I do have a problem here. I am using DEXSeq to analyse exon usage across 27 different human tissues. Each tissues have 3 replicates and some of them have 2 replicates. The error came out when I want to EstimateSizeFactors:
> dxd = estimateSizeFactors(dxd) Error in estimateSizeFactorsForMatrix(featureCounts(object), locfunc, : every gene contains at least one zero, cannot compute log geometric means > head(dxd) class: DEXSeqDataSet dim: 1 154 exptData(0): assays(1): counts rownames(1): ENSG00000000003:E001 rowRanges metadata column names(5): featureID groupID exonBaseMean exonBaseVar transcripts colnames: NULL colData names(4): sample condition libType exon
I removed the zero using
cts <- counts(dxd) geoMeans <- apply(cts, 1, function(row) if (all(row == 0)) 0 else exp(mean(log(row[row != 0])))) idx <- which.max(colSums(counts(dxd) == 0)) dxd2 <- dxd[ , -idx] dxd2 = estimateSizeFactors(dxd2, geoMeans=geoMeans)
Then I got an error
Error in `[[<-`(`*tmp*`, name, value = c(0.041799357270166, 0.0721042335357389, : 152 elements in value to replace 153 elements > head(dxd2) class: DEXSeqDataSet dim: 1 153 exptData(0): assays(1): counts rownames(1): ENSG00000000003:E001 rowRanges metadata column names(5): featureID groupID exonBaseMean exonBaseVar transcripts colnames: NULL colData names(4): sample condition libType exon
It seems like the one of the column has been reduced from 154 to 153. How could I solved this problem? Thank you