RESOLVE
R
packageCancer is a genetic disease caused by somatic mutations in genes controlling key biological functions such as cellular growth and division. Such mutations may arise both through cell-intrinsic and exogenous processes, generating characteristic mutational patterns over the genome named mutational signatures. The study of mutational signatures have become a standard component of modern genomics studies, since it can reveal which (environmental and endogenous) mutagenic processes are active in a tumor, and may highlight markers for therapeutic response.
Mutational signatures computational analyses fall mostly within two categories: (i) de novo signatures extraction and (ii) signatures exposure estimation. In the first case, the presence of mutational processes is first assessed from the data, signatures are identified and extracted and finally assigned to samples. This task is typically performed by Non-Negative Matrix Factorization (NMF). While other approaches have been proposed, NMF-based methods are by far the most used. The estimation of signatures exposures is performed by holding a set of signatures fixed (see, e.g., COSMIC mutational signatures catalogue) and assigning them to samples by minimizing, e.g., mean squared error between observed and estimated mutational patterns for each sample.
However, available mutational signatures computational tools presents many pitfalls. First, the task of determining the number of signatures is very complex and depends on heuristics. Second, several signatures have no clear etiology, casting doubt on them being computational artifacts rather than due to mutagenic processes. Last, approaches for signatures assignment are greatly influenced by the set of signatures used for the analysis. To overcome these limitations, we developed RESOLVE (Robust EStimation Of mutationaL signatures Via rEgularization), a framework that allows the efficient extraction and assignment of mutational signatures.
The RESOLVE R package implements a new de novo signatures extraction algorithm, which employs a regularized Non-Negative Matrix Factorization procedure. The method incorporates a background signature during the inference step and adopts elastic net regression to reduce the impact of overfitting. The estimation of the optimal number of signatures is performed by bi-cross-validation. Furthermore, the package also provide a procedure for confidence estimation of signatures activities in samples.
As such, RESOLVE represents an addition to other Bioconductor packages, such as, e.g., SparseSignatures, MutationalPatterns, musicatk among others, that implements a novel approach for detecting mutational signatures.
In this vignette, we give an overview of the package by presenting some of its main functions.
The RESOLVE package can be installed from Bioconductor as follow.
We now present some of the main features of the package. We notice that the package supports different types of mutational signatures such as: SBS (single base substitutions) and MNV (multi-nucleotide variant) (see Degasperi, Andrea, et al. “Substitution mutational signatures in whole-genome–sequenced cancers in the UK population.” Science 376.6591 (2022): abl9283), CX (chromosomal instability) (see Drews, Ruben M., et al. “A pan-cancer compendium of chromosomal instability.” Nature 606.7916 (2022): 976-983) and CN (copy number) signatures (see Steele, Christopher D., et al. “Signatures of copy number alterations in human cancer.” Nature 606.7916 (2022): 984-991). But, for the sake of this vignette, we present only results on the classical SBS signatures. We refer to the manual for details.
First, we show how to load example data and import them into a count matrix to perform the signatures analysis.
## Warning: multiple methods tables found for 'union'
## Warning: multiple methods tables found for 'intersect'
## Warning: multiple methods tables found for 'setdiff'
These data are a reduced version of the 560 breast tumors provided by Nik-Zainal, Serena, et al. (2016) comprising only 3 patients. We notice that these data are provided purely as an example, and, as they are a reduced and partial version of the original dataset, they should not be used to draw any biological conclusion.
We now import such data into a count matrix to perform the signatures discovery. To do so, we also need to specify the reference genome as a BSgenome object to be considered. This can be done as follows, where in the example we used hs37d5 as reference genome as provided as data object within the package.
library("BSgenome.Hsapiens.1000genomes.hs37d5")
imported_data = getSBSCounts(data = ssm560_reduced, reference = BSgenome.Hsapiens.1000genomes.hs37d5)
Now, we present an example of visualization feature provided by the package, showing the counts for the first patient, i.e., PD10010a, in the following plot.
After the data are loaded, we can perform signatures de novo extraction. To do so, we need to define a range for the number of signatures (variable K) to be considered. We now show how to perform the inference on the dataset from Nik-Zainal, Serena, et al. (2016), whose counts are provided within the package.
data(background)
data(patients)
set.seed(12345)
res_denovo = signaturesDecomposition(x = patients,
K = 1:15,
background_signature = background,
nmf_runs = 100,
num_processes = 50)
We notice that this function can be also used to perform de novo estimation for other types of mutational signatures, such as SBS, MNV, CX and CN.
Now that we have performed the de novo inferece, we need to decide the optimal number of signatures to be extracted from our dataset. To do so, we provide a procedure based on cross-validation.
set.seed(12345)
res_cv = signaturesCV(x = patients,
beta = res_denovo$beta,
cross_validation_repetitions = 100,
num_processes = 50)
We notice that the computations for this task can be very time consuming, expecially when many iterations of cross validations are performed (see manual) and a large set of configurations of the parameters are tested.
We refer to the manual for a detailed description of each parameter and to the RESOLVE manuscript for details on the method.
## R version 4.4.2 (2024-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] BSgenome.Hsapiens.1000genomes.hs37d5_0.99.1
## [2] BSgenome_1.75.0
## [3] rtracklayer_1.67.0
## [4] BiocIO_1.17.0
## [5] Biostrings_2.75.1
## [6] XVector_0.47.0
## [7] GenomicRanges_1.59.0
## [8] GenomeInfoDb_1.43.1
## [9] IRanges_2.41.1
## [10] S4Vectors_0.45.2
## [11] RESOLVE_1.9.0
## [12] Biobase_2.67.0
## [13] BiocGenerics_0.53.3
## [14] generics_0.1.3
## [15] BiocStyle_2.35.0
##
## loaded via a namespace (and not attached):
## [1] bitops_1.0-9 gridExtra_2.3
## [3] rlang_1.1.4 magrittr_2.0.3
## [5] gridBase_0.4-7 matrixStats_1.4.1
## [7] compiler_4.4.2 vctrs_0.6.5
## [9] reshape2_1.4.4 ggalluvial_0.12.5
## [11] stringr_1.5.1 pkgconfig_2.0.3
## [13] shape_1.4.6.1 crayon_1.5.3
## [15] fastmap_1.2.0 labeling_0.4.3
## [17] utf8_1.2.4 Rsamtools_2.23.0
## [19] rmarkdown_2.29 pracma_2.4.4
## [21] UCSC.utils_1.3.0 xfun_0.49
## [23] glmnet_4.1-8 zlibbioc_1.52.0
## [25] cachem_1.1.0 jsonlite_1.8.9
## [27] SnowballC_0.7.1 DelayedArray_0.33.2
## [29] BiocParallel_1.41.0 parallel_4.4.2
## [31] cluster_2.1.6 R6_2.5.1
## [33] bslib_0.8.0 stringi_1.8.4
## [35] RColorBrewer_1.1-3 jquerylib_0.1.4
## [37] Rcpp_1.0.13-1 SummarizedExperiment_1.37.0
## [39] iterators_1.0.14 knitr_1.49
## [41] Matrix_1.7-1 splines_4.4.2
## [43] nnls_1.6 tidyselect_1.2.1
## [45] abind_1.4-8 yaml_2.3.10
## [47] doParallel_1.0.17 codetools_0.2-20
## [49] curl_6.0.1 lattice_0.22-6
## [51] tibble_3.2.1 plyr_1.8.9
## [53] withr_3.0.2 evaluate_1.0.1
## [55] survival_3.7-0 MutationalPatterns_3.17.0
## [57] pillar_1.9.0 lsa_0.73.3
## [59] BiocManager_1.30.25 MatrixGenerics_1.19.0
## [61] rngtools_1.5.2 foreach_1.5.2
## [63] RCurl_1.98-1.16 ggplot2_3.5.1
## [65] munsell_0.5.1 scales_1.3.0
## [67] NMF_0.28 RhpcBLASctl_0.23-42
## [69] glue_1.8.0 maketools_1.3.1
## [71] tools_4.4.2 sys_3.4.3
## [73] data.table_1.16.2 GenomicAlignments_1.43.0
## [75] registry_0.5-1 buildtools_1.0.0
## [77] XML_3.99-0.17 grid_4.4.2
## [79] colorspace_2.1-1 GenomeInfoDbData_1.2.13
## [81] restfulr_0.0.15 cli_3.6.3
## [83] fansi_1.0.6 S4Arrays_1.7.1
## [85] dplyr_1.1.4 gtable_0.3.6
## [87] sass_0.4.9 digest_0.6.37
## [89] SparseArray_1.7.2 farver_2.1.2
## [91] rjson_0.2.23 htmltools_0.5.8.1
## [93] lifecycle_1.0.4 httr_1.4.7