Skip to content

Commit 417bb8c

Browse files
committed
initial
0 parents  commit 417bb8c

29 files changed

+7425
-0
lines changed

.gitignore

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
.vscode/
2+
data/
3+
wandb/
4+
artifacts/
5+
6+
# Byte-compiled / optimized / DLL files
7+
__pycache__/
8+
*.py[cod]
9+
*$py.class
10+
11+
# C extensions
12+
*.so
13+
14+
# Distribution / packaging
15+
.Python
16+
build/
17+
develop-eggs/
18+
dist/
19+
downloads/
20+
eggs/
21+
.eggs/
22+
lib/
23+
lib64/
24+
parts/
25+
sdist/
26+
var/
27+
wheels/
28+
pip-wheel-metadata/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
59+
# Translations
60+
*.mo
61+
*.pot
62+
63+
# Django stuff:
64+
*.log
65+
local_settings.py
66+
db.sqlite3
67+
db.sqlite3-journal
68+
69+
# Flask stuff:
70+
instance/
71+
.webassets-cache
72+
73+
# Scrapy stuff:
74+
.scrapy
75+
76+
# Sphinx documentation
77+
docs/_build/
78+
79+
# PyBuilder
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
.python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
100+
__pypackages__/
101+
102+
# Celery stuff
103+
celerybeat-schedule
104+
celerybeat.pid
105+
106+
# SageMath parsed files
107+
*.sage.py
108+
109+
# Environments
110+
.env
111+
.venv
112+
env/
113+
venv/
114+
ENV/
115+
env.bak/
116+
venv.bak/
117+
118+
# Spyder project settings
119+
.spyderproject
120+
.spyproject
121+
122+
# Rope project settings
123+
.ropeproject
124+
125+
# mkdocs documentation
126+
/site
127+
128+
# mypy
129+
.mypy_cache/
130+
.dmypy.json
131+
dmypy.json
132+
133+
# Pyre type checker
134+
.pyre/

.pre-commit-config.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/psf/black
5+
rev: 19.10b0
6+
hooks:
7+
- id: black
8+
language_version: python3
9+
10+
- repo: https://github.com/kynan/nbstripout
11+
rev: master
12+
hooks:
13+
- id: nbstripout
14+
files: ".ipynb"
15+
16+
- repo: https://github.com/pre-commit/pre-commit-hooks
17+
rev: v2.4.0
18+
hooks:
19+
- id: trailing-whitespace
20+
- id: end-of-file-fixer
21+
- id: check-yaml
22+
- id: check-added-large-files
23+
- id: check-merge-conflict
24+
- id: trailing-whitespace
25+
26+
- repo: https://github.com/pre-commit/mirrors-isort
27+
rev: v5.6.0
28+
hooks:
29+
- id: isort

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Zachary Barry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# convit-hcs-moa-prediction
2+
3+
Prediction of drug mechanism-of-action (MoA) from high content screening images.
4+
5+
## Background
6+
7+
![](https://data.broadinstitute.org/bbbc/BBBC021/aurora-kinase-inhibitor.png)
8+
9+
Example image from [BBBC021](https://bbbc.broadinstitute.org/BBBC021) dataset
10+
used in this work.
11+
12+
## Getting started
13+
14+
1. Clone the repository:
15+
16+
```
17+
git clone https://github.com/zbarry/pytorch-hcs.git
18+
```
19+
20+
2. Install the environment and the `pytorch_hcs` package:
21+
22+
```
23+
cd pytorch-hcs
24+
conda install -c conda-forge mamba -y
25+
mamba env update
26+
```
27+
28+
(the `mamba` install is optional but recommended as a conda replacement)
29+
30+
This will create a `pytorch-hcs` environment and `pip install` the Python package in one go.
31+
32+
3. Acquire the BBBC021 dataset
33+
34+
In a notebook or Python terminal, run the following:
35+
36+
```python
37+
38+
```

environment.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: pytorch-hcs
2+
channels:
3+
- pytorch
4+
- nvidia
5+
- conda-forge
6+
- defaults
7+
dependencies:
8+
- python
9+
10+
- numpy
11+
- scipy
12+
- scikit-image
13+
- pandas
14+
- pyjanitor
15+
16+
# - opencv
17+
18+
- holoviews
19+
- hvplot
20+
- datashader
21+
- panel
22+
23+
- jupyterlab
24+
- pyviz_comms
25+
- ipywidgets
26+
27+
# - umap-learn # until supervised densmap officially released
28+
- hdbscan
29+
30+
- wandb
31+
32+
- pytorch
33+
- torchvision
34+
- cudatoolkit
35+
- pytorch-lightning
36+
37+
- h5py
38+
- pyarrow
39+
40+
- pylint
41+
- mypy
42+
- flake8
43+
- pre-commit
44+
- black
45+
46+
- pip
47+
- pip:
48+
- opencv-python
49+
- git+https://github.com/lmcinnes/umap.git
50+
- git+https://github.com/zbarry/pybbbc.git
51+
- '-e .'

mypy.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mypy]
2+
ignore_missing_imports = True

0 commit comments

Comments
 (0)