Oncodrive3D 1.0.4__tar.gz → 1.0.5__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.
Files changed (57) hide show
  1. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/Dockerfile +1 -1
  2. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/LICENSE +3 -1
  3. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/PKG-INFO +22 -47
  4. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/README.md +21 -46
  5. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/docs/run_input_output.md +53 -53
  6. oncodrive3d-1.0.5/oncodrive3d_pipeline/README.md +90 -0
  7. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/modules/o3d_chimerax_plot.nf +1 -6
  8. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/modules/o3d_plot.nf +6 -11
  9. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/modules/o3d_run.nf +1 -6
  10. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/nextflow.config +0 -2
  11. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/validation.nf +0 -32
  12. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/workflows/oncodrive3d.nf +5 -6
  13. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/__init__.py +1 -1
  14. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/build_datasets.py +1 -0
  15. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/get_structures.py +1 -2
  16. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/prob_contact_maps.py +3 -4
  17. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/seq_for_mut_prob.py +14 -8
  18. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/globals.py +1 -1
  19. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/main.py +24 -143
  20. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/build_annotations.py +17 -22
  21. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/chimerax_plot.py +4 -2
  22. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/pdb_tool.py +5 -6
  23. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/pfam.py +6 -7
  24. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/plot.py +70 -39
  25. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/stability_change.py +10 -11
  26. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/uniprot_feat.py +3 -2
  27. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/utils.py +8 -9
  28. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/clustering.py +4 -4
  29. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/communities.py +1 -1
  30. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/miss_mut_prob.py +1 -1
  31. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/mutability.py +7 -29
  32. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/score_and_simulations.py +4 -3
  33. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/utils.py +5 -5
  34. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/.gitignore +0 -0
  35. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/.python-version +0 -0
  36. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/docs/build_output.md +0 -0
  37. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/conf/base.config +0 -0
  38. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/conf/test.config +0 -0
  39. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/oncodrive3d_pipeline/main.nf +0 -0
  40. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/pyproject.toml +0 -0
  41. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/clustering_3d.code-workspace +0 -0
  42. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/__init__.py +0 -0
  43. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/af_merge.py +0 -0
  44. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/get_pae.py +0 -0
  45. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/model_confidence.py +0 -0
  46. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/parse_pae.py +0 -0
  47. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/datasets/utils.py +0 -0
  48. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/plotting/__init__.py +0 -0
  49. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/__init__.py +0 -0
  50. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/scripts/run/pvalues.py +0 -0
  51. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/test/input/maf/TCGA_WXS_ACC.in.maf +0 -0
  52. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/test/input/maf/TCGA_WXS_PAAD.in.maf +0 -0
  53. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/test/input/mut_profile/TCGA_WXS_ACC.sig.json +0 -0
  54. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/test/input/mut_profile/TCGA_WXS_PAAD.sig.json +0 -0
  55. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/test/input/vep/TCGA_WXS_ACC.vep.tsv.gz +0 -0
  56. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/test/input/vep/TCGA_WXS_PAAD.vep.tsv.gz +0 -0
  57. {oncodrive3d-1.0.4 → oncodrive3d-1.0.5}/uv.lock +0 -0
@@ -30,7 +30,7 @@ COPY --from=build-stage /oncodrive3d/dist /oncodrive3d/dist
30
30
  WORKDIR /oncodrive3d
31
31
 
32
32
  # Install oncodrive3d
