ShixiangWang / sigminer

🌲 An easy-to-use and scalable toolkit for genomic alteration signature (a.k.a. mutational signature) analysis and visualization in R https://shixiangwang.github.io/sigminer/reference/index.html
https://shixiangwang.github.io/sigminer/
Other
141 stars 18 forks source link

Warning: Strategy 'multiprocess' is deprecated in future (>= 1.20.0) #425

Closed selkamand closed 1 year ago

selkamand commented 1 year ago

When run on copy number object, and using future versions above >= 1.20.0, sig_tally spams warnings about use of deprecated 'multiprocess' strategy.

Cause seems to be hardcoding of strategy in future::plan("multisession"). All other calls to plan use the set_future_strategy to automatically identify the relevant plan to use. Reprex below

library(sigminer)
#> sigminer version 2.2.0
#> - Star me at https://github.com/ShixiangWang/sigminer
#> - Run hello() to see usage and citation.

# Load copy number object
load(system.file("extdata", "toy_copynumber.RData",
                 package = "sigminer", mustWork = TRUE
))

# Use method designed by Wang, Shixiang et al.
cn_tally_W <- sig_tally(cn, method = "W")
#> ℹ [2023-02-17 15:42:59]: Started.
#> ℹ [2023-02-17 15:42:59]: Step: getting copy number features.
#> Warning: Strategy 'multiprocess' is deprecated in future (>= 1.20.0)
#> [2020-10-30]. Instead, explicitly specify either 'multisession' (recommended)
#> or 'multicore'. In the current R session, 'multiprocess' equals 'multisession'.
#> Warning: Detected creation of a 'multiprocess' future. Strategy 'multiprocess'
#> is deprecated in future (>= 1.20.0) [2020-10-30]. Instead, explicitly specify
#> either 'multisession' (recommended) or 'multicore'. In the current R session,
#> 'multiprocess' equals 'multisession'.
#> Warning in supportsMulticoreAndRStudio(...): [ONE-TIME WARNING] Forked
#> processing ('multicore') is not supported when running R from RStudio because
#> it is considered unstable. For more details, how to control forked processing
#> or not, and how to silence this warning in future R sessions, see
#> ?parallelly::supportsMulticore
#> Warning: Strategy 'multiprocess' is deprecated in future (>= 1.20.0)
#> [2020-10-30]. Instead, explicitly specify either 'multisession' (recommended)
#> or 'multicore'. In the current R session, 'multiprocess' equals 'multisession'.
#> Warning: Detected creation of a 'multiprocess' future. Strategy 'multiprocess'
#> is deprecated in future (>= 1.20.0) [2020-10-30]. Instead, explicitly specify
#> either 'multisession' (recommended) or 'multicore'. In the current R session,
#> 'multiprocess' equals 'multisession'.
#> Warning: Strategy 'multiprocess' is deprecated in future (>= 1.20.0)
#> [2020-10-30]. Instead, explicitly specify either 'multisession' (recommended)
#> or 'multicore'. In the current R session, 'multiprocess' equals 'multisession'.
#> ℹ [2023-02-17 15:43:00]: Getting breakpoint count per 10 Mb...
#> ℹ [2023-02-17 15:43:00]: Getting breakpoint count per chromosome arm...
#> ℹ [2023-02-17 15:43:00]: Getting copy number...
#> ℹ [2023-02-17 15:43:00]: Getting change-point copy number change...
#> ℹ [2023-02-17 15:43:00]: Getting length of chains of oscillating copy number...
#> ℹ [2023-02-17 15:43:01]: Getting (log10 based) segment size...
#> ℹ [2023-02-17 15:43:01]: Getting the minimal number of chromosome with 50% CNV...
#> ℹ [2023-02-17 15:43:01]: Getting burden of chromosome...
#> ✔ [2023-02-17 15:43:01]: Gotten.
#> ℹ [2023-02-17 15:43:01]: Step: generating copy number components.
#> ✔ [2023-02-17 15:43:01]: `feature_setting` checked.
#> ℹ [2023-02-17 15:43:01]: Step: counting components.
#> ✔ [2023-02-17 15:43:02]: Counted.
#> ℹ [2023-02-17 15:43:02]: Step: generating components by sample matrix.
#> ✔ [2023-02-17 15:43:02]: Matrix generated.
#> ℹ [2023-02-17 15:43:02]: 2.179 secs elapsed.

Created on 2023-02-17 by the reprex package (v2.0.1)