lehner-lab / DiMSum

An error model and pipeline for analyzing deep mutational scanning (DMS) data and diagnosing common experimental pathologies
MIT License
26 stars 6 forks source link

Error in quantile.default #6

Closed liatia closed 2 years ago

liatia commented 2 years ago

Hi,

I used DiMSum on 3 cell lines, each treated with 2 different treatments. So I had 6 designs for which I wanted to obtain fitness scores and error estimates. For 5 of the 6 analyses, I had no errors during the analysis. But for one of them, I get the following error when computing the error model:

Fit error model...
Error in quantile.default(mean_cbe^2, probs = 0.001) : 
  missing values and NaN's not allowed if 'na.rm' is FALSE
Calls: dimsum ... [.data.table -> eval -> eval -> quantile -> quantile.default
In addition: Warning message:
In sqrt(unlist(fitness_norm_model[, .SD, .SDcols = paste0("scale_",  :
  NaNs produced
Execution halted

Have you ever encountered this error? Thank you.

andrefaure commented 2 years ago

Hi @liatia, thanks for the message - I've never seen this before. Would you be prepared to share the variant count file (output by stage 4 and with suffix "_variant_data_merge.tsv") with me so that I can fix this bug?

liatia commented 2 years ago

Hi @andrefaure, Here is the file you asked for design1_variant_data_merge.txt. It is a tsv file but I had to change the extension to txt so that it is supported by github.

andrefaure commented 2 years ago

Hi @liatia, thanks for sending this. I've traced the source of this issue and it will be fixed in the next release available in a day or so I hope - I'll keep you posted.

andrefaure commented 2 years ago

By the way, it seems that you might have mistakenly swapped input and output sample labels for replicate 3. Can you check this please? Such a mistake is sufficient to trigger this bug.

andrefaure commented 2 years ago

Hi @liatia, DiMSum has now been updated and includes a fix for this issue. You can get the new version with: conda install r-dimsum=1.2.10

liatia commented 2 years ago

Hi @andrefaure, Thank you so much for your quick answer! About the exchanged labels, I inserted the error when anonymizing the results, but the original file is good. Also, I have dependency issues to install the new version using conda install -c bioconda r-dimsum=1.2.10 command. Do you mind to send me a .yml file so I can have a working environment? Thank you very much

andrefaure commented 2 years ago

Hi @liatia, it's likely that the same environment was used to install software with conflicting dependencies. You can either delete the conda environment and start again (the latest version of DiMSum should be installed by default):

conda env remove --name dimsum
conda create --name dimsum
conda activate dimsum
conda install -c bioconda r-dimsum

or alternatively create a dedicated conda environment for the latest version of DiMSum:

conda create --name dimsum_1.2.10
conda activate dimsum_1.2.10
conda install -c bioconda r-dimsum=1.2.10
liatia commented 1 year ago

Hi @andrefaure, The envrionment error came from the starcode package. After fixing the conflict, I used the new version of DiMSum, which works great, thanks!

andrefaure commented 1 year ago

Great - glad to hear that!