GAMBLR.results is an open-source package. It can be easily installed directly from GitHub:
devtools::install_github("morinlab/GAMBLR.results", repos = BiocManager::repositories())
This will install the GAMBLR.results package with all necessary dependencies. It requires access to the GSC resources and is not intended to be used outside of GSC. If you are interested in standalone functionality, please refer to the documentation of the GAMBLR.data package or any other individual child package.
If you have access to gphost, the easiest way to obtain and contribute to GAMBLR is to do this via cloning the repository
cd
git clone git@github.com:morinlab/GAMBLR.results.git
In your R editor of choice, set your working directory to the place you just cloned the repo.
setwd("~/GAMBLR.results")
Install the package in R by running the following command (requires the devtools package)
devtools::install()
As GAMBL users (GAMBLRs, so to speak) rely on the functionality of this package, the Master branch is protected. All commits must be submitted via pull request on a branch. Please refer to the GAMBL documentation for details on how to do this.
If you don't have access to gphost on GSC, no worries, you can still execute GAMBLR functions in another way. Remote support was developed for this purpose. This section explains how to run GAMBLR remote on a local machine (i.e on your own computer). There are two different approaches to get this to work, both with its own advantages and limitations. We will be going over both in this next section.
This section details how to deploy GAMBLR with limited functionality. This approach requires either a working GSC VPN connection (or is directly accessible if connected to the GSC network).
mkdir ~/git_repos
cd ~/git_repos #set as working directiory
git clone https://github.com/morinlab/gambl
git clone https://github.com/morinlab/GAMBLR
remote:
project_base: "/path/to/your/local/gambl_results_directory/"
repo_base: "/path/to/your/local/gambl_repo/"
setwd("~/git_repos/GAMBLR")
devtools::install()
library(GAMBLR)
Sys.setenv(R_CONFIG_ACTIVE = "remote")
Alternatively, you can add the content of ~/git_repos/GAMBLR/.Rprofile to your ~/.Rprofile
file. In this way, you do not need to enter the command above every time you start your R session (recommended).
cat ~/git_repos/GAMBLR/.Rprofile >> ~/.Rprofile
get_gambl_metadata()
to retrieve meta data for all gambl samples).get_gambl_metadata() %>%
head()
This section details how to obtain GAMBLR with full functionality, using a dedicated snake file to retrieve all necessary files and dependencies.
mkdir ~/git_repos
cd ~/git_repos
git clone https://github.com/morinlab/gambl
git clone https://github.com/morinlab/GAMBLR
mkdir ~/gambl_results/
remote
field to point to the recently cloned local gambl folder ( repo_base ) and recently created gambl_results folder ( project_base ). Also, update the host field to contain your username (you can use any gphost here). For example:remote:
project_base: "~/gambl_results/"
repo_base: "~/git_repos/gambl/"
...
host: "your_username@gphost01.bcgsc.ca"
config.yml
and get_gambl_results.smk
.cp ~/git_repos/GAMBLR/config.yml ~/gambl_results/
cp ~/git_repos/GAMBLR/get_gambl_results.smk ~/gambl_results/
export GSC_USERNAME="your_gsc_username"
export GSC_KEY="path_to_SSH_key_with_passphrase_from_step_1"
export GSC_PASSPHRASE="passpharase_from_step_1"
setwd("~/git_repos/GAMBLR")
devtools::install()
cd ~/gambl_results
conda env create --name snakemake_gambl --file ~/git_repos/GAMBLR/get_gambl_results.yml
conda activate snakemake_gambl
--cores 1
for this, since it seems to be the more stable option. In addition, if your sync gets interrupted, you only need restart the syncing of 1 file, compared to if you run on multiple cores.snakemake -s get_gambl_results.smk --cores 1
Sys.setenv(R_CONFIG_ACTIVE = "remote")
Alternatively, you can add the content of ~/git_repos/GAMBLR/.Rprofile to your ~/.Rprofile
file. In this way, you do not need to enter the command above every time you start your R session (recommended).
cat ~/git_repos/GAMBLR/.Rprofile >> ~/.Rprofile
check_gamblr_config()
get_gambl_metadata() %>%
head()
Note , if your seeing the following message when trying to use GAMBLR, please ensure that the config/gambl repo is set up properly (step 5 ) and that you are using the remote mode (step 13 ).
get_gambl_metadata(seq_type_filter = "capture") %>%
pull(cohort) %>%
table()
Error: '/projects/rmorin/projects/gambl-repos/gambl-rmorin/data/metadata/gambl_all_outcomes.tsv' does not exist.