destiny icon indicating copy to clipboard operation
destiny copied to clipboard

Version issue Matrix package (v1.5-1)

Open basielcole opened this issue 1 year ago • 2 comments

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(<dsCMatrix>, "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

basielcole avatar Oct 20 '22 05:10 basielcole

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

flying-sheep avatar Oct 20 '22 09:10 flying-sheep

Thank you for your swift response!

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

basielcole avatar Oct 20 '22 14:10 basielcole