Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
^\.github$
^INSTALLATION\.md$
^dev$
^cran-comments\.md$
16 changes: 10 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
Package: SelectSim
Title: Selected Events Linked by Evolutionary Conditions Across Human Tumors
Title: Selected Events Linked by Evolutionary Conditions in Cancer
Version: 0.1.6
Authors@R: c(
person("Arvind", "Iyer", , "ayalurarvind@gmail.com", role = c("aut", "cre"),
person("Arvind", "Iyer", , "ayalurarvind@gmail.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0002-8247-700X")),
person("Marco", "Mina", , "marco.mina.85@gmail.com", role = "aut"),
person("Miljan", "Petrovic", , "miljanpet93@gmail.com", role = "aut"),
person("Giovanni", "Ciriello", , "giovanni.ciriello@unil.ch", role = "aut",
person("Miljan", "Petrovic", , "miljanpet93@gmail.com", role = c("aut", "cph")),
person("Giovanni", "Ciriello", , "giovanni.ciriello@unil.ch", role = c("aut", "cph"),
comment = c(ORCID = "0000-0003-2021-8683"))
)
Description: This R package implements the SelectSim methodology to infer
co-mutations between functional alterations in cancer.
Description: Implements the 'SelectSim' methodology for identifying patterns of
co-occurrence and mutual exclusivity between functional genomic alterations
in cancer cohorts. The package processes mutation annotation data, constructs
alteration matrices, estimates expected alteration-pair frequencies, and
quantifies deviations associated with selective interactions. The methodology
is described in Iyer et al. (2026) <doi:10.1038/s41588-026-02661-4>.
License: MIT + file LICENSE
URL: https://csogroup.github.io/SelectSim/
BugReports: https://github.com/CSOgroup/SelectSim/issues
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2025
YEAR: 2026
COPYRIGHT HOLDER: SelectSim authors
16 changes: 8 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
* Expanded test coverage with `test-gam_utils.R`.
* Repository migrated: development moved from personal branches to [CSOgroup/SelectSim](https://github.com/CSOgroup/SelectSim); `dev` branch merged into `main` for initial public release.
* Bumped version to 0.1.6 across all source files
* Updated citation (`inst/CITATION`, `README`) to the published Nature Genetics article: Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026). Evolving patterns of co-mutations from tumor initiation to metastatic progression. *Nature Genetics*. doi:10.1038/s41588-026-02661-4
* Updated citation (`inst/CITATION`, `README`) to the published Nature Genetics article: Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026). Evolving patterns of co-mutations from tumor initiation to metastatic progression. *Nature Genetics*. DOI: 10.1038/s41588-026-02661-4

# SelectSim 0.0.1.3

* Added a `NEWS.md` file to track changes to the package.
* Rename the pacakge SelectSim to SelectSim by creating a new git folder.
* Create CSO group repositroy and move the code there.
* Created the website for github
* Renamed the package to SelectSim by creating a new Git repository.
* Created the CSOgroup repository and moved the code there.
* Created the GitHub website.

# SelectSim 0.0.1.4

* Added Mijan in author's list
* Remove C/C++ code dependecny to avoid installation diffculties in different systems.
* Hence move to using `Matrix` library functions and removed `RCpp` functions and code.
* Update the website and vignette accordingly.
* Added Mijan to the author list.
* Removed the C/C++ code dependency to avoid installation difficulties across systems.
* Moved to `Matrix` package functions and removed the `Rcpp` functions and compiled code.
* Updated the website and vignette accordingly.

# SelectSim 0.0.1.5

Expand Down
47 changes: 42 additions & 5 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Lung adenocarcinoma from TCGA cohort as SelectSim run object
#'
#' Pre-processed TCGA LUAD data ready to pass directly to \code{selectX()}.
#' Preprocessed TCGA LUAD data ready to pass directly to \code{selectX()}.
#'
#' @docType data
#' @keywords datasets
Expand All @@ -22,6 +22,13 @@
#' \item{alteration.class}{Named character vector of alteration-type annotations
#' (length = number of genes). Names are gene symbols.}
#' }
#'
#' @return A named list containing preprocessed LUAD input data for
#' \code{selectX()}.
#' @examples
#' data(luad_run_data)
#' names(luad_run_data)
#' str(luad_run_data, max.level = 1)
NULL


