theislab / destiny

R package for single cell and other data analysis using diffusion maps
https://theislab.github.io/destiny/
GNU General Public License v3.0
77 stars 11 forks source link

Version issue Matrix package (v1.5-1) #61

Open basielcole opened 2 years ago

basielcole commented 2 years ago

Hi developers, I tried running the DiffusionMap() function on the "guo" dummy dataset:

data(guo)
dm_guo <- DiffusionMap(guo)

However, this throws the following error:

Error: as(, "dsTMatrix") is deprecated since Matrix 1.5-0; do as(., "TsparseMatrix") instead

Traceback is as follows:

  1. warning.(gettextf("as(<%s>, \"%s\") is deprecated since Matrix 1.5-0; do %s instead", cln1, cln2, deparse1(.as.via.virtual(Class1, Class2, quote(.)))), call. = FALSE, domain = NA)
  2. Matrix.DeprecatedCoerce(cd1, cd2)
  3. asMethod(object)
  4. as(d2, "dsTMatrix")
  5. no_censoring(dists, sigma, cb)
  6. verbose_timing(verbose, "Calculating transition probabilities", { if (censor) censoring(imputed_data, sigma, dists, censor_val, ...
  7. transition_probabilities(imputed_data, sigma, knn$dist_mat, censor, censor_val, censor_range, missing_range, verbose)
  8. DiffusionMap(guo)

This seems to be an issue with the latest version of the Matrix package, version 1.5-1.

Any idea how I could solve this issue?

Thanks in advance,

Basiel

flying-sheep commented 2 years ago

It’s a warning, not an error, so you just need to stop using options(warn=2) to turn warnings into errors, then you can ignore it.

Thank you for notifying me, I’ll make sure a future version of destiny doesn’t use deprecated APIs anymore

basielcole commented 2 years ago

Thank you for your swift response!

Setting options(Matrix.warnDeprecatedCoerce = 0) resolved the issue.