Skip to content

Commit

Permalink
move CBaSE to distinct folder and modify generate scripts accordingly…
Browse files Browse the repository at this point in the history
… to account for new relative position
  • Loading branch information
ashuaibi7 committed Dec 19, 2024
1 parent 686d9fe commit 4d3100b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions external/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# External Codebases

This directory contains external codebases that have been integrated into this project to facilitate advanced analyses. Below are the details of each codebase, including the sources, modifications made, and references to the original contributors and publications.

## Integrated Codebases

### 1. CBaSE

- **Source**: [CBaSE v1.2 Download Page](http://genetics.bwh.harvard.edu/cbase/downloads_v1.2.html)
- **Version**: v1.2
- **Description**: CBaSE is a statistical framework designed for identifying positively selected driver mutations in cancer genomes.

#### Modifications Made:
1. Adjusted input and output (IO) file naming conventions to better align with the overall project structure.
2. Applied general formatting changes to adhere to the [Black](https://github.com/psf/black) code style for Python scripts:
- `CBaSE_params_v1.2.py`
- `CBaSE_qvals_v1.2.py`
3. Auxiliary files were used as-is without modifications.

#### Original Contributors:
- Donate Weghorn
- Shamil Sunyaev

#### Reference:
Weghorn, D., & Sunyaev, S. (2017). Bayesian inference of negative and positive selection in human cancers. *Genome Biology*, 18(1), 154. [PubMed Link](https://pubmed.ncbi.nlm.nih.gov/29106416/)

---

### 2. DISCOVER

- **Source**: [DISCOVER GitHub Repository](https://github.com/NKI-CCB/DISCOVER)
- **Version**: Python Release v0.9.5 ([GitHub Release Page](https://github.com/NKI-CCB/DISCOVER/releases/tag/py_v0.9.5))
- **Description**: DISCOVER is a method for detecting mutual exclusivity and co-occurrence of genomic events in cancer data.

#### Modifications Made:
1. Retained only the `python` directory files, as these are the only relevant components for integration.
2. Made minor changes to file input/output handling to ensure seamless integration with the overall project structure.

#### Original Contributors:
- Sander Canisius
- John W. M. Martens
- Lodewyk F. A. Wessels

#### Reference:
Canisius, S., Martens, J. W. M., & Wessels, L. F. A. (2016). A novel independence test for somatic alterations in cancer shows that biology drives mutual exclusivity but chance explains most co-occurrence. *Genome Biology*, 17(1), 261. [Genome Biology Link](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-1114-x)

---

## Notes on Usage
- These codebases have been modified for improved integration, particularly with regard to file naming conventions and Python script formatting.
- Any additional modifications made to these codebases in the future will be documented in this file.

For any issues regarding these external codebases, refer to their original sources or contact the contributors through their respective repositories or publications.
11 changes: 8 additions & 3 deletions src/dialect/utils/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,18 @@ def generate_bmr_using_CBaSE(maf, out, reference):

logging.info(f"Running CBaSE method on input file: {CBaSE_input_fn}")

# TODO: export these following three paths for cleaner usage
CBaSE_params_script = os.path.abspath(
os.path.join("external", "CBaSE_params_v1.2.py")
os.path.join("external", "CBaSE", "CBaSE_params_v1.2.py")
)
CBaSE_qvals_script = os.path.abspath(
os.path.join("external", "CBaSE_qvals_v1.2.py")
os.path.join("external", "CBaSE", "CBaSE_qvals_v1.2.py")
)

# TODO: retest download of auxiliary files and create perma download link
CBaSE_auxiliary_dir = os.path.abspath(
os.path.join("external", "CBaSE", "auxiliary")
)
CBaSE_auxiliary_dir = os.path.abspath(os.path.join("external", "auxiliary"))

try:
cbase_params_cmd = [
Expand Down

0 comments on commit 4d3100b

Please sign in to comment.