Expand All @@ -34,7 +41,13 @@ NULL
#' @keywords datasets
#' @name luad_result
#' @usage data(luad_result)
#' @format A dataframe
#' @format A data frame
#'
#' @return A data frame containing SelectSim results for the LUAD cohort.
#' @examples
#' data(luad_result)
#' dim(luad_result)
#' head(luad_result)
NULL


Expand All @@ -48,7 +61,13 @@ NULL
#' @keywords datasets
#' @name luad_maf
#' @usage data(luad_maf)
#' @format A dataframe
#' @format A data frame
#'
#' @return A data frame containing TCGA LUAD mutation data.
#' @examples
#' data(luad_maf)
#' dim(luad_maf)
#' head(luad_maf)
NULL


Expand All @@ -62,6 +81,12 @@ NULL
#' @name oncokb_genes
#' @usage data(oncokb_genes)
#' @format A list
#'
#' @return An object containing cancer-associated genes annotated by OncoKB.
#' @examples
#' data(oncokb_genes)
#' length(oncokb_genes)
#' head(oncokb_genes)
NULL


Expand All @@ -75,6 +100,12 @@ NULL
#' @name oncokb_truncating_genes
#' @usage data(oncokb_truncating_genes)
#' @format A list
#'
#' @return An object containing genes considered for truncating-mutation analyses.
#' @examples
#' data(oncokb_truncating_genes)
#' length(oncokb_truncating_genes)
#' head(oncokb_truncating_genes)
NULL


