Skip to content

Commit

Permalink
Add the new signature and update reference
Browse files Browse the repository at this point in the history
Add the PCAWG and TCGA signature matrix from BIB 2023. The new names of  them are "CNS_TCGA176" and "CNS_PCAWG176" to preventing confuse of "CNS_TCGA" from Nature2022. Update the description of function "sig_db"
  • Loading branch information
taoziyu97 committed Mar 17, 2023
1 parent 41a23cd commit 77d5c09
Show file tree
Hide file tree
Showing 26 changed files with 127 additions and 103 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Suggests:
roxygen2,
scales,
synchronicity,
testthat,
testthat (>= 3.0.0),
tibble,
UCSCXenaTools
LinkingTo:
Expand All @@ -95,3 +95,4 @@ LazyData: true
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd",
"roxytest::testthat_roclet"))
RoxygenNote: 7.2.3
Config/testthat/edition: 3
17 changes: 15 additions & 2 deletions R/get_sig_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
#' - SBS and RS (rearrangement) signatures from Nik lab 2020 Nature Cancer paper.
#' - RS signatures from BRCA560 and USARC cohorts.
#' - Copy number signatures from USARC cohort and TCGA.
#' - Copy number signatures from Liu lab 2023. It supports both PCAWG and TCGA cohort.
#' @inheritParams get_sig_similarity
#'
#' @return a `list`.
#' @export
#' @seealso [get_sig_similarity], [sig_fit] and [show_cosmic_sig_profile].
#' @references
#' - Steele, Christopher D., et al. "Signatures of copy number alterations in human cancer." bioRxiv (2021).
#' - Steele, Christopher D., et al. "Signatures of copy number alterations in human cancer." Nature 606.7916 (2022): 984-991.
#' - Alexandrov, Ludmil B., et al. "The repertoire of mutational signatures in human cancer." Nature 578.7793 (2020): 94-101.
#' - Steele, Christopher D., et al. "Undifferentiated sarcomas develop through distinct evolutionary pathways." Cancer Cell 35.3 (2019): 441-456.
#'
#' - Ziyu Tao, et al. "The repertoire of copy number alteration signatures in human cancer." Briefings in Bioinformatics (2023): bbad053.
#' @examples
#' s1 <- get_sig_db()
#' s2 <- get_sig_db("SBS")
Expand All @@ -33,6 +34,8 @@
#' s9 <- get_sig_db("RS_Nik_lab")
#' s10 <- get_sig_db("CNS_USARC")
#' s11 <- get_sig_db("CNS_TCGA")
#' s12 <- get_sig_db("CNS_TCGA176")
#' s13 <- get_sig_db("CNS_PCAWG176")
#' s1
#' s2
#' s3
Expand All @@ -44,6 +47,8 @@
#' s9
#' s10
#' s11
#' s12
#' s13
#' @testexamples
#' expect_is(s1, "list")
#' expect_is(s2, "list")
Expand All @@ -56,6 +61,8 @@
#' expect_is(s9, "list")
#' expect_is(s10, "list")
#' expect_is(s11, "list")
#' expect_is(s12, "list")
#' expect_is(s13, "list")
get_sig_db <- function(sig_db = "legacy") {
db_file <- switch(sig_db,
legacy = system.file("extdata", "legacy_signatures.RDs",
Expand Down Expand Up @@ -88,6 +95,12 @@ get_sig_db <- function(sig_db = "legacy") {
CNS_TCGA = system.file("extdata", "CNS_signatures_TCGA.rds",
package = "sigminer", mustWork = TRUE
),
CNS_TCGA176 = system.file("extdata","CNS_signatures_TCGA176.rds",
package = "sigminer", mustWork = TRUE
),
CNS_PCAWG176 = system.file("extdata", "CNS_signatures_PCAWG176.rds",
package = "sigminer", mustWork = TRUE
),
DBS = system.file("extdata", "DBS_signatures.rds",
package = "sigminer", mustWork = TRUE
),
Expand Down
9 changes: 6 additions & 3 deletions R/get_sig_similarity.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#' "SBS_Nik_lab", "RS_Nik_lab" to refer reference signatures from
#' Degasperi, Andrea, et al. (2020) (reference #2);
#' "RS_BRCA560", "RS_USARC" to reference signatures from BRCA560 and USARC cohorts;
#' "CNS_USARC" (40 categories), "CNS_TCGA" (48 categories) to reference copy number signatures from USARC cohort and TCGA.
#' "CNS_USARC" (40 categories), "CNS_TCGA" (48 categories) to reference copy number signatures from USARC cohort and TCGA;
#' "CNS_TCGA176" (176 categories) and "CNS_PCAWG176" (176 categories) to reference copy number signatures from PCAWG and TCGA separately.
#' **UPDATE**, the latest version of reference version can be automatically
#' downloaded and loaded from <https://cancer.sanger.ac.uk/signatures/downloads/>
#' when a option with `latest_` prefix is specified (e.g. "latest_SBS_GRCh37").
Expand Down Expand Up @@ -56,7 +57,7 @@
#'
#' Nik-Zainal, Serena, et al. "Landscape of somatic mutations in 560 breast cancer whole-genome sequences." Nature 534.7605 (2016): 47-54.
#'
#' Steele, Christopher D., et al. "Signatures of copy number alterations in human cancer." bioRxiv (2021).
#' Steele, Christopher D., et al. "Signatures of copy number alterations in human cancer." Nature 606.7916 (2022): 984-991.
#' @return a `list` containing smilarities, aetiologies if available, best match and RSS.
#' @export
#'
Expand Down Expand Up @@ -102,7 +103,9 @@ get_sig_similarity <- function(Signature, Ref = NULL,
sig_db = c(
"SBS", "legacy", "DBS", "ID", "TSB",
"SBS_Nik_lab", "RS_Nik_lab",
"RS_BRCA560", "RS_USARC", "CNS_USARC", "CNS_TCGA",
"RS_BRCA560", "RS_USARC",
"CNS_USARC", "CNS_TCGA",
"CNS_TCGA176","CNS_PCAWG176",
"SBS_hg19", "SBS_hg38", "SBS_mm9", "SBS_mm10",
"DBS_hg19", "DBS_hg38", "DBS_mm9", "DBS_mm10",
"SBS_Nik_lab_Organ", "RS_Nik_lab_Organ",
Expand Down
4 changes: 3 additions & 1 deletion R/sig_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ sig_fit <- function(catalogue_matrix,
sig_db = c(
"legacy", "SBS", "DBS", "ID", "TSB",
"SBS_Nik_lab", "RS_Nik_lab",
"RS_BRCA560", "RS_USARC", "CNS_USARC", "CNS_TCGA",
"RS_BRCA560", "RS_USARC",
"CNS_USARC", "CNS_TCGA",
"CNS_TCGA176","CNS_PCAWG176",
"SBS_hg19", "SBS_hg38", "SBS_mm9", "SBS_mm10",
"DBS_hg19", "DBS_hg38", "DBS_mm9", "DBS_mm10",
"SBS_Nik_lab_Organ", "RS_Nik_lab_Organ",
Expand Down
Loading

0 comments on commit 77d5c09

Please sign in to comment.