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
4 changes: 0 additions & 4 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@
^pkgdown$
^\.github$
^INSTALLATION\.md$
^environment\.yml$
^CONTRIBUTING\.md$
^CODE_OF_CONDUCT\.md$
^dev$
^cran-comments\.md$
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.ipynb_checkpoints
inst/doc
docs/
*.tar.gz
src/*.so
src/*.o
.*
!/.gitignore
!/.github
149 changes: 117 additions & 32 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,133 @@
## Installation
# Installation

- You can install the development version of SelectSim from
[GitHub](https://github.com/CSOgroup/SelectSim) with:
## Prerequisites

``` r
SelectSim requires **R ≥ 3.5** and includes compiled C++ code via `Rcpp` and `RcppArmadillo`.
Before installing, make sure you have a working C++ compiler:

- **macOS** — Install Xcode Command Line Tools: `xcode-select --install`
- **Linux** — Install build tools, e.g. on Ubuntu/Debian: `sudo apt install build-essential`
- **Windows** — Install [Rtools](https://cran.r-project.org/bin/windows/Rtools/) and ensure it is on your PATH

---

## Option 1 — Install from GitHub (standard)

Install directly from GitHub using `pak`:

```r
# install.packages("pak")
pak::pak("CSOgroup/SelectSim")
```

Or using `devtools` (legacy):

```r
# install.packages("devtools")
devtools::install_github("CSOgroup/SelectSim",dependencies = TRUE, build_vignettes = TRUE)
devtools::install_github("CSOgroup/SelectSim", dependencies = TRUE, build_vignettes = TRUE)
```

## Installation with micromamba enviorment (prefered)
---

## Option 2 — Install with micromamba (recommended)

`micromamba` is a tiny version of the mamba package manager (Like Conda). Refer [website](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) for it's installation guide.
[micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) provides a fully isolated, reproducible R environment. This is the **recommended approach** if you are on a shared server, HPC cluster, or want to avoid conflicts with your existing R installation.

Steps to follow after installing micromamba in a terminal:
### Step 1 — Install micromamba

`micromamba create -n r_env`\
`micromamba activate r_env`\
`micromamba install conda-forge::r-base`\
`micromamba install conda-forge::r-essentials`\
`micromamba install conda-forge::r-devtools`\
`micromamba install conda-forge::r-pak`\
`micromamba install conda-forge::cmake`\
`micromamba install conda-forge::r-rcppparallel`\
`micromamba install conda-forge::r-rfast`
Follow the [official micromamba installation guide](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) for your platform.

- After this run R and install `SelectSim` R package as follows
``` r
# install.packages("devtools")
devtools::install_github("CSOgroup/SelectSim",dependencies = TRUE, build_vignettes = TRUE)
### Step 2 — Create and activate an R environment

```bash
micromamba create -n r_env
micromamba activate r_env
```
OR
``` r
library('pak')
pak::pkg_install('CSOgroup/SelectSim')

### Step 3 — Install R and required system dependencies

```bash
micromamba install \
conda-forge::r-base \
conda-forge::r-essentials \
conda-forge::r-devtools \
conda-forge::r-pak \
conda-forge::cmake \
conda-forge::r-rcppparallel \
conda-forge::r-rfast
```

Alternative way install with provided [`enviorment.yml`](enviorment.yml) file.
### Step 4 — Install SelectSim inside R

`micromamba create -f enviorment.yml`\
`micromamba activate r_env`
- After this run R and install `SelectSim` R package as follows
``` r
# install.packages("devtools")
devtools::install_github("CSOgroup/SelectSim",dependencies = TRUE, build_vignettes = TRUE)
```r
# install.packages("pak")
pak::pak("CSOgroup/SelectSim")
```

---

## Option 3 — Restore the exact development environment

A fully pinned conda environment file is provided at [`dev/environment.yml`](dev/environment.yml).
This reproduces the exact software stack (R version, all system libraries) used during development.

```bash
micromamba create -f dev/environment.yml
micromamba activate r_env
```

Then install SelectSim:

```r
pak::pak("CSOgroup/SelectSim")
```

> **Note:** The environment file pins exact package versions and is Linux-specific (linux-64).
> It may not work on macOS or Windows.

---

## Verifying the installation

After installing, confirm everything works with a quick test run:

```r
library(SelectSim)
data(luad_run_data, package = "SelectSim")

result <- selectX(
M = luad_run_data$M,
sample.class = luad_run_data$sample.class,
alteration.class = luad_run_data$alteration.class,
n.cores = 1,
min.freq = 10,
n.permut = 10 # small number for a quick smoke test
)
```

A successful run returns a list with a `result` data frame of evolutionary dependencies.
For a full analysis, use `n.permut = 1000` or higher.

---

## Troubleshooting

**`rfast` fails to install**
`rfast` requires a Fortran compiler.
On macOS, install `gfortran` from [mac.r-project.org/tools](https://mac.r-project.org/tools/).
On Linux, install via your package manager (e.g. `sudo apt install gfortran`).
With micromamba, `conda-forge::r-rfast` handles this automatically.

**Vignettes not building**
Ensure `pandoc` is installed (`pandoc --version` in a terminal).
Install via `brew install pandoc` (macOS), `sudo apt install pandoc` (Linux), or through the micromamba environment (`conda-forge::pandoc`).

**Compilation errors on Windows**
Ensure Rtools is installed and its `bin/` directory is on your PATH.
Run `pkgbuild::check_build_tools()` in R to verify your toolchain is detected correctly.

**Vignettes missing after install**
`pak::pak()` does not build vignettes by default. If you need the vignettes locally, use:
```r
devtools::install_github("CSOgroup/SelectSim", dependencies = TRUE, build_vignettes = TRUE)
```
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ This package accompanies the manuscript:
You can install the development version of SelectSim from [GitHub](https://github.com/CSOgroup/SelectSim) with:

``` r
# install.packages("devtools")
devtools::install_github("CSOgroup/SelectSim", dependencies = TRUE, build_vignettes = TRUE)
# install.packages("pak")
pak::pak("CSOgroup/SelectSim")
```

For more details on installation refer to [INSTALLATION](INSTALLATION.md).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ You can install the development version of SelectSim from
[GitHub](https://github.com/CSOgroup/SelectSim) with:

``` r
# install.packages("devtools")
devtools::install_github("CSOgroup/SelectSim", dependencies = TRUE, build_vignettes = TRUE)
# install.packages("pak")
pak::pak("CSOgroup/SelectSim")
```

For more details on installation refer to
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion man/GENIE_maf_schema.Rd

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

2 changes: 1 addition & 1 deletion man/TCGA_maf_schema.Rd

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

2 changes: 1 addition & 1 deletion man/add.Rd

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

2 changes: 1 addition & 1 deletion man/al.pairwise.alteration.stats.Rd

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

2 changes: 1 addition & 1 deletion man/al.stats.Rd

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

2 changes: 1 addition & 1 deletion man/am.pairwise.alteration.coverage.Rd

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

2 changes: 1 addition & 1 deletion man/am.pairwise.alteration.overlap.Rd

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

2 changes: 1 addition & 1 deletion man/am.stats.Rd

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

2 changes: 1 addition & 1 deletion man/am.weight.pairwise.alteration.overlap.Rd

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

2 changes: 1 addition & 1 deletion man/binary.yule.Rd

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

2 changes: 1 addition & 1 deletion man/effectSize.Rd

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

2 changes: 1 addition & 1 deletion man/estimateFDR2.Rd

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

2 changes: 1 addition & 1 deletion man/estimate_p_val.Rd

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

2 changes: 1 addition & 1 deletion man/estimate_pairwise_p.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_column.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_complex.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_gene.name.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_ignore.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_missense.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_mutation.type.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_mutations.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_sample.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_schema.Rd

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

2 changes: 1 addition & 1 deletion man/filter_maf_truncating.Rd

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

2 changes: 1 addition & 1 deletion man/generateS.Rd

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

2 changes: 1 addition & 1 deletion man/generateW_block.Rd

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

2 changes: 1 addition & 1 deletion man/generateW_mean_tmb.Rd

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

Loading
Loading