33
- RUN pip install dist/*.tar.gz
33
+ RUN pip install --no-cache-dir dist/*.tar.gz
34
34
 
35
35
  # Create required directories
36
36
  RUN install -d -m 0755 "$BGDATA_LOCAL" "$BBGLAB_HOME"
@@ -1,6 +1,8 @@
1
- Oncodrive3D is the property of the Institute for Research in Biomedicine (IRB Barcelona), which hold the copyright thereto.
2
1
  Copyright (C) 2024 Institute for Research in Biomedicine (IRB Barcelona)
3
2
 
3
+ Oncodrive3D is the property of the Institute for Research in Biomedicine
4
+ (IRB Barcelona), which hold the copyright thereto.
5
+
4
6
  This program is free software: you can redistribute it and/or modify
5
7
  it under the terms of the GNU Affero General Public License as
6
8
  published by the Free Software Foundation, either version 3 of the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Oncodrive3D
3
- Version: 1.0.4
3
+ Version: 1.0.5
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
5
  Project-URL: Homepage, https://github.com/bbglab/clustering_3d
6
6
  Project-URL: Repository, https://github.com/bbglab/clustering_3d
@@ -45,9 +45,6 @@ The method leverages **AlphaFold 2-predicted protein structures** and Predicted
45
45
 
46
46
  ---
47
47
 
48
- ## License
49
-
50
- Oncodrive3D is available to the general public subject to certain conditions described in its [LICENSE](LICENSE).
51
48
 
52
49
  ## Requirements
53
50
 
@@ -99,7 +96,7 @@ Additionally, you may need to install additional development tools. Depending on
99
96
  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
97
 
101
98
  > [!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.
99
+ > This step is highly time- and resource-intensive, requiring a significant amount of free disk space and computational power. It will download and process a large amount of data. Ensure sufficient resources are available before proceeding, as insufficient capacity may result in extended runtimes or processing failures.
103
100
 
104
101
  > [!NOTE]
105
102
  > 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.
@@ -240,51 +237,16 @@ Check the output in the `test/output/` directory to ensure the analysis complete
240
237
 
241
238
  ## Parallel Processing on Multiple Cohorts
242
239
 
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
- ```
240
+ This repository provides a [Nextflow](https://www.nextflow.io/) pipeline to run Oncodrive3D in parallel across multiple cohorts, enabling efficient, reproducible and scalable analysis across datasets.
255
241
 
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`.
242
+ For more information, refer to the [Oncodrive3D Pipeline](https://github.com/bbglab/oncodrive3d/tree/master/oncodrive3d_pipeline/) documentation.
281
243
 
282
244
  ### Usage
283
245
 
284
246
  ---
285
247
 
286
248
  > [!WARNING]
287
- > When using the Nextflow script, ensure that your input files are organized in the following directory structure:
249
+ > When using the Nextflow script, ensure that your input files are organized in the following directory structure (you only need either the `maf/` or `vep/` directory):
288
250
  >
289
251
  > ```plaintext
290
252
  > input/
@@ -311,7 +273,7 @@ Example of run using VEP output as input and MANE Select transcripts:
311
273
 
312
274
  Options:
313
275
  --indir PATH Path to the input directory including the subdirectories
314
- `maf` or `vep` and `mut_profile`.
276
+ `maf/` or `vep/` and `mut_profile/`.
315
277
  --outdir PATH Path to the output directory.
316
278
  Default: run_<timestamp>/
317
279
  --cohort_pattern STR Pattern expression to filter specific files within the
@@ -320,14 +282,27 @@ Options:
320
282
  --data_dir PATH Path to the Oncodrive3D datasets directory, which includes
321
283
  the files compiled during the building datasets step.
322
284
  Default: ${baseDir}/datasets/
323
- --container PATH Path to the Singularity image with Oncodrive3D installation.
324
- Default: ${baseDir}/../oncodrive3d.sif
325
285
  --max_running INT Maximum number of cohorts to process in parallel.
326
286
  Default: 5
327
287
  --cores INT Number of CPU cores used to process each cohort.
328
288
  Default: 10
329
289
  --memory STR Amount of memory allocated for processing each cohort.
330
290
  Default: 70GB
291
+ --vep_input BOOL Use `vep/` subdir as input and select transcripts matching
292
+ the Ensembl transcript IDs in Oncodrive3D built datasets.
293
+ Default: false
294
+ --mane BOOL Prioritize structures corresponding to MANE transcrips if
295
+ multiple structures are associated to the same gene.
296
+ Default: false
331
297
  --seed INT: Seed value for reproducibility.
332
298
  Default: 128
333
- ```
299
+ ```
300
+
301
+
302
+ ## License
303
+
304
+ Oncodrive3D is available to the general public subject to certain conditions described in its [LICENSE](LICENSE).
305
+
306
+
307
+ ## Citation
308
+ If you use Oncodrive3D in your research, please cite the original paper: [Oncodrive3D: Fast and accurate detection of structural clusters of somatic mutations under positive selection](https://www.biorxiv.org/content/10.1101/2025.01.11.632354v2).
@@ -10,9 +10,6 @@ The method leverages **AlphaFold 2-predicted protein structures** and Predicted
10
10
 
11
11
  ---
12
12
 
13
- ## License
14
-
15
- Oncodrive3D is available to the general public subject to certain conditions described in its [LICENSE](LICENSE).
16
13
 
17
14
  ## Requirements
18
15
 
@@ -64,7 +61,7 @@ Additionally, you may need to install additional development tools. Depending on
64
61
  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.
65
62
 
66
63
  > [!WARNING]
67
- > 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.
64
+ > This step is highly time- and resource-intensive, requiring a significant amount of free disk space and computational power. It will download and process a large amount of data. Ensure sufficient resources are available before proceeding, as insufficient capacity may result in extended runtimes or processing failures.
68
65
 
69
66
  > [!NOTE]
70
67
  > 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.
@@ -205,51 +202,16 @@ Check the output in the `test/output/` directory to ensure the analysis complete
205
202
 
206
203
  ## Parallel Processing on Multiple Cohorts
207
204
 
208
- 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.
209
-
210
- ### Requirements
211
-
212
- 1. Install [Nextflow](https://www.nextflow.io/docs/latest/getstarted.html) (version `23.04.3` was used for testing).
213
- 2. Install and set up either or both:
214
- - [Singularity](https://sylabs.io/guides/latest/user-guide/installation.html)
215
- Pull the Oncodrive3D Singularity image from Docker Hub:
216
-
217
- ```
218
- singularity pull oncodrive3d.sif docker://bbglab/oncodrive3d:latest
219
- ```
205
+ This repository provides a [Nextflow](https://www.nextflow.io/) pipeline to run Oncodrive3D in parallel across multiple cohorts, enabling efficient, reproducible and scalable analysis across datasets.
220
206
 
221
- - [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)
222
- Ensure Oncodrive3D is installed in your Conda environment and update the `params` section of the `nextflow.config` file to point to your Conda installation:
223
-
224
- ```groovy
225
- params {
226
- ...
227
- conda_env = '/path/to/conda/environment/with/oncodrive3d'
228
- ...
229
- }
230
- ```
231
-
232
- Replace `/path/to/conda/environment/with/oncodrive3d` with the path to your Conda environment. Alternatively, you can provide it as a command-line argument.
233
-
234
-
235
- ### Test Run
236
-
237
- Run a test to ensure that everything is set up correctly and functioning as expected:
238
-
239
- ```
240
- cd oncodrive3d_pipeline
241
- nextflow run main.nf -profile test,container --data_dir <build_folder>
242
- ```
243
-
244
- Replace `<build_folder>` with the path to the Oncodrive3D datasets built in the [building datasets](#building-datasets) step.
245
- If you prefer to use Conda, replace `container` in the `-profile` argument with `conda`.
207
+ For more information, refer to the [Oncodrive3D Pipeline](https://github.com/bbglab/oncodrive3d/tree/master/oncodrive3d_pipeline/) documentation.
246
208
 
247
209
  ### Usage
248
210
 
249
211
  ---
250
212
 
251
213
  > [!WARNING]
252
- > When using the Nextflow script, ensure that your input files are organized in the following directory structure:
214
+ > When using the Nextflow script, ensure that your input files are organized in the following directory structure (you only need either the `maf/` or `vep/` directory):
253
215
  >
254
216
  > ```plaintext
255
217
  > input/
@@ -276,7 +238,7 @@ Example of run using VEP output as input and MANE Select transcripts:
276
238
 
277
239
  Options:
278
240
  --indir PATH Path to the input directory including the subdirectories
279
- `maf` or `vep` and `mut_profile`.
241
+ `maf/` or `vep/` and `mut_profile/`.
280
242
  --outdir PATH Path to the output directory.
281
243
  Default: run_<timestamp>/
282
244
  --cohort_pattern STR Pattern expression to filter specific files within the
@@ -285,14 +247,27 @@ Options:
285
247
  --data_dir PATH Path to the Oncodrive3D datasets directory, which includes
286
248
  the files compiled during the building datasets step.
287
249
  Default: ${baseDir}/datasets/
288
- --container PATH Path to the Singularity image with Oncodrive3D installation.
289
- Default: ${baseDir}/../oncodrive3d.sif
290
250
  --max_running INT Maximum number of cohorts to process in parallel.
291
251
  Default: 5
292
252
  --cores INT Number of CPU cores used to process each cohort.
293
253
  Default: 10
294
254
  --memory STR Amount of memory allocated for processing each cohort.
295
255
  Default: 70GB
256
+ --vep_input BOOL Use `vep/` subdir as input and select transcripts matching
257
+ the Ensembl transcript IDs in Oncodrive3D built datasets.
258
+ Default: false
259
+ --mane BOOL Prioritize structures corresponding to MANE transcrips if
260
+ multiple structures are associated to the same gene.
261
+ Default: false
296
262
  --seed INT: Seed value for reproducibility.
297
263
  Default: 128
298
- ```
264
+ ```
265
+
266
+
267
+ ## License
268
+
269
+ Oncodrive3D is available to the general public subject to certain conditions described in its [LICENSE](LICENSE).
270
+
271
+
272
+ ## Citation
273
+ If you use Oncodrive3D in your research, please cite the original paper: [Oncodrive3D: Fast and accurate detection of structural clusters of somatic mutations under positive selection](https://www.biorxiv.org/content/10.1101/2025.01.11.632354v2).
@@ -27,10 +27,10 @@ vep --dir <vep_data> -i <input_vcf> --offline --cache -o <output>.vep.tsv \
27
27
 
28
28
  The output of VEP should be filtered so that each mutation is mapped to a single transcript. Additionally, it should be parsed to conform to the MAF format and include at least the following fields:
29
29
 
30
- - `Hugo_Symbol`: HUGO symbol for the gene.
31
- - `Variant_Classification`: Translational effect of variant allele.
32
- - `Transcript_ID`: Ensembl ID of the transcript affected by the variant.
33
- - `HGVSp_Short`: The protein sequence of the variant in HGVS recommended format using 1-letter amino-acid codes.
30
+ - **Hugo_Symbol**: HUGO symbol for the gene.
31
+ - **Variant_Classification**: Translational effect of variant allele.
32
+ - **Transcript_ID**: Ensembl ID of the transcript affected by the variant.
33
+ - **HGVSp_Short**: The protein sequence of the variant in HGVS recommended format using 1-letter amino-acid codes.
34
34
 
35
35
  ### VEP File
36
36
 
@@ -168,38 +168,38 @@ CSV file (`<cohort>.3d_clustering_genes.csv`) containing the results of the anal
168
168
 
169
169
  It includes the following fields:
170
170
 
171
- - `Gene`: HUGO symbol or identifier of the gene being analyzed.
172
- - `Uniprot_ID`: Identifier for the gene's protein product in the UniProt database.
173
- - `pval`: The p-value indicating the statistical significance of the gene in the 3D clustering analysis (lowest p-value among the residues of the gene).
174
- - `qval`: Adjusted p-value (q-value) to control for false discovery rate (FDR) using the Benjamini-Hochberg method.
175
- - `C_gene`: Binary label indicating if the gene is detected to be significant (by default if `q-value < 0.01`).
176
- - `C_pos`: List of protein positions of the gene clusters.
177
- - `C_label`: List of labels indicating the clump to which each cluster is grouped.
178
- - `Pos_top_vol`: Position of the most significant cluster.
179
- - `Score_obs_sim_top_vol`: 3D clustering score of the gene (normalized 3D clustering score of the residue with the lowest p-value; if multiple residues have the same lowest p-value, the maximum normalized 3D clustering score among those residues is used).
180
- - `Mut_in_gene`: Number of missense mutations in the gene.
181
- - `Clust_mut`: Number of missense mutations in significant clusters.
182
- - `Clust_res`: Number of residues detected as significant clusters.
183
- - `Mut_in_top_vol`: Number of missense mutations in the most significant cluster (in the volume of the residue with the lowest p-value).
184
- - `Mut_in_top_cl_vol`: Number of missense mutations in the clusters of the most significant clump (in the volume of residues of the clump that includes the residue with the lowest p-value).
185
- - `PAE_top_vol`: Weighted average predicted aligned error (PAE) between the residues in the volume of the most significant cluster.
186
- - `pLDDT_top_vol`: Weighted average predicted local distance difference test (pLDDT) between the residues in the volume of the most significant cluster.
187
- - `pLDDT_top_cl_vol`: Weighted average pLDDT between the residues in the volume of the most significant clump.
188
- - `Ratio_not_in_structure`: Diagnostic field rapresenting the proportion of mutations in the input file that are mapped to positions not covered by the structure.
189
- - `Ratio_WT_mismatch`: Diagnostic field rapresenting the proportion of mutations in the input file where the wild-type (WT) amino acid does not match the corresponding residue in the structural model.
190
- - `Mut_zero_mut_prob`: Diagnostic field rapresenting the proportion of mutations in the input file that are assigned a mutation probability of zero. This field is relevant only when a mutability configuration file is provided as input (`-m`, `--mutability_config_path`).
191
- - `Pos_zero_mut_prob`: Diagnostic field reporting the mutated protein position with assigned a mutation probability of zero. This field is relevant only when a mutability configuration file is provided as input (`-m`, `--mutability_config_path`).
192
- - `Cancer`: Cancer type.
193
- - `Cohort`: Cohort name.
194
- - `F`: Fragment of the AlphaFold predicted structure (1 = no fragmentation, *n*M = merged from *n* fragments).
195
- - `Transcript_ID`: Ensembl transcript ID provided in the input file.
196
- - `O3D_transcript_ID`: Ensembl trasncript ID mapped to the given gene in the Oncodrive3D built datasets.
197
- - `Transcript_status`: Transcripts mapping status indicating whether the transcript IDs matches between the input data and the Oncodrive3D built datasets. Possible values are:
171
+ - **Gene**: HUGO symbol or identifier of the gene being analyzed.
172
+ - **Uniprot_ID**: Identifier for the gene's protein product in the UniProt database.
173
+ - **pval**: The p-value indicating the statistical significance of the gene in the 3D clustering analysis (lowest p-value among the residues of the gene).
174
+ - **qval**: Adjusted p-value (q-value) to control for false discovery rate (FDR) using the Benjamini-Hochberg method.
175
+ - **C_gene**: Binary label indicating if the gene is detected to be significant (by default if `q-value < 0.01`).
176
+ - **C_pos**: List of protein positions of the gene clusters.
177
+ - **C_label**: List of labels indicating the clump to which each cluster is grouped.
178
+ - **Pos_top_vol**: Position of the most significant cluster.
179
+ - **Score_obs_sim_top_vol**: 3D clustering score of the gene (normalized 3D clustering score of the residue with the lowest p-value; if multiple residues have the same lowest p-value, the maximum normalized 3D clustering score among those residues is used).
180
+ - **Mut_in_gene**: Number of missense mutations in the gene.
181
+ - **Clust_mut**: Number of missense mutations in significant clusters.
182
+ - **Clust_res**: Number of residues detected as significant clusters.
183
+ - **Mut_in_top_vol**: Number of missense mutations in the most significant cluster (in the volume of the residue with the lowest p-value).
184
+ - **Mut_in_top_cl_vol**: Number of missense mutations in the clusters of the most significant clump (in the volume of residues of the clump that includes the residue with the lowest p-value).
185
+ - **PAE_top_vol**: Weighted average predicted aligned error (PAE) between the residues in the volume of the most significant cluster.
186
+ - **pLDDT_top_vol**: Weighted average predicted local distance difference test (pLDDT) between the residues in the volume of the most significant cluster.
187
+ - **pLDDT_top_cl_vol**: Weighted average pLDDT between the residues in the volume of the most significant clump.
188
+ - **Ratio_not_in_structure**: Diagnostic field rapresenting the proportion of mutations in the input file that are mapped to positions not covered by the structure.
189
+ - **Ratio_WT_mismatch**: Diagnostic field rapresenting the proportion of mutations in the input file where the wild-type (WT) amino acid does not match the corresponding residue in the structural model.
190
+ - **Mut_zero_mut_prob**: Diagnostic field rapresenting the proportion of mutations in the input file that are assigned a mutation probability of zero. This field is relevant only when a mutability configuration file is provided as input (`-m`, `--mutability_config_path`).
191
+ - **Pos_zero_mut_prob**: Diagnostic field reporting the mutated protein position with assigned a mutation probability of zero. This field is relevant only when a mutability configuration file is provided as input (`-m`, `--mutability_config_path`).
192
+ - **Cancer**: Cancer type.
193
+ - **Cohort**: Cohort name.
194
+ - **F**: Fragment of the AlphaFold predicted structure (1 = no fragmentation, *n*M = merged from *n* fragments).
195
+ - **Transcript_ID**: Ensembl transcript ID provided in the input file.
196
+ - **O3D_transcript_ID**: Ensembl trasncript ID mapped to the given gene in the Oncodrive3D built datasets.
197
+ - **Transcript_status**: Transcripts mapping status indicating whether the transcript IDs matches between the input data and the Oncodrive3D built datasets. Possible values are:
198
198
  - `Input_missing`: Transcript ID is missing from the input file.
199
199
  - `O3D_missing`: Transcript ID is missing from the Oncodrive3D built datasets.
200
200
  - `Mismatch`: Transcript ID in the input file does not match the transcript ID in the Oncodrive3D built datasets.
201
201
  - `Match`: Transcript ID in the input file matches the transcript ID in the Oncodrive3D built datasets.
202
- - `Status`: Processing status for 3D clustering analysis. Possible values are:
202
+ - **Status**: Processing status for 3D clustering analysis. Possible values are:
203
203
  - `Processed`: The gene has been successfully processed, with a 3D clustering score and a p-value assigned.
204
204
  - `No_mut`: The gene contains one or no mutations.
205
205
  - `No_density`: The maximum number of mutations in the spatial volume of any residue is one or less.
@@ -220,27 +220,27 @@ CSV file (`<cohort>.3d_clustering_pos.csv`) containing the results of the analys
220
220
 
221
221
  It includes the following fields:
222
222
 
223
- - `Gene`: HUGO symbol or identifier of the gene being analyzed.
224
- - `Uniprot_ID`: Identifier for the gene's protein product in the UniProt database.
225
- - `Pos`: Protein position.
226
- - `Mut_in_gene`: Number of missense mutations in the gene.
227
- - `Mut_in_res`: Number of missense mutations in the residue.
228
- - `Mut_in_vol`: Number of missense mutations in the volume of the residue.
229
- - `Score`: 3D clustering score for the residue.
230
- - `Score_obs_sim`: Normalized 3D clustering score for the residue.
231
- - `pval`: The p-value of the residue in the 3D clustering analysis.
232
- - `C`: Binary label indicating whether the cluster at that residue is significant (1) or not (0). A cluster is marked as significant either because it meets the significance criteria directly or because it has been rescued by contributing mutations to another significant cluster.
233
- - `C_ext`: Binary label indicating whether the cluster has been rescued by contributing mutations to another significant cluster (1) or if it was significant on its own (0).
234
- - `Clump`: Identifier for the clump to which the cluster at that residue has been assigned.
235
- - `Rank` Rank used to perform the calculation of the normalized 3D clustering score and p-values.
236
- - `Mut_in_cl_vol`: Number of missense mutations in the clusters of the clump to which the cluster has been assigned.
237
- - `Res_in_cl`: Positions of the clusters of the clump to which the cluster has been assigned.
238
- - `PAE_vol`: Weighted average predicted aligned error (PAE) of the residues in the volume of the cluster.
239
- - `pLDDT_res`: Predicted local distance difference test (pLDDT) of the residue.
240
- - `pLDDT_vol`: Weighted average pLDDT between the residues in the volume.
241
- - `pLDDT_cl_vol`: pLDDT between the residues in the volume of the most significant cluster.
242
- - `Cancer`: Cancer type.
243
- - `Cohort`: Cohort name.
223
+ - **Gene**: HUGO symbol or identifier of the gene being analyzed.
224
+ - **Uniprot_ID**: Identifier for the gene's protein product in the UniProt database.
225
+ - **Pos**: Protein position.
226
+ - **Mut_in_gene**: Number of missense mutations in the gene.
227
+ - **Mut_in_res**: Number of missense mutations in the residue.
228
+ - **Mut_in_vol**: Number of missense mutations in the volume of the residue.
229
+ - **Score**: 3D clustering score for the residue.
230
+ - **Score_obs_sim**: Normalized 3D clustering score for the residue.
231
+ - **pval**: The p-value of the residue in the 3D clustering analysis.
232
+ - **C**: Binary label indicating whether the cluster at that residue is significant (1) or not (0). A cluster is marked as significant either because it meets the significance criteria directly or because it has been rescued by contributing mutations to another significant cluster.
233
+ - **C_ext**: Binary label indicating whether the cluster has been rescued by contributing mutations to another significant cluster (1) or if it was significant on its own (0).
234
+ - **Clump**: Identifier for the clump to which the cluster at that residue has been assigned.
235
+ - **Rank**: Rank used to perform the calculation of the normalized 3D clustering score and p-values.
236
+ - **Mut_in_cl_vol**: Number of missense mutations in the clusters of the clump to which the cluster has been assigned.
237
+ - **Res_in_cl**: Positions of the clusters of the clump to which the cluster has been assigned.
238
+ - **PAE_vol**: Weighted average predicted aligned error (PAE) of the residues in the volume of the cluster.
239
+ - **pLDDT_res**: Predicted local distance difference test (pLDDT) of the residue.
240
+ - **pLDDT_vol**: Weighted average pLDDT between the residues in the volume.
241
+ - **pLDDT_cl_vol**: pLDDT between the residues in the volume of the most significant cluster.
242
+ - **Cancer**: Cancer type.
243
+ - **Cohort**: Cohort name.
244
244
 
245
245
 
246
246
  ## Supplementary Output
@@ -0,0 +1,90 @@
1
+ # Oncodrive3D Nextflow Pipeline
2
+
3
+ This pipeline enables running Oncodrive3D in parallel across multiple cohorts using [Nextflow](https://www.nextflow.io/).
4
+
5
+ ## Requirements
6
+
7
+ 1. Install [Nextflow](https://www.nextflow.io/docs/latest/getstarted.html) (version `23.04.3` was used for testing).
8
+ 2. Install and set up either or both:
9
+ - [Singularity](https://sylabs.io/guides/latest/user-guide/installation.html)
10
+ - [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)
11
+ Ensure Oncodrive3D is installed in your Conda environment and update the `params` section of the `nextflow.config` file to point to your Conda installation:
12
+
13
+ ```groovy
14
+ params {
15
+ ...
16
+ conda_env = '/path/to/conda/environment/with/oncodrive3d'
17
+ ...
18
+ }
19
+ ```
20
+
21
+ Replace `/path/to/conda/environment/with/oncodrive3d` with the path to your Conda environment. Alternatively, you can provide it as a command-line argument.
22
+
23
+
24
+ ## Test Run
25
+
26
+ Run a test to ensure that everything is set up correctly and functioning as expected:
27
+
28
+ ```
29
+ nextflow run main.nf -profile test,container --data_dir <build_folder>
30
+ ```
31
+
32
+ Replace `<build_folder>` with the path to the Oncodrive3D datasets built in the [building datasets](#building-datasets) step.
33
+ If you prefer to use Conda, replace `container` in the `-profile` argument with `conda`.
34
+
35
+ ## Usage
36
+
37
+ ---
38
+
39
+ > [!WARNING]
40
+ > When using the Nextflow script, ensure that your input files are organized in the following directory structure (you only need either the `maf/` or `vep/` directory):
41
+ >
42
+ > ```plaintext
43
+ > input/
44
+ > ├── maf/
45
+ > │ └── <cohort>.in.maf
46
+ > ├── vep/
47
+ > │ └── <cohort>.vep.tsv.gz
48
+ > └── mut_profile/
49
+ > └── <cohort>.sig.json
50
+ > ```
51
+ >
52
+ > - `maf/`: Contains mutation files with the `.in.maf` extension.
53
+ > - `vep/`: Contains VEP annotation files with the `.vep.tsv.gz` extension, which include annotated mutations with all possible transcripts.
54
+ > - `mut_profile/`: Contains mutational profile files with the `.sig.json` extension.
55
+
56
+ ---
57
+
58
+ ```
59
+ Usage: nextflow run main.nf [OPTIONS]
60
+
61
+ Example of run using VEP output as input and MANE Select transcripts:
62
+ nextflow run main.nf -profile container --data_dir <build_folder> --indir <input> \
63
+ --vep_input true --mane true
64
+
65
+ Options:
66
+ --indir PATH Path to the input directory including the subdirectories
67
+ `maf` or `vep` and `mut_profile`.
68
+ --outdir PATH Path to the output directory.
69
+ Default: run_<timestamp>/
70
+ --cohort_pattern STR Pattern expression to filter specific files within the
71
+ input directory (e.g., 'TCGA*' select only TCGA cohorts).
72
+ Default: *
73
+ --data_dir PATH Path to the Oncodrive3D datasets directory, which includes
74
+ the files compiled during the building datasets step.
75
+ Default: ${baseDir}/datasets/
76
+ --max_running INT Maximum number of cohorts to process in parallel.
77
+ Default: 5
78
+ --cores INT Number of CPU cores used to process each cohort.
79
+ Default: 10
80
+ --memory STR Amount of memory allocated for processing each cohort.
81
+ Default: 70GB
82
+ --vep_input BOLEAN Use `vep/` subdir as input and select transcripts matching
83
+ the Ensembl transcript IDs in Oncodrive3D built datasets.
84
+ Default: false
85
+ --mane Prioritize structures corresponding to MANE transcrips if
86
+ multiple structures are associated to the same gene.
87
+ Default: false
88
+ --seed INT Seed value for reproducibility.
89
+ Default: 128
90
+ ```
@@ -2,14 +2,9 @@ process O3D_CHIMERAX_PLOT {
2
2
  tag "ChimeraX plot $cohort"
3
3
  label 'process_low'
4
4
  queue 'bigmem,normal'
5
- container params.container_chimerax
6
5
  maxForks params.max_running
7
6
  publishDir "${params.outdir}/${params.outsubdir}", mode:'copy'
8
-
9
- // conda "bioconda::oncodrive3d" // TODO: Update and test
10
- // container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? // TODO: Update and test
11
- // 'https://depot.galaxyproject.org/singularity/oncodrive3d--py39hbf8eff0_0' :
12
- // 'quay.io/biocontainers/oncodrive3d--py39hbf8eff0_0' }"
7
+ container 'docker.io/spellegrini87/oncodrive3d_chimerax:latest'
13
8
 
14
9
  input:
15
10
  tuple val(cohort), path(inputs), path(genes_csv), path(pos_csv), path(mutations_csv), path(miss_prob_json), path(seq_df_tsv)
@@ -2,14 +2,9 @@ process O3D_PLOT {
2
2
  tag "Plot $cohort"
3
3
  label 'process_low'
4
4
  queue 'bigmem,normal'
5
- container params.container
6
5
  maxForks params.max_running
7
6
  publishDir "${params.outdir}/${params.outsubdir}", mode:'copy'
8
-
9
- // conda "bioconda::oncodrive3d" // TODO: Update and test
10
- // container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? // TODO: Update and test
11
- // 'https://depot.galaxyproject.org/singularity/oncodrive3d--py39hbf8eff0_0' :
12
- // 'quay.io/biocontainers/oncodrive3d--py39hbf8eff0_0' }"
7
+ container 'docker.io/bbglab/oncodrive3d:latest'
13
8
 
14
9
  input:
15
10
  tuple val(cohort), path(inputs), path(genes_csv), path(pos_csv), path(mutations_csv), path(miss_prob_json), path(seq_df_tsv)
@@ -17,11 +12,12 @@ process O3D_PLOT {
17
12
  output:
18
13
  tuple val(cohort), path("**.summary_plot.png"), optional: true, emit: summary_plot
19
14
  tuple val(cohort), path("**.genes_plots/**.png"), optional: true, emit: genes_plot
20
- // tuple val(cohort), path("**.associations_plots/**.logodds_plot.png"), optional: true, emit: logodds_plot
21
- // tuple val(cohort), path("**.associations_plots/**.volcano_plot.png"), optional: true, emit: volcano_plot
22
- // tuple val(cohort), path("**.associations_plots/**.volcano_plot_gene.png"), optional: true, emit: volcano_plot_gene
15
+ tuple val(cohort), path("**.associations_plots/**.logodds_plot.png"), optional: true, emit: logodds_plot
16
+ tuple val(cohort), path("**.associations_plots/**.volcano_plot.png"), optional: true, emit: volcano_plot
17
+ tuple val(cohort), path("**.associations_plots/**.volcano_plot_gene.png"), optional: true, emit: volcano_plot_gene
23
18
  tuple val(cohort), path("**.3d_clustering_pos.annotated.csv"), optional: true, emit: pos_annotated_csv
24
- tuple val(cohort), path("**.uniprot_feat.tsv"), optional: true, emit: uniprot_feat_csv
19
+ tuple val(cohort), path("**.uniprot_feat.tsv"), optional: true, emit: uniprot_feat_tsv
20
+ tuple val(cohort), path("**.logreg_result.tsv"), optional: true, emit: logreg_tsv
25
21
  path "**.log", emit: log
26
22
 
27
23
  script:
@@ -38,7 +34,6 @@ process O3D_PLOT {
38
34
  -a ${params.annotations_dir} \\
39
35
  -o $prefix \\
40
36
  -c $cohort \\
41
- --title $cohort \\
42
37
  --output_csv \\
43
38
  ${params.verbose ? '-v' : ''} \\
44
39
  $args
@@ -1,16 +1,11 @@
1
1
  process O3D_RUN {
2
2
  tag "O3D $cohort"
3
3
  queue 'bigmem,normal'
4
- container params.container
5
4
  cpus params.cores
6
5
  memory params.memory
7
6
  maxForks params.max_running
8
7
  publishDir "${params.outdir}/${params.outsubdir}", mode:'copy'
9
-
10
- // conda "bioconda::oncodrive3d" // TODO: Update and test
11
- // container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? // TODO: Update and test
12
- // 'https://depot.galaxyproject.org/singularity/oncodrive3d--py39hbf8eff0_0' :
13
- // 'quay.io/biocontainers/oncodrive3d--py39hbf8eff0_0' }"
8
+ container 'docker.io/bbglab/oncodrive3d:latest'
14
9
 
15
10
  input:
16
11
  tuple val(cohort), path(inputs)
@@ -9,8 +9,6 @@ params {
9
9
  cohort_pattern = "*"
10
10
  data_dir = "${baseDir}/../datasets" // CHANGE TO YOUR PATH
11
11
  annotations_dir = "${baseDir}/../annotations" // CHANGE TO YOUR PATH
12
- container = "${baseDir}/../oncodrive3d.sif" // CHANGE TO YOUR PATH
13
- container_chimerax = "${baseDir}/../oncodrive3d_chimerax.sif" // CHANGE TO YOUR PATH
14
12
  conda_env = '/path/to/conda/environment/with/oncodrive3d' // CHANGE TO YOUR PATH
15
13
  cores = 10
16
14
  memory = "70G"
@@ -18,38 +18,6 @@ def validatePaths(params) {
18
18
  }
19
19
  }
20
20
 
21
- // Validate Oncodrive3D Singularity image
22
- if (workflow.containerEngine == 'singularity') {
23
- def imagePath = file(params.container)
24
- if (!imagePath.exists()) {
25
- error """
26
- \u001B[31mERROR: The specified Oncodrive3D Singularity image does not exist:
27
- ${params.container}
28
-
29
- Please provide the path to the Oncodrive3D Singularity image.
30
- You can update 'params.container' in the 'nextflow.config' file or provide it as a command-line argument:
31
-
32
- nextflow run main.nf --container <singularity_image>\u001B[0m
33
- """
34
- }
35
- }
36
-
37
- // Validate Oncodrive3D with ChimeraX Singularity image
38
- if (params.chimerax_plot == true) {
39
- def image_chimeraxPath = file(params.container_chimerax)
40
- if (!image_chimeraxPath.exists() || !image_chimeraxPath.isDirectory()) {
41
- error """
42
- \u001B[31mERROR: The specified ChimeraX Singularity image does not exist:
43
- ${params.container_chimerax}
44
-
45
- Please provide the path to the ChimeraX Singularity image.
46
- You can update 'params.container_chimerax' in the 'nextflow.config' file or provide it as a command-line argument:
47
-
48
- nextflow run main.nf --container_chimerax <singularity_image>\u001B[0m
49
- """
50
- }
51
- }
52
-
53
21
  // Validate Oncodrive3D datasets path
54
22
  def dataPath = file(params.data_dir)
55
23
  if (!dataPath.exists() || !dataPath.isDirectory()) {
@@ -29,8 +29,6 @@ workflow ONCODRIVE3D {
29
29
  ChimeraX plots : ${params.chimerax_plot}
30
30
  Seed : ${params.seed}
31
31
  Verbose : ${params.verbose}
32
- Container : ${params.container}
33
- Container ChimeraX : ${params.container_chimerax}
34
32
  Profile : ${workflow.profile}
35
33
  """
36
34
  .stripIndent()
@@ -66,10 +64,11 @@ workflow ONCODRIVE3D {
66
64
  plot_summary = params.plot ? O3D_PLOT.out.summary_plot : Channel.empty()
67
65
  plot_genes = params.plot ? O3D_PLOT.out.genes_plot : Channel.empty()
68
66
  plot_pos_annotated = params.plot ? O3D_PLOT.out.pos_annotated_csv : Channel.empty()
69
- plot_uniprot_feat = params.plot ? O3D_PLOT.out.uniprot_feat_csv : Channel.empty()
70
- // logodds_plot = params.plot ? O3D_PLOT.out.logodds_plot : Channel.empty()
71
- // volcano_plot = params.plot ? O3D_PLOT.out.volcano_plot : Channel.empty()
72
- // volcano_plot_gene = params.plot ? O3D_PLOT.out.volcano_plot_gene : Channel.empty()
67
+ plot_uniprot_feat = params.plot ? O3D_PLOT.out.uniprot_feat_tsv : Channel.empty()
68
+ plot_logreg_tsv = params.plot ? O3D_PLOT.out.logreg_tsv : Channel.empty()
69
+ logodds_plot = params.plot ? O3D_PLOT.out.logodds_plot : Channel.empty()
70
+ volcano_plot = params.plot ? O3D_PLOT.out.volcano_plot : Channel.empty()
71
+ volcano_plot_gene = params.plot ? O3D_PLOT.out.volcano_plot_gene : Channel.empty()
73
72
  plot_logs = params.plot ? O3D_PLOT.out.log : Channel.empty()
74
73
 
75
74
  plot_chimerax_defattr = params.chimerax_plot ? O3D_CHIMERAX_PLOT.out.chimerax_defattr : Channel.empty()