https://github.com/angrymaciek/warlock
Warlock is a snakemake workflow to spawn multiple demons (deme-based oncology models) as jobs running around on a cluster environment 😈😈
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 7 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.8%) to scientific vocabulary
Keywords
Repository
Warlock is a snakemake workflow to spawn multiple demons (deme-based oncology models) as jobs running around on a cluster environment 😈😈
Basic Info
- Host: GitHub
- Owner: AngryMaciek
- License: apache-2.0
- Language: Python
- Default Branch: master
- Homepage: https://github.com/AngryMaciek/warlock
- Size: 284 KB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
warlock 🧙♂️
demon (deme-based oncology model) is a flexible framework for modelling intra-tumour population genetics with varied spatial structures and modes of cell dispersal. It is primarly designed for computational biologists and mathematicians who work in the field of ecology on a cellular level; investiaging mechanisms behind tumour evolution.
The following repository encapsulates demon into an automated and reproducible snakemake workflow in order to simplify parallel simulations to all users. Just as a regular warlock, it can spawn multiple demons (as cluster jobs), provided enough mystic powers (computational resources) are available.
Installation
The workflow is designed to run on Linux systems.
We have prepared a dedicated conda environment recipe which will contain all prerequisites required to execute the workflow. Thus Anaconda/Miniconda package manager is a natural dependency (see Appendix A for installation instructions.)
Clone the repository and navigate inside that directory
bash git clone https://github.com/AngryMaciek/warlock.git --recursive cd warlockNote: if you wish to compile a different version of demon (i.e. other branch) please remember to navigate to
resources/demon_modelfirst andgit checkouta proper branch of that repository.Create and activate conda environment
bash conda env create conda activate warlockCompile demon
bash g++ resources/demon_model/src/demon.cpp -o resources/demon_model/bin/demon -I$HOME/miniconda3/envs/warlock/include -lmNote: remember to adjust
miniconda3(and its path) in the command above, in case you have a different manager installed on your system. All in all, the point is to provide the include directory of yourwarlockenvironment to the compiler.demonanalysis is a custom R package developed specifically for post-processing of simulation results; it needs to be installed manually into the conda environment. ```bash
In order to use R from conda-forge one needs to set the following env variables, if unset:
LANG=enUS.UTF-8 LCALL=en_US.UTF-8
Install demonanalysis
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)" ```
Finally, feel free to verify the installation with a small test script
bash bash testscript.sh
Configuration
For a detailed description of all available simulation parameters please inspect GitHub repository of the core demon model.
These parameters are now required to be set inside a YAML-formatted pipeline configuration file. A template for this file is available here. Please see an example configuration file designed for the CI tests here. Note that multiple values for distinct parameters might be provided in lists. Current implementation of the workflow prepares a Cartesian product of all parameter's values and runs demon with each of them in parallel.
Additionally, please notice that two absolute paths are required to be set in the same configuration file: path to this cloned repository as well as path for the analyses output directory.
Execution
This workflow should be executed via a top-level bash script: warlock.sh which has the following description:
```
This is the main script to call the warlock workflow.
Available options:
-c/--configfile {XXX} (REQUIRED) Path to the snakemake config file.
-e/--environment {local/slurm} (REQUIRED) Environment to execute the workflow in: * local = execution on the local machine. * slurm = slurm cluster support.
-n/--cores {XXX} (OPTIONAL) Number of cores available for the workflow. (Default = 1) ```
Local
Example command for a local workflow execution:
bash warlock.sh --configfile {PATH} --environment local
Docker container
We have additionally prepared a development/execution Docker image which one may use in order to
run warlock in a fully encapsulated environment (that is, a container).
Assuming the Docker Engine is running locally please build the image with:
docker build -t warlock:latest .
To test the container one can execute the following bash command:
docker run --name warlock warlock bash -c "source ~/.bashrc; bash testscript.sh"
Finally, enter the container to start your work with:
docker run -it warlock:latest
Alternatively, please note that the image is also uploaded to DockerHub, one may download it with:
docker pull angrymaciek/warlock:latest
SLURM cluster
Example command for a cluster-supported workflow execution:
bash warlock.sh --configfile {PATH} --environment slurm
Please note that, depending on the complexity of the simulations, it might be required to adjust parameters for cluster jobs. If the expected required resources (memory or computation time) are high please adjust time and mem fields in the cluster submission configuration file, located at: /workflow/profiles/slurm/slurm-config.json.
Running large workflows with hundreds of cluster jobs might take very long; consider executing warlock in a terminal multiplexer, e.g. tmux.
Output
After each pipeline run the main output directory will contain four subdirectories: configfiles, simulations, analyses and logs. Each simulation run with a specific set of parameters is encoded by a 8-letter code. The first directory contains configuration files for each of the simulation runs; simulations contain all demon output files; analyses contains plots generated with demonanalysis; logs keep captured standard output and error streams for the commands. Feel free to run the pipeline and inspect the results yourself in an interactive jupyter notebook we prepared.
Community guidelines
For guidelines on how to contribute to the project or report issues, please see contributing instructions.
For other inquires feel free to contact project lead by email: ✉️
Citation
Results obtained with demon have already been published in:
Noble R, Burri D, Le Sueur C, Lemant J, Viossat Y, Kather JN, Beerenwinkel N. Spatial structure governs the mode of tumour evolution. Nat Ecol Evol. 2022 Feb;6(2):207-217. doi: https://doi.org/10.1038/s41559-021-01615-9
Noble R, Burley JT, Le Sueur C, Hochberg ME. When, why and how tumour clonal diversity predicts survival. Evol Appl. 2020 Jul 18;13(7):1558-1568. doi: https://doi.org/10.1111/eva.13057
Appendix A: Miniconda installation
To install the latest version of Miniconda on a Linux system please execute:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source .bashrc
For other platforms, see all available installers here.
Owner
- Name: Maciek Bąk
- Login: AngryMaciek
- Kind: user
- Location: London, UK
- Company: City, University of London
- Website: https://angrymaciek.github.io
- Twitter: angrymaciek
- Repositories: 42
- Profile: https://github.com/AngryMaciek
PhD in Computational Biology
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Dependencies
- actions/checkout v2 composite
- requarks/changelog-action v1 composite
- stefanzweifel/git-auto-commit-action v4 composite
- actions/checkout v2 composite
- kentaro-m/auto-assign-action v1.2.5 composite
- morrisoncole/pr-lint-action v1.7.0 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- continuumio/miniconda3 23.3.1-0 build
- boost-cpp 1.74.0.*
- compilers 1.4.2.*
- graphviz 2.42.3.*
- jinja2 3.1.2.*
- python 3.8.0.*
- pyyaml 6.0.*
- snakemake 7.18.2.*