Expand All @@ -87,5 +118,11 @@ NULL
#' @keywords datasets
#' @name variant_catalogue
#' @usage data(variant_catalogue)
#' @format A dataframe
NULL
#' @format A data frame
#'
#' @return A data frame containing cancer-gene and variant annotations.
#' @examples
#' data(variant_catalogue)
#' dim(variant_catalogue)
#' head(variant_catalogue)
NULL
29 changes: 21 additions & 8 deletions R/gam_utils.r
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#' Mutation list object
#'
#' @export
#' @return A list containing the supported mutation-type classifications.
#' @examples
#' str(mutation_type)
mutation_type <- list(
"truncating" = c("Nonsense_Mutation", "Frame_Shift_Ins", "Frame_Shift_Del", "Splice_Site", "In_Frame_Ins", "In_Frame_Del"),
"missense" = c("Missense_Mutation", "Splice_Site"),
Expand All @@ -22,6 +25,9 @@ mutation_type <- list(
#' TCGA_maf_schema: schema for TCGA maf file to process the mutations
#'
#' @export
#' @return A list defining the expected TCGA MAF column schema.
#' @examples
#' str(TCGA_maf_schema)
TCGA_maf_schema <- list(
"name" = "TCGA_maf",
"column" = list(
Expand All @@ -43,6 +49,9 @@ TCGA_maf_schema <- list(
#' GENIE_maf_schema: schema for GENIE maf file to process the mutations
#'
#' @export
#' @return A list defining the expected GENIE MAF column schema.
#' @examples
#' str(GENIE_maf_schema)
GENIE_maf_schema <- list(
"column" = list(
"gene" = "Hugo_Symbol",
Expand All @@ -69,8 +78,8 @@ GENIE_maf_schema <- list(
#' @param maf a maf as dataframe
#' @param values a list containing the elements to filter
#' @param column column in maf file to filter
#' @param inclusive a boolena to include or exclude the dataframe with values in list provided
#' @param fixed a grep argument to specify if grep use the argumnet as string or not
#' @param inclusive a boolean to include or exclude the data frame with values in list provided
#' @param fixed a grep argument to specify if grep use the argument as string or not
#' @param ... Other options
#' @return filtered_maf a filtered maf file
#'
Expand Down Expand Up @@ -219,7 +228,7 @@ filter_maf_mutations <- function(maf, values, maf.col = c("Hugo_Symbol", "HGVSp_
#' `filter_maf_schema()` takes a maf file and filters a MAF dataframe by retaining only the rows with a column value included in the values list
#'
#' @param maf a maf as dataframe
#' @param schema a schema of datafrane check Select::TCGA_maf_schema for example
#' @param schema a data-frame schema; see `TCGA_maf_schema` for an example

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Describe schema as a list, not a data frame.

TCGA_maf_schema and GENIE_maf_schema are lists containing column mappings and mutation-type definitions. Calling them a “data-frame schema” is misleading for all four filtering helpers.

Proposed wording
-#' `@param` schema a data-frame schema; see `TCGA_maf_schema` for an example
+#' `@param` schema a schema list defining MAF column mappings and mutation classes;
+#'   see `TCGA_maf_schema` for an example

Also applies to: 258-258, 281-281, 304-304

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@R/gam_utils.r` at line 231, Update the `@param schema` documentation for all
four filtering helpers in `R/gam_utils.r` to describe `schema` as a list
containing column mappings and mutation-type definitions, rather than as a
data-frame schema. Keep the references to `TCGA_maf_schema` and equivalent
schema examples as appropriate.

#' @param column column in maf file to filter
#' @param values a list containing the elements to file
#' @param ... Other options
Expand All @@ -246,7 +255,7 @@ filter_maf_schema <- function(maf, schema = TCGA_maf_schema, column, values, ...
#' `filter_maf_truncating()` takes a maf file and filters a MAF dataframe by retaining only the rows with a column value included in the values list
#'
#' @param maf a maf as dataframe
#' @param schema a schema of datafrane check Select::TCGA_maf_schema for example
#' @param schema a data-frame schema; see `TCGA_maf_schema` for an example
#' @param ... Other options
#' @return filtered_maf a filtered maf file
#'
Expand All @@ -269,7 +278,7 @@ filter_maf_truncating <- function(maf, schema = TCGA_maf_schema, ...) {
#' `filter_maf_missense()` takes a maf file and filters a MAF dataframe by retaining only the rows with a column value included in the values list
#'
#' @param maf a maf as dataframe
#' @param schema a schema of datafrane check Select::TCGA_maf_schema for example
#' @param schema a data-frame schema; see `TCGA_maf_schema` for an example
#' @param ... Other options
#' @return filtered_maf a filtered maf file
#'
Expand All @@ -292,7 +301,7 @@ filter_maf_missense <- function(maf, schema = TCGA_maf_schema, ...) {
#' `filter_maf_ignore()` takes a maf file and filters a MAF dataframe by retaining only the rows with a column value included in the values list
#'
#' @param maf a maf as dataframe
#' @param schema a schema of datafrane check Select::TCGA_maf_schema for example
#' @param schema a data-frame schema; see `TCGA_maf_schema` for an example
#' @param ... Other options
#' @return filtered_maf a filtered maf file
#'
Expand All @@ -317,7 +326,7 @@ filter_maf_ignore <- function(maf, schema = TCGA_maf_schema, ...) {
#' `stat_maf_column()` takes a maf file and filters a MAF dataframe by retaining only the rows with a column value included in the values list
#'
#' @param maf a maf as dataframe
#' @param column a schema of datafrane check Select::TCGA_maf_schema for example
#' @param column a data-frame schema; see `TCGA_maf_schema` for an example

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document column as a column name.

stat_maf_column() uses maf[, column] and the example passes "Variant_Classification", so this parameter is not a data-frame schema.

Proposed wording
-#' `@param` column a data-frame schema; see `TCGA_maf_schema` for an example
+#' `@param` column column name in the MAF data frame to summarize
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#' @param column a data-frame schema; see `TCGA_maf_schema` for an example
#' `@param` column column name in the MAF data frame to summarize
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@R/gam_utils.r` at line 329, Update the roxygen documentation for the column
parameter of stat_maf_column() to describe it as a column name, matching its use
in maf[, column] and the string example "Variant_Classification"; remove the
incorrect data-frame schema and TCGA_maf_schema reference.

#' @param ... Other options
#' @return filtered_maf a filtered maf file
#'
Expand Down Expand Up @@ -386,7 +395,11 @@ stat_maf_gene <- function(maf, column = "Hugo_Symbol", ...) {
#'
#' @examples
#' data(luad_maf, package = "SelectSim")
#' gam <- maf2gam(luad_maf)
#' small_maf <- luad_maf[
#' luad_maf$Tumor_Sample_Barcode %in%
#' unique(luad_maf$Tumor_Sample_Barcode)[1:5],
#' ]
#' gam <- maf2gam(small_maf)
#' dim(gam)
#'
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/selectX_create.r
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ generateW_mean_tmb <- function(tmb,
if (!discrete) {
w <- 1 / (1 + lambda * (tmb.FC - tau))
}
W <- matrix(rep(w, ngenes), nrow = ngenes, byrow = T)
W <- matrix(rep(w, ngenes), nrow = ngenes, byrow = TRUE)
return(W)
}

Expand Down
4 changes: 2 additions & 2 deletions R/selectX_run.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Notes:
# - Better Error message and running text
# - Edge case: When sample size in less than 2 there is error in computation (need to fix a number to do this analysis)
# - parallel::makeCluster(2, setup_strategy = "sequential") a possible fix to remove the erorr of not able to connect problem (https://github.com/rstudio/rstudio/issues/6692)
# - parallel::makeCluster(2, setup_strategy = "sequential") a possible fix to remove the error of connection problem (https://github.com/rstudio/rstudio/issues/6692)
# - Try to fix the parallel processing issuses
###

Expand All @@ -27,7 +27,7 @@
#' @param sample.class sample covariates as named list.
#' @param alteration.class alteration covariates as named list.
#' @param n.cores no of cores.
#' @param min.freq number of samples for features to be atleast mutated in.
#' @param min.freq number of samples for features to be at least mutated in.
#' @param n.permut number of simulations.
#' @param lambda lambda parameter.
#' @param tau tau (fold change) parameter.
Expand Down
2 changes: 1 addition & 1 deletion R/selectX_stats.r
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ interaction.table <- function(al,
)
}
}
results <- results[order(abs(results$nES), decreasing = T), ]
results <- results[order(abs(results$nES), decreasing = TRUE), ]
results$type <- rep("ME", nrow(results))
results$type[results$nES > 0] <- "CO"
results$FDR <- results$nFDR2 <= maxFDR
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The method accounts for heterogeneous tumor types, tissue specificities, and dis

This package accompanies the manuscript:

> Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026). Evolving patterns of co-mutations from tumor initiation to metastatic progression. *Nature Genetics*. doi: [10.1038/s41588-026-02661-4](https://doi.org/10.1038/s41588-026-02661-4)
> Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026). Evolving patterns of co-mutations from tumor initiation to metastatic progression. *Nature Genetics*. DOI: [10.1038/s41588-026-02661-4](https://doi.org/10.1038/s41588-026-02661-4)

## Installation

Expand Down Expand Up @@ -78,7 +78,7 @@ Full documentation and vignettes are available at <https://csogroup.github.io/Se

If you use SelectSim in your research, please cite:

> Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026). Evolving patterns of co-mutations from tumor initiation to metastatic progression. *Nature Genetics*. doi: [10.1038/s41588-026-02661-4](https://doi.org/10.1038/s41588-026-02661-4)
> Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026). Evolving patterns of co-mutations from tumor initiation to metastatic progression. *Nature Genetics*. DOI: [10.1038/s41588-026-02661-4](https://doi.org/10.1038/s41588-026-02661-4)

You can also run `citation("SelectSim")` inside R for a formatted reference.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This package accompanies the manuscript:

> Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026).
> Evolving patterns of co-mutations from tumor initiation to metastatic
> progression. *Nature Genetics*. doi:
> progression. *Nature Genetics*. DOI:
> [10.1038/s41588-026-02661-4](https://doi.org/10.1038/s41588-026-02661-4)

## Installation
Expand All @@ -44,7 +44,7 @@ pak::pak("CSOgroup/SelectSim")
```

For more details on installation refer to
[INSTALLATION](INSTALLATION.md).
[INSTALLATION](https://github.com/CSOgroup/SelectSim/blob/main/INSTALLATION.md).

## Quick start

Expand Down Expand Up @@ -86,7 +86,7 @@ If you use SelectSim in your research, please cite:

> Iyer A, Petrovic M, Sesia D, Nanni L, Mina M, Ciriello G (2026).
> Evolving patterns of co-mutations from tumor initiation to metastatic
> progression. *Nature Genetics*. doi:
> progression. *Nature Genetics*. DOI:
> [10.1038/s41588-026-02661-4](https://doi.org/10.1038/s41588-026-02661-4)

You can also run `citation("SelectSim")` inside R for a formatted
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
38 changes: 38 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ALS
AMS
CMD
CSOgroup
EDs
LUAD
MAF
Mijan
Missense
NOTEs
Nanni
OncoKB
Pre
SFE
SelectX
Sesia
TCGA
TMB
TMBs
al
coloured
exclusivities
gam
gams
ggplot
grey
hotspot
labelled
maf
missense
ngenes
oncokb
penalise
selectX
specificities
tmb
tmbs
walkthrough
6 changes: 6 additions & 0 deletions man/GENIE_maf_schema.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading