https://github.com/broadinstitute/cds-daintree

https://github.com/broadinstitute/cds-daintree

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
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: broadinstitute
  • Language: Python
  • Default Branch: main
  • Size: 400 KB
Statistics
  • Stars: 0
  • Watchers: 10
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created about 2 years ago · Last pushed 11 months ago
Metadata Files
Readme

README.md

Daintree

Getting Started

Make sure that you have the following files: 1. Taiga token. 2. Broad Achilles Secret. 3. Sparkles config file.

Usage

Once inside the daintree directory, Daintree can be run using the run-daintree.sh script with the following parameters:

bash ./run-daintree.sh \ --targets="target1,target2,..." \ # Optional: Comma-separated list of target columns --input-config="path/to/file" \ # Optional: Path to model configuration JSON. Will use model-map.json if not specified. --test="True|False" \ # Optional: Run in test mode (default: True) --skipfit="True|False" \ # Optional: Skip model fitting (default: False) --upload-to-taiga="taiga_id" # Optional: Upload results to Taiga For example, to train model for target genes such as SOX10, PAX8, MDM2, NRAS, KRAS, EBF1, and MYB, run: bash ./run-daintree.sh --targets="SOX10,PAX8,MDM2,NRAS,KRAS,EBF1,MYB" Or, to train model for target drugs, run: bash ./run-daintree.sh --targets="PRC-005868644-712-80,PRC-005868644-712-80,PRC-005868644-712-80,PRC-005868644-712-80,PRC-005868644-712-80,PRC-005868644-712-80" Or, to train model using a specific model config file such as model-map-oncref.json and upload results to predictability-76d5, run: bash ./run-daintree.sh --input-config="model-map-oncref.json" --upload-to-taiga="predictability-76d5" The bash script can be modified if you would like to use a specific docker image or output to a different directory. By default it uses the us.gcr.io/broad-achilles/daintree-sparkles:v5 image and outputs to the $(PWD)/output_data directory.

Without the bash script, you can run the following command to train models for example: docker run --rm \ -v "${PWD}"/model-map.json:/daintree/model-map.json \ -v "${PWD}"/output_data:/daintree/output_data \ -v "${PWD}"/sparkles-config:/daintree/sparkles-config \ us.gcr.io/broad-achilles/daintree:v5 \ collect-and-fit \ --input-config model-map.json \ --sparkles-config /daintree/sparkles-config \ --out /daintree/output_data \ --test True \ --skipfit False \ --restrict-targets-to "SOX10,PAX8,MDM2,NRAS,KRAS,EBF1,MYB" \ --upload-to-taiga predictability-76d5

Parameters

  • --input-config <PATH>: A JSON file describing how to train the models. See Model Config File below for a description of the format of this file.
  • --sparkles-config <PATH>: Path to sparkles config file (Defaults to /daintree/sparkles-config)
  • --out <PATH>: The directory to write the output to.
  • --test: A boolean flag that takes either True or False. When True is selected only a small subset of target variables will be used. (Defaults to True)
  • --skipfit: A boolean flag that takes either True or False. Specify if you want to skip the actual model fitting process. (Defaults to True)
  • --restrict-targets-to: A comma separated list of target columns to filter. If not provided and --test is True, uses TEST_LIMIT from config.py.
  • --upload-to-taiga: The taiga id where the output ensemble, feature metadata, and predictions to be uploaded. (Defaults to None)

Model Config File

The primary input you need to provide here is the MODELCONFIG which is a JSON file listing the datasets to pull from. It follows the following format: ``` { "modelname": [MODEL NAME], "screenname": [SCREEN NAME], "data": { [DATASET NAME]: { "taigaid": [TAIGA ID OF THE DATASET], "tabletype": [TYPE OF DATASET(This is either feature or targetmatrix)], "dimtype": [TYPE OF DIMENSION IN BREADBOX(Usually "gene")], "required": [BOOLEAN(true or false)], "exempt": [BOOLEAN(true or false)] } } } **Example**: { "modelname": "CellContext", "screenname": "CRISPR", "data": { "CRISPR": { "taigaid":"internal-24q2-3719.82/CRISPRGeneEffect", "tabletype":"targetmatrix", "relation":"All" }, "Lineage": { "taigaid": "predictability-76d5.94/PredictabilityLineageTransformed", "tabletype": "feature", "dimtype": "lineage", "required": true, "exempt": false }, "Confounder": { "taigaid": "predictability-76d5.111/PredictabilityCRISPRConfoundersTransformed", "tabletype": "feature", "dimtype": "confounder", "required": true, "exempt": false } } } `` HereExemptis only used for match related.Required` means that samples that have nans for those features are dropped. This is important because, for example, we want to automatically discard samples that we dont have confounder data for.

