Open mallorymaynes opened 2 years ago
The latter one looks like a numerical error during fitting, let's check if you have all-zero genes in your data set that could cause this? On first sight, looking at the error report, that is the most suspicious field with respect to numeric stability.
I ran this filtering step on my counts table before running RUVseq (to generate factors of unwanted variation), which only keeps genes that have at least 10 counts in at least 2 samples, so I don't think that should be the issue.
filter <- apply(forward, 1, function(x) length(x[x>10])>=2) #filter: greater than 10 counts in at least 2 samples
Hey David, any other thoughts? Is there anything I can give you to help diagnose?
@mallorymaynes Thanks for bringing this up and did you managed to find a solution. Unfortunately, I ran into the same problem when trying to incorporate RUVg covariates into vecConfounders. Here is my code,
ImpulseDE2_pathways <- runImpulseDE2( matCountData = raw_counts, dfAnnotation = model_meta, boolCaseCtrl = FALSE, scaNProc = 60, vecConfounders = "Batch", scaQThres = 0.01, boolIdentifyTransients = TRUE)
Got the error:
<simpleError in optim(par = vecParamGuess, fn = evalLogLikImpulse_comp, vecCounts = vecCounts, scaDisp = scaDisp, vecSizeFactors = vecSizeFactors, vecTimepointsUnique = vecTimepointsUnique, vecidxTimepoint = vecidxTimepoint, lsvecidxBatch = lsvecidxBatch, vecboolObserved = !is.na(vecCounts), method = "BFGS", control = list(maxit = MAXIT, reltol = RELTOL, fnscale = -1)): non-finite finite-difference value [3]>.
Running without the batch works fine. But this means the batch may impede with the analysis.
Hi David,
I was able to incorporate vecConfounders as you suggested in #28, but have come across a couple of errors along the way. The first error that was generated:
I am not sure why, but if change nothing about the matrices (matCountData and dfAnnotation) but make vecConfounders = NULL, the model will run. DESeq2 will also run using the same matrices/data so I'm not sure where the issue is. Regardless, I generated size and dispersion factors via DESeq2:
I plugged those into the model, but am now I'm running into more errors:
I will also note that "ImpulseDE2_lsErrorCausingGene.RData" does not exist anywhere in my remote directory (running the model on our institution's supercomputer). I am happy to supply any additional information/data to help troubleshoot. I really think ImpulseDE2 should fit our experiment/model the best but I am not sure where to begin diagnostics on these errors.