diff --git a/examples/biosciences/alphagenome/inference.sh b/examples/biosciences/alphagenome/inference.sh old mode 100644 new mode 100755 index 64c62b214e063833ffe82ff07d70876836832c49..89342b652fa8553c5b8dd03fdd60ae20a4f5920a --- a/examples/biosciences/alphagenome/inference.sh +++ b/examples/biosciences/alphagenome/inference.sh @@ -2,8 +2,8 @@ source ../../../env.sh export PYTHONPATH=$(pwd):$PYTHONPATH -export DATA_ROOT_DIR=${ONESCIENCE_DATASETS_DIR}/AlphaGeonme -export MODEL_ROOT_DIR=${ONESCIENCE_MODELS_DIR}/AlphaGeonme +export DATA_ROOT_DIR=${ONESCIENCE_DATASETS_DIR}/AlphaGenome +export MODEL_ROOT_DIR=${ONESCIENCE_MODELS_DIR}/AlphaGenome python run_inference.py \ --fasta_path ${DATA_ROOT_DIR}/reference/HOMO_SAPIENS/GRCh38.p13.genome.fa \ @@ -11,4 +11,4 @@ python run_inference.py \ --chromosome chr19 \ --start 10587331 \ --end 11635907 \ - --output_dir ./outputs \ No newline at end of file + --output_dir ./outputs diff --git a/examples/biosciences/alphagenome/run_track.sh b/examples/biosciences/alphagenome/run_track.sh old mode 100644 new mode 100755 index 17b691441cfac4111915ce21fa00538e1f07072a..a032a4a7678ffae6ad22d26fd0719e3d81b4040b --- a/examples/biosciences/alphagenome/run_track.sh +++ b/examples/biosciences/alphagenome/run_track.sh @@ -2,11 +2,12 @@ source ../../../env.sh export PYTHONPATH=$(pwd):$PYTHONPATH -export DATA_ROOT_DIR=${ONESCIENCE_DATASETS_DIR}/AlphaGeonme -export MODEL_ROOT_DIR=${ONESCIENCE_MODELS_DIR}/AlphaGeonme +export DATA_ROOT_DIR=${ONESCIENCE_DATASETS_DIR}/AlphaGenome +export MODEL_ROOT_DIR=${ONESCIENCE_MODELS_DIR}/AlphaGenome python run_track_prediction_eval.py \ --model_dir ${MODEL_ROOT_DIR}/alphagenome-all-folds \ --model_version ALL_FOLDS \ + --data_dir ${DATA_ROOT_DIR}/v1/train \ --output_path ./outputs_track/eval_results.csv diff --git a/examples/biosciences/alphagenome/run_variant.sh b/examples/biosciences/alphagenome/run_variant.sh old mode 100644 new mode 100755 index 6e14478b458056bae590ba3cc65a1cd32475daa2..a494a6b597470e5c2a946eed642b978a6b88fe7a --- a/examples/biosciences/alphagenome/run_variant.sh +++ b/examples/biosciences/alphagenome/run_variant.sh @@ -2,10 +2,10 @@ source ../../../env.sh export PYTHONPATH=$(pwd):$PYTHONPATH -export DATA_ROOT_DIR=${ONESCIENCE_DATASETS_DIR}/AlphaGeonme -export MODEL_ROOT_DIR=${ONESCIENCE_MODELS_DIR}/AlphaGeonme +export DATA_ROOT_DIR=${ONESCIENCE_DATASETS_DIR}/AlphaGenome +export MODEL_ROOT_DIR=${ONESCIENCE_MODELS_DIR}/AlphaGenome python run_variant_scoring.py \ --fasta_path ${DATA_ROOT_DIR}/reference/HOMO_SAPIENS/GRCh38.p13.genome.fa \ --model_dir ${MODEL_ROOT_DIR}/alphagenome-all-folds \ - --output_dir ./outputs_variant \ No newline at end of file + --output_dir ./outputs_variant diff --git a/install.sh b/install.sh index 0ec8c1fb2d37bc72dce455c3a5392d006f535b5c..6cc6c172023372470ae3d3898fbab7f9ebdc1e20 100644 --- a/install.sh +++ b/install.sh @@ -67,7 +67,7 @@ BIO_WHEELS=( "https://download.sourcefind.cn:65024/file/4/jax/DAS1.7/jax_rocm60_pjrt-0.4.34+das.opt1.dtk25042-py3-none-manylinux2014_x86_64.whl" "https://download.sourcefind.cn:65024/file/4/jax/DAS1.7/jax_rocm60_plugin-0.4.34+das.opt1.dtk25042-cp311-cp311-manylinux2014_x86_64.whl" "https://download.sourcefind.cn:65024/file/4/jax/DAS1.7/jaxlib-0.4.34+das.opt1.dtk25042-cp311-cp311-manylinux2014_x86_64.whl" - "https://download.sourcefind.cn:65024/directlink/4/transformer_engine/DAS1.7/transformer_engine-2.7.0+das.opt1.dtk25042-cp311-cp311-manylinux_2_28_x86_64.whl" + "https://download.sourcefind.cn:65024/directlink/4/transformer_engine/DAS1.7/transformer_engine-2.5.0+das.opt1.dtk25042-cp311-cp311-manylinux_2_28_x86_64.whl" "https://download.sourcefind.cn:65024/directlink/4/flash_attn/DAS1.7/flash_attn-2.6.1+das.opt1.dtk25042-cp311-cp311-manylinux_2_28_x86_64.whl" "https://download.sourcefind.cn:65024/directlink/9/onesicence/dtk-25.04.2/bionemo_noodles-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl" "https://download.sourcefind.cn:65024/directlink/9/onesicence/dtk-25.04.2/nemo_toolkit-2.5.0rc0-py3-none-any.whl" diff --git a/requirements.txt b/requirements.txt index e9caa43634019b99627b7a6f67b5fcd453d91930..621cb06b21e9984a50ca66cce9c152e37424e7c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -112,7 +112,7 @@ pwact #alphagenome alphagenome>=0.1.0 -kagglehub>=0.3.0 +kagglehub>=0.3.0,<=0.3.3 orbax-checkpoint>=0.6.0 pyfaidx>=0.7.0 jaxtyping>=0.2.0 diff --git a/setup.py b/setup.py index 8d32dfe9b5c5d85870fe1bb7b895c48658d8ccb6..bf1f75e3f186676d08d4cdf85c5fe66555929296 100644 --- a/setup.py +++ b/setup.py @@ -266,6 +266,7 @@ bio_requires = [ "pytest", "pdbfixer", "e3nn", + "pyranges", ] matchem_requires = [ diff --git a/src/onescience/flax_models/alphagenome/package_config.py b/src/onescience/flax_models/alphagenome/package_config.py new file mode 100644 index 0000000000000000000000000000000000000000..42784530caf7855afa24da76da2f34c0acb283db --- /dev/null +++ b/src/onescience/flax_models/alphagenome/package_config.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 +""" +AlphaGenome package config. + +Expose runtime metadata files through the normal packaging pipeline so +install scripts do not need to copy files into site-packages manually. +""" + +ALPHAGENOME_PACKAGE_DATA = { + "onescience.flax_models.alphagenome.model.metadata": [ + "*.textproto", + ], +} + +ALPHAGENOME_MANIFEST_RULES = [ + "recursive-include src/onescience/flax_models/alphagenome/model/metadata *.textproto", +] + + +def get_package_data(): + return ALPHAGENOME_PACKAGE_DATA + + +def get_manifest_rules(): + return ALPHAGENOME_MANIFEST_RULES