helical 0.0.1a0__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 (149) hide show
  1. helical-0.0.1a0/.github/workflows/get_embeddings.yml +39 -0
  2. helical-0.0.1a0/.github/workflows/main.yml +65 -0
  3. helical-0.0.1a0/.gitignore +48 -0
  4. helical-0.0.1a0/.readthedocs.yaml +27 -0
  5. helical-0.0.1a0/CITATION.bib +8 -0
  6. helical-0.0.1a0/Dockerfile +18 -0
  7. helical-0.0.1a0/LICENSE +661 -0
  8. helical-0.0.1a0/PKG-INFO +813 -0
  9. helical-0.0.1a0/README.md +110 -0
  10. helical-0.0.1a0/_config.yml +100 -0
  11. helical-0.0.1a0/_static/my_theme copy.css +3 -0
  12. helical-0.0.1a0/_static/my_theme.css +3 -0
  13. helical-0.0.1a0/_toc.yml +37 -0
  14. helical-0.0.1a0/assets/logo+name.png +0 -0
  15. helical-0.0.1a0/assets/logo1.png +0 -0
  16. helical-0.0.1a0/ci/__init__.py +0 -0
  17. helical-0.0.1a0/ci/download_all.py +31 -0
  18. helical-0.0.1a0/ci/tests/__init__.py +0 -0
  19. helical-0.0.1a0/ci/tests/data/cell_type_sample.h5ad +0 -0
  20. helical-0.0.1a0/ci/tests/data/valid_nn_head/classes.npy +0 -0
  21. helical-0.0.1a0/ci/tests/data/valid_nn_head/my_model.h5 +0 -0
  22. helical-0.0.1a0/ci/tests/test_benchmark/__init__.py +0 -0
  23. helical-0.0.1a0/ci/tests/test_benchmark/test_benchmark.py +88 -0
  24. helical-0.0.1a0/ci/tests/test_benchmark/test_classification/__init__.py +0 -0
  25. helical-0.0.1a0/ci/tests/test_benchmark/test_classification/test_classifier.py +184 -0
  26. helical-0.0.1a0/ci/tests/test_geneformer/__init__.py +0 -0
  27. helical-0.0.1a0/ci/tests/test_geneformer/test_geneformer_model.py +52 -0
  28. helical-0.0.1a0/ci/tests/test_geneformer/test_geneformer_tokenizer.py +151 -0
  29. helical-0.0.1a0/ci/tests/test_hyena_dna/__init__.py +0 -0
  30. helical-0.0.1a0/ci/tests/test_hyena_dna/test_hyena_dna_model.py +73 -0
  31. helical-0.0.1a0/ci/tests/test_scgpt/__init__.py +0 -0
  32. helical-0.0.1a0/ci/tests/test_scgpt/test_sampler.py +100 -0
  33. helical-0.0.1a0/ci/tests/test_scgpt/test_scbank.py +232 -0
  34. helical-0.0.1a0/ci/tests/test_scgpt/test_scgpt_model.py +75 -0
  35. helical-0.0.1a0/ci/tests/test_scgpt/test_tokenizer.py +48 -0
  36. helical-0.0.1a0/ci/tests/test_scgpt/vocab.json +5 -0
  37. helical-0.0.1a0/ci/tests/test_services/__init__.py +0 -0
  38. helical-0.0.1a0/ci/tests/test_services/test_mapping.py +37 -0
  39. helical-0.0.1a0/ci/tests/test_uce/__init__.py +0 -0
  40. helical-0.0.1a0/ci/tests/test_uce/test_uce_config.py +35 -0
  41. helical-0.0.1a0/conf.py +43 -0
  42. helical-0.0.1a0/docs/Geneformer.rst +19 -0
  43. helical-0.0.1a0/docs/UCE.rst +17 -0
  44. helical-0.0.1a0/docs/api.rst +30 -0
  45. helical-0.0.1a0/docs/assets/logo1.png +0 -0
  46. helical-0.0.1a0/docs/assets/logo_and_text.png +0 -0
  47. helical-0.0.1a0/docs/assets/logo_and_text_v2.png +0 -0
  48. helical-0.0.1a0/docs/assets/logo_name.png +0 -0
  49. helical-0.0.1a0/docs/assets/official_logo_fav.png +0 -0
  50. helical-0.0.1a0/docs/assets/official_logo_small.png +0 -0
  51. helical-0.0.1a0/docs/benchmarking/assets/Benchmarking.jpg +0 -0
  52. helical-0.0.1a0/docs/benchmarking/assets/Fine-Tune_Probing.jpg +0 -0
  53. helical-0.0.1a0/docs/benchmarking/description.md +25 -0
  54. helical-0.0.1a0/docs/hyena_dna.rst +18 -0
  55. helical-0.0.1a0/docs/intro.md +112 -0
  56. helical-0.0.1a0/docs/model_cards/geneformer.md +121 -0
  57. helical-0.0.1a0/docs/model_cards/hyenadna.md +120 -0
  58. helical-0.0.1a0/docs/model_cards/scgpt.md +130 -0
  59. helical-0.0.1a0/docs/model_cards/template.md +112 -0
  60. helical-0.0.1a0/docs/model_cards/uce.md +122 -0
  61. helical-0.0.1a0/docs/requirements.txt +9 -0
  62. helical-0.0.1a0/docs/scGPT.rst +18 -0
  63. helical-0.0.1a0/entrypoint.sh +2 -0
  64. helical-0.0.1a0/examples/README.md +89 -0
  65. helical-0.0.1a0/examples/config.yaml +30 -0
  66. helical-0.0.1a0/examples/notebooks/Cell-Type-Annotation.ipynb +2822 -0
  67. helical-0.0.1a0/examples/notebooks/Geneformer-vs-UCE.ipynb +764 -0
  68. helical-0.0.1a0/examples/notebooks/Hyena-DNA-Inference.ipynb +633 -0
  69. helical-0.0.1a0/examples/notebooks/Quick-Start-Tutorial.ipynb +422 -0
  70. helical-0.0.1a0/examples/notebooks/probing_tutorial_helpers/README.md +10 -0
  71. helical-0.0.1a0/examples/notebooks/probing_tutorial_helpers/get_all_data_embeddings.py +67 -0
  72. helical-0.0.1a0/examples/notebooks/probing_tutorial_helpers/predict_all.py +102 -0
  73. helical-0.0.1a0/examples/run_benchmark.py +136 -0
  74. helical-0.0.1a0/examples/run_models/run_geneformer.py +11 -0
  75. helical-0.0.1a0/examples/run_models/run_hyena_dna.py +8 -0
  76. helical-0.0.1a0/examples/run_models/run_scgpt.py +11 -0
  77. helical-0.0.1a0/examples/run_models/run_uce.py +10 -0
  78. helical-0.0.1a0/helical/__init__.py +5 -0
  79. helical-0.0.1a0/helical/benchmark/__init__.py +0 -0
  80. helical-0.0.1a0/helical/benchmark/benchmark.py +166 -0
  81. helical-0.0.1a0/helical/constants/__init__.py +0 -0
  82. helical-0.0.1a0/helical/constants/enums.py +17 -0
  83. helical-0.0.1a0/helical/constants/paths.py +2 -0
  84. helical-0.0.1a0/helical/models/__init__.py +0 -0
  85. helical-0.0.1a0/helical/models/base_models.py +112 -0
  86. helical-0.0.1a0/helical/models/classification/__init__.py +0 -0
  87. helical-0.0.1a0/helical/models/classification/classifier.py +201 -0
  88. helical-0.0.1a0/helical/models/classification/neural_network.py +127 -0
  89. helical-0.0.1a0/helical/models/classification/svm.py +90 -0
  90. helical-0.0.1a0/helical/models/geneformer/LICENSE +201 -0
  91. helical-0.0.1a0/helical/models/geneformer/__init__.py +1 -0
  92. helical-0.0.1a0/helical/models/geneformer/geneformer_config.py +55 -0
  93. helical-0.0.1a0/helical/models/geneformer/geneformer_tokenizer.py +370 -0
  94. helical-0.0.1a0/helical/models/geneformer/geneformer_utils.py +223 -0
  95. helical-0.0.1a0/helical/models/geneformer/model.py +187 -0
  96. helical-0.0.1a0/helical/models/hyena_dna/LICENSE +201 -0
  97. helical-0.0.1a0/helical/models/hyena_dna/__init__.py +1 -0
  98. helical-0.0.1a0/helical/models/hyena_dna/hyena_dna_config.py +134 -0
  99. helical-0.0.1a0/helical/models/hyena_dna/model.py +102 -0
  100. helical-0.0.1a0/helical/models/hyena_dna/pretrained_model.py +90 -0
  101. helical-0.0.1a0/helical/models/hyena_dna/standalone_hyenadna.py +1073 -0
  102. helical-0.0.1a0/helical/models/scgpt/LICENSE +21 -0
  103. helical-0.0.1a0/helical/models/scgpt/__init__.py +31 -0
  104. helical-0.0.1a0/helical/models/scgpt/data_collator.py +202 -0
  105. helical-0.0.1a0/helical/models/scgpt/data_sampler.py +95 -0
  106. helical-0.0.1a0/helical/models/scgpt/dataset.py +36 -0
  107. helical-0.0.1a0/helical/models/scgpt/gene_embedding.py +297 -0
  108. helical-0.0.1a0/helical/models/scgpt/loss.py +36 -0
  109. helical-0.0.1a0/helical/models/scgpt/model.py +242 -0
  110. helical-0.0.1a0/helical/models/scgpt/model_dir/__init__.py +11 -0
  111. helical-0.0.1a0/helical/models/scgpt/model_dir/dsbn.py +82 -0
  112. helical-0.0.1a0/helical/models/scgpt/model_dir/generation_model.py +428 -0
  113. helical-0.0.1a0/helical/models/scgpt/model_dir/grad_reverse.py +17 -0
  114. helical-0.0.1a0/helical/models/scgpt/model_dir/model.py +1045 -0
  115. helical-0.0.1a0/helical/models/scgpt/model_dir/multiomic_model.py +1079 -0
  116. helical-0.0.1a0/helical/models/scgpt/preprocess.py +303 -0
  117. helical-0.0.1a0/helical/models/scgpt/scbank/__init__.py +19 -0
  118. helical-0.0.1a0/helical/models/scgpt/scbank/data.py +135 -0
  119. helical-0.0.1a0/helical/models/scgpt/scbank/databank.py +802 -0
  120. helical-0.0.1a0/helical/models/scgpt/scbank/monitor.py +2 -0
  121. helical-0.0.1a0/helical/models/scgpt/scbank/setting.py +31 -0
  122. helical-0.0.1a0/helical/models/scgpt/scgpt_config.py +97 -0
  123. helical-0.0.1a0/helical/models/scgpt/scgpt_utils.py +50 -0
  124. helical-0.0.1a0/helical/models/scgpt/tokenizer/__init__.py +1 -0
  125. helical-0.0.1a0/helical/models/scgpt/tokenizer/default_census_vocab.json +60696 -0
  126. helical-0.0.1a0/helical/models/scgpt/tokenizer/default_gene_vocab.json +48294 -0
  127. helical-0.0.1a0/helical/models/scgpt/tokenizer/gene_tokenizer.py +475 -0
  128. helical-0.0.1a0/helical/models/scgpt/trainer.py +685 -0
  129. helical-0.0.1a0/helical/models/scgpt/utils/__init__.py +1 -0
  130. helical-0.0.1a0/helical/models/scgpt/utils/util.py +430 -0
  131. helical-0.0.1a0/helical/models/uce/LICENSE +21 -0
  132. helical-0.0.1a0/helical/models/uce/__init__.py +1 -0
  133. helical-0.0.1a0/helical/models/uce/gene_embeddings.py +87 -0
  134. helical-0.0.1a0/helical/models/uce/model.py +213 -0
  135. helical-0.0.1a0/helical/models/uce/uce_collator.py +28 -0
  136. helical-0.0.1a0/helical/models/uce/uce_config.py +112 -0
  137. helical-0.0.1a0/helical/models/uce/uce_dataset.py +133 -0
  138. helical-0.0.1a0/helical/models/uce/uce_model.py +115 -0
  139. helical-0.0.1a0/helical/models/uce/uce_utils.py +139 -0
  140. helical-0.0.1a0/helical/services/__init__.py +0 -0
  141. helical-0.0.1a0/helical/services/downloader.py +254 -0
  142. helical-0.0.1a0/helical/services/logger.py +45 -0
  143. helical-0.0.1a0/helical/services/mapping.py +87 -0
  144. helical-0.0.1a0/helical/version.py +1 -0
  145. helical-0.0.1a0/pyproject.toml +57 -0
  146. helical-0.0.1a0/requirements-dev.txt +3 -0
  147. helical-0.0.1a0/requirements.txt +27 -0
  148. helical-0.0.1a0/setup.py +40 -0
  149. helical-0.0.1a0/singularity.def +21 -0
