Oncodrive3D 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oncodrive3d-1.0.4/.gitignore +197 -0
- oncodrive3d-1.0.4/.python-version +1 -0
- oncodrive3d-1.0.4/Dockerfile +67 -0
- oncodrive3d-1.0.4/LICENSE +15 -0
- oncodrive3d-1.0.4/PKG-INFO +333 -0
- oncodrive3d-1.0.4/README.md +298 -0
- oncodrive3d-1.0.4/docs/build_output.md +13 -0
- oncodrive3d-1.0.4/docs/run_input_output.md +246 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/conf/base.config +39 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/conf/test.config +28 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/main.nf +11 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/modules/o3d_chimerax_plot.nf +38 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/modules/o3d_plot.nf +46 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/modules/o3d_run.nf +41 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/nextflow.config +147 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/validation.nf +82 -0
- oncodrive3d-1.0.4/oncodrive3d_pipeline/workflows/oncodrive3d.nf +78 -0
- oncodrive3d-1.0.4/pyproject.toml +78 -0
- oncodrive3d-1.0.4/scripts/__init__.py +2 -0
- oncodrive3d-1.0.4/scripts/clustering_3d.code-workspace +7 -0
- oncodrive3d-1.0.4/scripts/datasets/__init__.py +0 -0
- oncodrive3d-1.0.4/scripts/datasets/af_merge.py +344 -0
- oncodrive3d-1.0.4/scripts/datasets/build_datasets.py +125 -0
- oncodrive3d-1.0.4/scripts/datasets/get_pae.py +78 -0
- oncodrive3d-1.0.4/scripts/datasets/get_structures.py +107 -0
- oncodrive3d-1.0.4/scripts/datasets/model_confidence.py +97 -0
- oncodrive3d-1.0.4/scripts/datasets/parse_pae.py +64 -0
- oncodrive3d-1.0.4/scripts/datasets/prob_contact_maps.py +258 -0
- oncodrive3d-1.0.4/scripts/datasets/seq_for_mut_prob.py +900 -0
- oncodrive3d-1.0.4/scripts/datasets/utils.py +394 -0
- oncodrive3d-1.0.4/scripts/globals.py +169 -0
- oncodrive3d-1.0.4/scripts/main.py +650 -0
- oncodrive3d-1.0.4/scripts/plotting/__init__.py +0 -0
- oncodrive3d-1.0.4/scripts/plotting/build_annotations.py +102 -0
- oncodrive3d-1.0.4/scripts/plotting/chimerax_plot.py +251 -0
- oncodrive3d-1.0.4/scripts/plotting/pdb_tool.py +149 -0
- oncodrive3d-1.0.4/scripts/plotting/pfam.py +94 -0
- oncodrive3d-1.0.4/scripts/plotting/plot.py +2484 -0
- oncodrive3d-1.0.4/scripts/plotting/stability_change.py +184 -0
- oncodrive3d-1.0.4/scripts/plotting/uniprot_feat.py +276 -0
- oncodrive3d-1.0.4/scripts/plotting/utils.py +594 -0
- oncodrive3d-1.0.4/scripts/run/__init__.py +0 -0
- oncodrive3d-1.0.4/scripts/run/clustering.py +749 -0
- oncodrive3d-1.0.4/scripts/run/communities.py +53 -0
- oncodrive3d-1.0.4/scripts/run/miss_mut_prob.py +206 -0
- oncodrive3d-1.0.4/scripts/run/mutability.py +289 -0
- oncodrive3d-1.0.4/scripts/run/pvalues.py +91 -0
- oncodrive3d-1.0.4/scripts/run/score_and_simulations.py +155 -0
- oncodrive3d-1.0.4/scripts/run/utils.py +461 -0
- oncodrive3d-1.0.4/test/input/maf/TCGA_WXS_ACC.in.maf +5678 -0
- oncodrive3d-1.0.4/test/input/maf/TCGA_WXS_PAAD.in.maf +7925 -0
- oncodrive3d-1.0.4/test/input/mut_profile/TCGA_WXS_ACC.sig.json +194 -0
- oncodrive3d-1.0.4/test/input/mut_profile/TCGA_WXS_PAAD.sig.json +194 -0
- oncodrive3d-1.0.4/test/input/vep/TCGA_WXS_ACC.vep.tsv.gz +0 -0
- oncodrive3d-1.0.4/test/input/vep/TCGA_WXS_PAAD.vep.tsv.gz +0 -0
- oncodrive3d-1.0.4/uv.lock +1553 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
#build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
bdist.linux-x86_64
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
103
|
+
#poetry.lock
|
|
104
|
+
|
|
105
|
+
# pdm
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
107
|
+
#pdm.lock
|
|
108
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
109
|
+
# in version control.
|
|
110
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
111
|
+
.pdm.toml
|
|
112
|
+
|
|
113
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
114
|
+
__pypackages__/
|
|
115
|
+
|
|
116
|
+
# Celery stuff
|
|
117
|
+
celerybeat-schedule
|
|
118
|
+
celerybeat.pid
|
|
119
|
+
|
|
120
|
+
# SageMath parsed files
|
|
121
|
+
*.sage.py
|
|
122
|
+
|
|
123
|
+
# Environments
|
|
124
|
+
.env
|
|
125
|
+
.venv
|
|
126
|
+
env/
|
|
127
|
+
venv/
|
|
128
|
+
ENV/
|
|
129
|
+
env.bak/
|
|
130
|
+
venv.bak/
|
|
131
|
+
|
|
132
|
+
# Spyder project settings
|
|
133
|
+
.spyderproject
|
|
134
|
+
.spyproject
|
|
135
|
+
|
|
136
|
+
# Rope project settings
|
|
137
|
+
.ropeproject
|
|
138
|
+
|
|
139
|
+
# mkdocs documentation
|
|
140
|
+
/site
|
|
141
|
+
|
|
142
|
+
# mypy
|
|
143
|
+
.mypy_cache/
|
|
144
|
+
.dmypy.json
|
|
145
|
+
dmypy.json
|
|
146
|
+
|
|
147
|
+
# Pyre type checker
|
|
148
|
+
.pyre/
|
|
149
|
+
|
|
150
|
+
# pytype static type analyzer
|
|
151
|
+
.pytype/
|
|
152
|
+
|
|
153
|
+
# Cython debug symbols
|
|
154
|
+
cython_debug/
|
|
155
|
+
|
|
156
|
+
# PyCharm
|
|
157
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
158
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
159
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
160
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
161
|
+
#.idea/
|
|
162
|
+
|
|
163
|
+
# Oncodrive3D
|
|
164
|
+
dataset*
|
|
165
|
+
!scripts/datasets
|
|
166
|
+
backups
|
|
167
|
+
results
|
|
168
|
+
output
|
|
169
|
+
tests/results/*
|
|
170
|
+
tests/output/*
|
|
171
|
+
tests/normal_tests
|
|
172
|
+
scripts/test.qmap
|
|
173
|
+
scripts/run_*
|
|
174
|
+
scripts/submit*
|
|
175
|
+
guidelines.txt
|
|
176
|
+
|
|
177
|
+
# Nextflow
|
|
178
|
+
work
|
|
179
|
+
report*
|
|
180
|
+
timeline*
|
|
181
|
+
trace*
|
|
182
|
+
*.log
|
|
183
|
+
.nextflow*
|
|
184
|
+
run_*
|
|
185
|
+
!run_input_output.md
|
|
186
|
+
|
|
187
|
+
# Containers
|
|
188
|
+
*.def
|
|
189
|
+
*.simg
|
|
190
|
+
*.sif
|
|
191
|
+
.gitignore
|
|
192
|
+
|
|
193
|
+
# VSC
|
|
194
|
+
launch.json
|
|
195
|
+
.vscode
|
|
196
|
+
|
|
197
|
+
test/outputs*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
FROM ghcr.io/astral-sh/uv:0.5-python3.10-bookworm AS build-stage
|
|
2
|
+
|
|
3
|
+
# Set environment variables
|
|
4
|
+
ENV UV_COMPILE_BYTECODE=1 \
|
|
5
|
+
BBGLAB_HOME="/home/user/.config/bbglab/"
|
|
6
|
+
|
|
7
|
+
# Set the working directory to /oncodrive3d
|
|
8
|
+
WORKDIR /oncodrive3d
|
|
9
|
+
|
|
10
|
+
# Stage necessary files into the container
|
|
11
|
+
COPY uv.lock uv.lock
|
|
12
|
+
COPY pyproject.toml pyproject.toml
|
|
13
|
+
COPY scripts scripts
|
|
14
|
+
COPY README.md README.md
|
|
15
|
+
|
|
16
|
+
# Install dependencies and build the project
|
|
17
|
+
RUN mkdir -p /root/.cache/uv \
|
|
18
|
+
&& uv sync --frozen --no-dev \
|
|
19
|
+
&& uv build
|
|
20
|
+
|
|
21
|
+
# Second stage: Runtime image
|
|
22
|
+
FROM python:3.10-buster AS runtime-stage
|
|
23
|
+
|
|
24
|
+
# Set environment variables
|
|
25
|
+
ENV BGDATA_LOCAL="/bgdatacache" \
|
|
26
|
+
BBGLAB_HOME="/home/user/.config/bbglab/"
|
|
27
|
+
|
|
28
|
+
# Copy oncodrive3d from the build stage
|
|
29
|
+
COPY --from=build-stage /oncodrive3d/dist /oncodrive3d/dist
|
|
30
|
+
WORKDIR /oncodrive3d
|
|
31
|
+
|
|
32
|
+
# Install oncodrive3d
|
|
33
|
+
RUN pip install dist/*.tar.gz
|
|
34
|
+
|
|
35
|
+
# Create required directories
|
|
36
|
+
RUN install -d -m 0755 "$BGDATA_LOCAL" "$BBGLAB_HOME"
|
|
37
|
+
|
|
38
|
+
# Write bgdata configuration
|
|
39
|
+
RUN echo "# Version of the bgdata config file\n\
|
|
40
|
+
version = 2\n\
|
|
41
|
+
\n\
|
|
42
|
+
# The default local folder to store the data packages\n\
|
|
43
|
+
local_repository = \"$BGDATA_LOCAL\"\n\
|
|
44
|
+
\n\
|
|
45
|
+
# The remote URL to download the data packages\n\
|
|
46
|
+
remote_repository = \"https://bbglab.irbbarcelona.org/bgdata\"\n\
|
|
47
|
+
\n\
|
|
48
|
+
# If you want to force bgdata to work only locally\n\
|
|
49
|
+
# offline = True\n\
|
|
50
|
+
\n\
|
|
51
|
+
# Cache repositories\n\
|
|
52
|
+
[cache_repositories]" > "$BBGLAB_HOME/bgdatav2.conf"
|
|
53
|
+
|
|
54
|
+
# Pre-fetch and prepare genome data
|
|
55
|
+
RUN apt-get update && apt-get install -y curl \
|
|
56
|
+
&& pip install bgdata bgreference \
|
|
57
|
+
&& bgdata get datasets/genomereference/hg38 \
|
|
58
|
+
&& bgdata get datasets/genomereference/mm39 \
|
|
59
|
+
&& python3 -c "from bgreference import hg38; hg38(1, 1300000, 3000)" \
|
|
60
|
+
&& python3 -c "from bgreference import mm39; mm39(1, 1300000, 3000)" \
|
|
61
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
62
|
+
|
|
63
|
+
# Set permissions for cache directory
|
|
64
|
+
RUN chmod -R 0755 "$BGDATA_LOCAL"
|
|
65
|
+
|
|
66
|
+
# Set entrypoint (optional)
|
|
67
|
+
CMD ["python3"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Oncodrive3D is the property of the Institute for Research in Biomedicine (IRB Barcelona), which hold the copyright thereto.
|
|
2
|
+
Copyright (C) 2024 Institute for Research in Biomedicine (IRB Barcelona)
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Oncodrive3D
|
|
3
|
+
Version: 1.0.4
|
|
4
|
+
Summary: Oncodrive3D is a method designed to analyse patterns of somatic mutations across tumors to identify three-dimensional (3D) clusters of missense mutations and detect genes that are under positive selection.
|
|
5
|
+
Project-URL: Homepage, https://github.com/bbglab/clustering_3d
|
|
6
|
+
Project-URL: Repository, https://github.com/bbglab/clustering_3d
|
|
7
|
+
Project-URL: Issues, https://github.com/bbglab/clustering_3d/issues
|
|
8
|
+
Author-email: "BBGLab (Barcelona Biomedical Genomics Lab)" <bbglab@irbbarcelona.org>, Stefano Pellegrini <stefano.pellegrini@irbbarcelona.org>
|
|
9
|
+
License: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: bbglab,bioinformatics,driversprediction,positiveselection
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Requires-Dist: adjusttext==1.1.1
|
|
14
|
+
Requires-Dist: aiohttp>=3.11.10
|
|
15
|
+
Requires-Dist: bgreference==0.7
|
|
16
|
+
Requires-Dist: bio==1.7.1
|
|
17
|
+
Requires-Dist: colorcet==3.0.1
|
|
18
|
+
Requires-Dist: daiquiri>=3.3.0
|
|
19
|
+
Requires-Dist: matplotlib>=3.6.2
|
|
20
|
+
Requires-Dist: networkx==2.7.1
|
|
21
|
+
Requires-Dist: numpy==1.26.4
|
|
22
|
+
Requires-Dist: pandas==1.4.2
|
|
23
|
+
Requires-Dist: progressbar2==4.0.0
|
|
24
|
+
Requires-Dist: pypdl==1.4.5
|
|
25
|
+
Requires-Dist: pytabix==0.0.2
|
|
26
|
+
Requires-Dist: scikit-learn>=1.3.0
|
|
27
|
+
Requires-Dist: scipy>=1.7.3
|
|
28
|
+
Requires-Dist: seaborn>=0.12.2
|
|
29
|
+
Requires-Dist: setuptools==61.2.0
|
|
30
|
+
Requires-Dist: statsmodels>=0.13.2
|
|
31
|
+
Requires-Dist: tqdm>=4.67.1
|
|
32
|
+
Provides-Extra: linting
|
|
33
|
+
Requires-Dist: ruff>=0.8.3; extra == 'linting'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# Oncodrive3D
|
|
37
|
+
|
|
38
|
+
**Oncodrive3D** is a fast and accurate computational method designed to analyze patterns of somatic mutation across tumors, with the goal of identifying **three-dimensional (3D) clusters** of missense mutations and detecting genes under **positive selection**.
|
|
39
|
+
|
|
40
|
+
The method leverages **AlphaFold 2-predicted protein structures** and Predicted Aligned Error (PAE) to define residue contacts within the protein's 3D space. When available, it integrates **mutational profiles** to build an accurate background model of neutral mutagenesis. By applying a novel **rank-based statistical approach**, Oncodrive3D scores potential 3D clusters and computes empirical p-values."
|
|
41
|
+
|
|
42
|
+
[](https://www.gnu.org/licenses/agpl-3.0)
|
|
43
|
+
[](https://hub.docker.com/r/bbglab/oncodrive3d)
|
|
44
|
+
[](https://pypi.org/project/Oncodrive3D/)
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
Oncodrive3D is available to the general public subject to certain conditions described in its [LICENSE](LICENSE).
|
|
51
|
+
|
|
52
|
+
## Requirements
|
|
53
|
+
|
|
54
|
+
Before you begin, ensure **Python 3.10 or later** is installed on your system.
|
|
55
|
+
Additionally, you may need to install additional development tools. Depending on your environment, you can choose one of the following methods:
|
|
56
|
+
|
|
57
|
+
- If you have sudo privileges:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
sudo apt install built-essential
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- For HPC cluster environment, it is recommended to use [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) (or [Mamba](https://mamba.readthedocs.io/en/latest/)):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
conda create -n o3d python=3.10.0
|
|
67
|
+
conda activate o3d
|
|
68
|
+
conda install -c conda-forge gxx gcc libxcrypt clang zlib
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Installation
|
|
73
|
+
|
|
74
|
+
- Install via PyPI:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install oncodrive3d
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- Alternatively, you can obtain the latest code from the repository and install it for development with pip:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/bbglab/oncodrive3d.git
|
|
84
|
+
cd oncodrive3d
|
|
85
|
+
pip install -e .
|
|
86
|
+
oncodrive3d --help
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- Or you can use a modern build tool like [uv](https://github.com/astral-sh/uv):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git clone https://github.com/bbglab/oncodrive3d.git
|
|
93
|
+
cd oncodrive3d
|
|
94
|
+
uv run oncodrive3d --help
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Building Datasets
|
|
98
|
+
|
|
99
|
+
This step build the datasets necessary for Oncodrive3D to run the 3D clustering analysis. It is required once after installation or whenever you need to generate datasets for a different organism or apply a specific threshold to define amino acid contacts.
|
|
100
|
+
|
|
101
|
+
> [!WARNING]
|
|
102
|
+
> This step is highly time- and resource-intensive, requiring a significant amount of free disk space. It will download a large amount of data, including AlphaFold-predicted structures and reference genomes (if not already cached). Ensure sufficient resources are available before proceeding, as insufficient capacity may result in extended runtimes or processing failures.
|
|
103
|
+
|
|
104
|
+
> [!NOTE]
|
|
105
|
+
> The first time that you run Oncodrive3D building dataset step with a given reference genome, it will download it from our servers. By default the downloaded datasets go to`~/.bgdata`. If you want to move these datasets to another folder you have to define the system environment variable `BGDATA_LOCAL` with an export command.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Usage: oncodrive3d build-datasets [OPTIONS]
|
|
109
|
+
|
|
110
|
+
Examples:
|
|
111
|
+
Basic build:
|
|
112
|
+
oncodrive3d build-datasets -o <build_folder>
|
|
113
|
+
|
|
114
|
+
Build with MANE Select transcripts:
|
|
115
|
+
oncodrive3d build-datasets -o <build_folder> --mane
|
|
116
|
+
|
|
117
|
+
Options:
|
|
118
|
+
-o, --output_dir PATH Path to the directory where the output files will be saved.
|
|
119
|
+
Default: ./datasets/
|
|
120
|
+
-s, --organism PATH Specifies the organism (`human` or `mouse`).
|
|
121
|
+
Default: human
|
|
122
|
+
-m, --mane Use structures predicted from MANE Select transcripts
|
|
123
|
+
(applicable to Homo sapiens only).
|
|
124
|
+
-d, --distance_threshold INT Distance threshold (Å) for defining residues contacts.
|
|
125
|
+
Default: 10
|
|
126
|
+
-c, --cores INT Number of CPU cores for computation.
|
|
127
|
+
Default: All available CPU cores
|
|
128
|
+
-v, --verbose Enables verbose output.
|
|
129
|
+
-h, --help Show this message and exit.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
For more information on the output of this step, please refer to the [Building Datasets Output Documentation](https://github.com/bbglab/oncodrive3d/tree/master/docs/build_output.md).
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## Running 3D clustering Analysis
|
|
136
|
+
|
|
137
|
+
For in depth information on how to obtain the required input data and for comprehensive information about the output, please refer to the [Input and Output Documentation](https://github.com/bbglab/oncodrive3d/tree/master/docs/run_input_output.md) of the 3D clustering analysis.
|
|
138
|
+
|
|
139
|
+
### Input
|
|
140
|
+
|
|
141
|
+
- **Mutations file** (`required`): It can be either:
|
|
142
|
+
- **<input_maf>**: A Mutation Annotation Format (MAF) file annotated with consequences (e.g., by using [Ensembl Variant Effect Predictor (VEP)](https://www.ensembl.org/info/docs/tools/vep/index.html)).
|
|
143
|
+
- **<input_vep>**: The unfiltered output of VEP including annotations for all possible transcripts.
|
|
144
|
+
|
|
145
|
+
- **<mut_profile>** (`optional`): Dictionary including the normalized frequencies of mutations (*values*) in every possible trinucleotide context (*keys*), such as 'ACA>A', 'ACC>A', and so on.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
> [!NOTE]
|
|
150
|
+
> Examples of the input files are available in the [Test Input Folder](https://github.com/bbglab/oncodrive3d/tree/master/test/input).
|
|
151
|
+
Please refer to these examples to understand the expected format and structure of the input files.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
> [!NOTE]
|
|
158
|
+
> Oncodrive3D uses the mutational profile of the cohort to build an accurate background model. However, it’s not strictly required. If the mutational profile is not provided, the tool will use a simple uniform distribution as the background model for simulating mutations and scoring potential 3D clusters.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### Main Output
|
|
163
|
+
|
|
164
|
+
- **Gene-level output**: CSV file (`\<cohort>.3d_clustering_genes.csv`) containing the results of the analysis at the gene level. Each row represents a gene, sorted from the most significant to the least significant based on the 3D clustering analysis. The table also includes genes that were not analyzed, with the reason for exclusion provided in the `status` column.
|
|
165
|
+
|
|
166
|
+
- **Residue-level output**: CSV file (`<cohort>.3d_clustering_pos.csv`) containing the results of the analysis at the level of mutated residues. Each row corresponds to a mutated position within a gene and includes detailed information for each potential mutational cluster.
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### Usage
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Usage: oncodrive3d run [OPTIONS]
|
|
173
|
+
|
|
174
|
+
Examples:
|
|
175
|
+
Basic run:
|
|
176
|
+
oncodrive3d run -i <input_maf> -p <mut_profile> -d <build_folder> -C <cohort_name>
|
|
177
|
+
|
|
178
|
+
Example of run using VEP output as input and MANE Select transcripts:
|
|
179
|
+
oncodrive3d run -i <input_vep> -p <mut_profile> -d <build_folder> -C <cohort_name> \
|
|
180
|
+
--o3d_transcripts --use_input_symbols --mane
|
|
181
|
+
|
|
182
|
+
Options:
|
|
183
|
+
-i, --input_path PATH Path to the input file (MAF or VEP output) containing the
|
|
184
|
+
annotated mutations for the cohort. [required]
|
|
185
|
+
-p, --mut_profile_path PATH Path to the JSON file specifying the cohort's mutational
|
|
186
|
+
profile (192 key-value pairs).
|
|
187
|
+
-o, --output_dir PATH Path to the output directory for results.
|
|
188
|
+
Default: ./output/
|
|
189
|
+
-d, --data_dir PATH Path to the directory containing the datasets built in the
|
|
190
|
+
building datasets step.
|
|
191
|
+
Default: ./datasets/
|
|
192
|
+
-c, --cores INT Number of CPU cores to use.
|
|
193
|
+
Default: All available CPU cores
|
|
194
|
+
-s, --seed INT Random seed for reproducibility.
|
|
195
|
+
-v, --verbose Enables verbose output.
|
|
196
|
+
-t, --cancer_type STR Cancer type to include as metadata in the output file.
|
|
197
|
+
-C, --cohort STR Cohort name for metadata and output file naming.
|
|
198
|
+
-P, --cmap_prob_thr FLOAT Threshold for defining residues contacts based on distance
|
|
199
|
+
on predicted structure and predicted aligned error (PAE).
|
|
200
|
+
Default: 0.5
|
|
201
|
+
--mane Prioritizes MANE Select transcripts when multiple
|
|
202
|
+
structures map to the same gene symbol.
|
|
203
|
+
--o3d_transcripts Filters mutations including only transcripts in Oncodrive3D
|
|
204
|
+
built datasets (requires VEP output as input file).
|
|
205
|
+
--use_input_symbols Update HUGO symbols in Oncodrive3D built datasets using the
|
|
206
|
+
input file's entries (requires VEP output as input file).
|
|
207
|
+
-h, --help Show this message and exit.
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
> [!NOTE]
|
|
214
|
+
> To maximize the number of matching transcripts between the input mutations and the AlphaFold predicted structures used by Oncodrive3D, it is recommended to use the unfiltered output of VEP (including all possible transcripts) as input, along with the flags `--o3d_transcripts` `--use_input_symbols` in the `oncodrive3d run` command.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### Running With Singularity
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
singularity pull oncodrive3d.sif docker://bbglab/oncodrive3d:latest
|
|
222
|
+
singularity exec oncodrive3d.sif oncodrive3d run -i <input_maf> -p <mut_profile> \
|
|
223
|
+
-d <build_folder> -C <cohort_name>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### Testing
|
|
228
|
+
|
|
229
|
+
To verify that Oncodrive3D is installed and configured correctly, you can perform a test run using the provided test input files:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
oncodrive3d run -d <build_folder> \
|
|
233
|
+
-i ./test/input/maf/TCGA_WXS_ACC.in.maf \
|
|
234
|
+
-p ./test/input/mut_profile/TCGA_WXS_ACC.sig.json \
|
|
235
|
+
-o ./test/output/ -C TCGA_WXS_ACC
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Check the output in the `test/output/` directory to ensure the analysis completes successfully.
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
## Parallel Processing on Multiple Cohorts
|
|
242
|
+
|
|
243
|
+
Oncodrive3D can be run in parallel on multiple cohorts using [Nextflow](https://www.nextflow.io/). This approach enables efficient, reproducible and scalable analysis across datasets.
|
|
244
|
+
|
|
245
|
+
### Requirements
|
|
246
|
+
|
|
247
|
+
1. Install [Nextflow](https://www.nextflow.io/docs/latest/getstarted.html) (version `23.04.3` was used for testing).
|
|
248
|
+
2. Install and set up either or both:
|
|
249
|
+
- [Singularity](https://sylabs.io/guides/latest/user-guide/installation.html)
|
|
250
|
+
Pull the Oncodrive3D Singularity image from Docker Hub:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
singularity pull oncodrive3d.sif docker://bbglab/oncodrive3d:latest
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
- [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)
|
|
257
|
+
Ensure Oncodrive3D is installed in your Conda environment and update the `params` section of the `nextflow.config` file to point to your Conda installation:
|
|
258
|
+
|
|
259
|
+
```groovy
|
|
260
|
+
params {
|
|
261
|
+
...
|
|
262
|
+
conda_env = '/path/to/conda/environment/with/oncodrive3d'
|
|
263
|
+
...
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Replace `/path/to/conda/environment/with/oncodrive3d` with the path to your Conda environment. Alternatively, you can provide it as a command-line argument.
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
### Test Run
|
|
271
|
+
|
|
272
|
+
Run a test to ensure that everything is set up correctly and functioning as expected:
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
cd oncodrive3d_pipeline
|
|
276
|
+
nextflow run main.nf -profile test,container --data_dir <build_folder>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Replace `<build_folder>` with the path to the Oncodrive3D datasets built in the [building datasets](#building-datasets) step.
|
|
280
|
+
If you prefer to use Conda, replace `container` in the `-profile` argument with `conda`.
|
|
281
|
+
|
|
282
|
+
### Usage
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
> [!WARNING]
|
|
287
|
+
> When using the Nextflow script, ensure that your input files are organized in the following directory structure:
|
|
288
|
+
>
|
|
289
|
+
> ```plaintext
|
|
290
|
+
> input/
|
|
291
|
+
> ├── maf/
|
|
292
|
+
> │ └── <cohort>.in.maf
|
|
293
|
+
> ├── vep/
|
|
294
|
+
> │ └── <cohort>.vep.tsv.gz
|
|
295
|
+
> └── mut_profile/
|
|
296
|
+
> └── <cohort>.sig.json
|
|
297
|
+
> ```
|
|
298
|
+
>
|
|
299
|
+
> - `maf/`: Contains mutation files with the `.in.maf` extension.
|
|
300
|
+
> - `vep/`: Contains VEP annotation files with the `.vep.tsv.gz` extension, which include annotated mutations with all possible transcripts.
|
|
301
|
+
> - `mut_profile/`: Contains mutational profile files with the `.sig.json` extension.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
Usage: nextflow run main.nf [OPTIONS]
|
|
307
|
+
|
|
308
|
+
Example of run using VEP output as input and MANE Select transcripts:
|
|
309
|
+
nextflow run main.nf -profile container --data_dir <build_folder> --indir <input> \
|
|
310
|
+
--vep_input true --mane true
|
|
311
|
+
|
|
312
|
+
Options:
|
|
313
|
+
--indir PATH Path to the input directory including the subdirectories
|
|
314
|
+
`maf` or `vep` and `mut_profile`.
|
|
315
|
+
--outdir PATH Path to the output directory.
|
|
316
|
+
Default: run_<timestamp>/
|
|
317
|
+
--cohort_pattern STR Pattern expression to filter specific files within the
|
|
318
|
+
input directory (e.g., 'TCGA*' select only TCGA cohorts).
|
|
319
|
+
Default: *
|
|
320
|
+
--data_dir PATH Path to the Oncodrive3D datasets directory, which includes
|
|
321
|
+
the files compiled during the building datasets step.
|
|
322
|
+
Default: ${baseDir}/datasets/
|
|
323
|
+
--container PATH Path to the Singularity image with Oncodrive3D installation.
|
|
324
|
+
Default: ${baseDir}/../oncodrive3d.sif
|
|
325
|
+
--max_running INT Maximum number of cohorts to process in parallel.
|
|
326
|
+
Default: 5
|
|
327
|
+
--cores INT Number of CPU cores used to process each cohort.
|
|
328
|
+
Default: 10
|
|
329
|
+
--memory STR Amount of memory allocated for processing each cohort.
|
|
330
|
+
Default: 70GB
|
|
331
|
+
--seed INT: Seed value for reproducibility.
|
|
332
|
+
Default: 128
|
|
333
|
+
```
|