This file needs to have at least one feature matrix(specified as type=feature) and one target matrix(type=target_matrix) with taiga ids.

File Formats

Both Feature and target datasets/matrices should have samples as the row header/index and feature names as the column headers.

Example ,SOX10 (6663),NRAS (4893),BRAF (673) ACH-000001,0,0.5,0.5 ACH-000002,0.6,0.6,0.7 ACH-000003,0.3,0.4,0.4

Output

Once daintree is run, the provided out path directory will be populated with the X matrix as a feather file, the downloaded feature matrices as csv files, the feature metadata as FeatureMetadata{model_name}{screen_name}.csv file, the predictions as Predictions{model_name}{screen_name}.csv file, and the ensemble as Ensemble{model_name}{screen_name}.csv file. If a taiga id was provided using the --upload-to-taiga flag, the output will also be uploaded to taiga.

Issues

If you face any issues running daintree, then please reach out to cds-softeng@broadinstitute.org

Owner

  • Name: Broad Institute
  • Login: broadinstitute
  • Kind: organization
  • Location: Cambridge, MA

Broad Institute of MIT and Harvard

GitHub Events

Total
  • Push event: 54
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Pull request event: 7
  • Create event: 2
Last Year
  • Push event: 54
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Pull request event: 7
  • Create event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 90
  • Total Committers: 2
  • Avg Commits per committer: 45.0
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 90
  • Committers: 2
  • Avg Commits per committer: 45.0
  • Development Distribution Score (DDS): 0.011
Top Committers
Name Email Commits
Nayeem Aquib 1****4 89
pgm p****m@b****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 13
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 minutes
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 12
  • Average time to close issues: N/A
  • Average time to close pull requests: 6 minutes
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
Pull Request Authors
  • naquib314 (13)
  • pgm (2)
  • dependabot[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)

Dependencies

sparkles-run-docker-image/Dockerfile docker
  • us.gcr.io/broad-achilles/depmap-pipeline-run ga-build-38 build
poetry.lock pypi
  • black 24.4.2
  • boto3 1.34.145
  • botocore 1.34.145
  • cachetools 5.4.0
  • certifi 2024.7.4
  • cfgv 3.4.0
  • charset-normalizer 3.3.2
  • click 8.1.7
  • colorama 0.4.6
  • colorful 0.5.6
  • distlib 0.3.8
  • filelock 3.15.4
  • google-api-core 2.19.1
  • google-auth 2.32.0
  • google-cloud-core 2.4.1
  • google-cloud-storage 2.17.0
  • google-crc32c 1.5.0
  • google-resumable-media 2.7.1
  • googleapis-common-protos 1.63.2
  • h5py 3.11.0
  • identify 2.6.0
  • idna 3.7
  • jmespath 1.0.1
  • joblib 1.4.2
  • mypy-extensions 1.0.0
  • nodeenv 1.9.1
  • numpy 1.26.4
  • packaging 24.1
  • pandas 1.5.3
  • pathspec 0.12.1
  • platformdirs 4.2.2
  • pre-commit 3.7.1
  • progressbar2 3.55.0
  • proto-plus 1.24.0
  • protobuf 5.27.2
  • pyarrow 17.0.0
  • pyasn1 0.6.0
  • pyasn1-modules 0.4.0
  • python-dateutil 2.9.0.post0
  • python-utils 3.8.2
  • pytz 2024.1
  • pyyaml 6.0.1
  • requests 2.32.3
  • rsa 4.9
  • s3transfer 0.10.2
  • scikit-learn 1.5.1
  • scipy 1.14.0
  • six 1.16.0
  • sqlite-shelve 2.2.1
  • taigapy 3.8.3
  • threadpoolctl 3.5.0
  • typing-extensions 4.12.2
  • urllib3 2.2.2
  • virtualenv 20.26.3
pyproject.toml pypi
  • click ^8.1.7
  • numpy ^1.25.1
  • pandas 1.5.3
  • python ^3.12
  • scikit-learn 1.5.1
  • taigapy 3.8.3