@@ -0,0 +1,39 @@
1
+ name: Get Embeddings
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ build:
8
+
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout repository
12
+ uses: actions/checkout@v2
13
+
14
+ - name: setup python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: 3.11.8
18
+ cache: 'pip' # caching pip dependencies
19
+
20
+ - name: Install dependencies
21
+ run: |
22
+ pip install .
23
+
24
+ # First download before tests as they make use of the downloaded files
25
+ - name: Download all files
26
+ run: |
27
+ python ci/download_all.py
28
+
29
+ - name: Execute script to get embeddings
30
+ run: |
31
+ python ci/probing_tutorial_helpers/get_all_data_embeddings.py
32
+
33
+ - name: Upload numpy embeddings data
34
+ uses: actions/upload-artifact@v2
35
+ with:
36
+ name: upload-data
37
+ path: data/
38
+
39
+
@@ -0,0 +1,65 @@
1
+ name: CI Pipeline
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ - release
8
+
9
+ jobs:
10
+ build:
11
+
12
+ runs-on: ubuntu-latest
13
+ timeout-minutes: 60
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v2
17
+
18
+ - name: setup python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: 3.11.8
22
+ cache: 'pip' # caching pip dependencies
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ pip install -r requirements-dev.txt
27
+ pip install .
28
+
29
+ # First download before tests as they make use of the downloaded files
30
+ - name: Download all files
31
+ run: |
32
+ python ci/download_all.py
33
+
34
+ - name: Execute unittests
35
+ run: |
36
+ pytest --cov-report=html:html_cov --cov-branch --cov-report term --cov=helical ci/
37
+
38
+ - name: Upload coverage report
39
+ uses: actions/upload-artifact@v2
40
+ with:
41
+ name: coverage-report
42
+ path: html_cov/
43
+
44
+ # Does not seem to work but would be nice to have
45
+ # - name: Pytest coverage comment
46
+ # uses: MishaKav/pytest-coverage-comment@main
47
+ # with:
48
+ # pytest-coverage-path: ./pytest-coverage.txt
49
+ # junitxml-path: ./pytest.xml
50
+
51
+ - name: Execute Geneformer
52
+ run: |
53
+ python examples/run_models/run_geneformer.py
54
+
55
+ - name: Execute scGPT
56
+ run: |
57
+ python examples/run_models/run_scgpt.py
58
+
59
+ - name: Execute UCE
60
+ run: |
61
+ python examples/run_models/run_uce.py
62
+
63
+ - name: Execute Hyena
64
+ run: |
65
+ python examples/run_models/run_hyena_dna.py
@@ -0,0 +1,48 @@
1
+ *.egg-info
2
+ __pycache__
3
+ .vscode
4
+ dist/*
5
+
6
+ # Data/Models
7
+ data/*
8
+ examples/data/*
9
+ singularity/*
10
+ *.sqlite3
11
+ *.h5ad
12
+ *.h5
13
+ *.torch
14
+ *.keras
15
+ *.pt
16
+ *.npz
17
+ *.arrow
18
+ *zip
19
+ *.npy
20
+
21
+ *.pickle
22
+ *.pkl
23
+ *.bin
24
+ *.dataset
25
+ *.ipynb_checkpoints
26
+ results*
27
+
28
+ # Log
29
+ debug.log
30
+
31
+ # Mac Files
32
+ *.DS_Store
33
+
34
+ /docs/conf.py
35
+ /docs/_build
36
+ /docs/_autosummary
37
+ _build
38
+ /docs/source
39
+
40
+ # From unit tests
41
+ ci/tests/test_output
42
+
43
+ # Keep unit tests data
44
+ !ci/tests/data/valid_nn_head/*
45
+ !ci/tests/data/*
46
+
47
+ # Hydra
48
+ outputs
@@ -0,0 +1,27 @@
1
+ version: 2
2
+
3
+ # Set the version of Python and other tools you might need
4
+ build:
5
+ os: ubuntu-22.04
6
+ tools:
7
+ python: "3.10"
8
+ jobs:
9
+ pre_build:
10
+ # Generate on-the-fly Sphinx configuration from Jupyter Book's _config.yml
11
+ - "SPHINX_APIDOC_OPTIONS=members,show-inheritance sphinx-apidoc -f -d 0 -o docs/source ./"
12
+ - "jupyter-book config sphinx ./"
13
+
14
+ sphinx:
15
+ builder: html
16
+ configuration: ./conf.py
17
+ fail_on_warning: false
18
+
19
+ python:
20
+ install:
21
+ - requirements: docs/requirements.txt
22
+ - requirements: requirements.txt
23
+ - method: pip
24
+ path: .
25
+
26
+ formats:
27
+ - epub
@@ -0,0 +1,8 @@
1
+ @software{helical,
2
+ author = {Maxime Allard, Benoit Putzeys, Rick Schneider, Mathieu Klop},
3
+ title = {Helical Python Package},
4
+ year = {2024},
5
+ publisher = {GitHub},
6
+ journal = {GitHub Repository},
7
+ howpublished = {\url{https://github.com/helicalAI/helical}},
8
+ }
@@ -0,0 +1,18 @@
1
+ FROM python:3.11
2
+
3
+ RUN apt-get update -y \
4
+ && apt-get upgrade -y \
5
+ && apt-get -y install build-essential \
6
+ wget \
7
+ git \
8
+ curl \
9
+ gcc \
10
+ gfortran \
11
+ && apt-get clean \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+
15
+ RUN pip install --upgrade --force-reinstall git+https://github.com/helicalAI/helical.git
16
+
17
+ # Define the entry point for the container
18
+ ENTRYPOINT ["/bin/bash"]