Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update openslide v4 #369

Open
wants to merge 49 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
c769f91
add users and papers to README
Dana-Farber Dec 16, 2022
c71bc9b
Update README.md
Dana-Farber Dec 16, 2022
c4a72ff
Update README.md
Dana-Farber Feb 7, 2023
0d78e45
Update README.md
Dana-Farber Feb 8, 2023
0031f6e
Update README.md
Dana-Farber Feb 8, 2023
57782ab
Bump ipython from 7.31.1 to 8.10.0 in /docs
dependabot[bot] Feb 11, 2023
9d5ac7f
Merge pull request #346 from Dana-Farber-AIOS/dependabot/pip/docs/ipy…
jacob-rosenthal Apr 13, 2023
f159f80
Merge branch 'master' into v2.1.1
jacob-rosenthal Apr 13, 2023
e2c29b9
bump isort version for python 3.7 compatibility
jacob-rosenthal Apr 19, 2023
8553ee5
Update README.md
jacob-rosenthal May 5, 2023
9631286
Update readthedocs-requirements.txt
sreekarreddydfci May 9, 2023
42c4cc8
Update .readthedocs.yaml
sreekarreddydfci May 9, 2023
912834f
Update .readthedocs.yaml
sreekarreddydfci May 9, 2023
927c86e
Update .readthedocs.yaml
sreekarreddydfci May 9, 2023
eb62e29
Update readthedocs-requirements.txt
sreekarreddydfci May 9, 2023
03e9b36
Merge pull request #347 from Dana-Farber-AIOS/v2.1.1
jacob-rosenthal May 10, 2023
9b6ed8e
Merge pull request #348 from sreekarreddydfci/master
jacob-rosenthal May 11, 2023
837e8ec
Update _version.py
sreekarreddydfci May 17, 2023
8b88380
Update publish-to-pypi.yml
sreekarreddydfci May 18, 2023
9c91bc5
Update publish-to-pypi.yml
sreekarreddydfci May 22, 2023
1ac207f
Update publish-to-pypi.yml
sreekarreddydfci May 22, 2023
f289495
Update publish-to-pypi.yml
sreekarreddydfci May 22, 2023
05aefd8
Update publish-to-pypi.yml
sreekarreddydfci May 22, 2023
030618d
Update tests-conda.yml
sreekarreddydfci May 22, 2023
0f53968
Update tests-conda.yml
sreekarreddydfci May 22, 2023
c95fd1d
Update tests-conda.yml
sreekarreddydfci May 22, 2023
47e0ae0
Update tests-conda.yml
sreekarreddydfci May 22, 2023
735611f
Update environment.yml
sreekarreddydfci May 22, 2023
88e806c
Merge pull request #351 from Dana-Farber-AIOS/sreekarreddydfci-patch-1
jacob-rosenthal May 23, 2023
b3a0535
Update environment.yml
sreekarreddydfci May 26, 2023
312c1fc
Update environment.yml
sreekarreddydfci May 26, 2023
3b82262
Update tests-conda.yml
sreekarreddydfci May 26, 2023
25dac4a
Update tests-conda.yml
sreekarreddydfci May 26, 2023
7670a12
Update tests-conda.yml
sreekarreddydfci May 26, 2023
dfc21d5
Update tests-conda.yml
sreekarreddydfci May 26, 2023
9c2fa14
Merge pull request #1 from sreekarreddydfci/sreekarreddydfci-patch-1
sreekarreddydfci May 26, 2023
b630aec
Remove commented out lines
jacob-rosenthal May 30, 2023
572af26
Merge pull request #354 from sreekarreddydfci/master
jacob-rosenthal May 30, 2023
466ca3e
Merge branch 'master' into sreekarreddydfci-patch-2
jacob-rosenthal May 30, 2023
9343e4e
Merge pull request #352 from Dana-Farber-AIOS/sreekarreddydfci-patch-2
jacob-rosenthal May 30, 2023
935a630
allow manual workflow triggering
jacob-rosenthal May 30, 2023
b4b61b5
Merge pull request #355 from Dana-Farber-AIOS/workflows-dispatch
jacob-rosenthal May 30, 2023
1e32970
Update environment.yml (#361)
sreekarreddydfci Jul 26, 2023
68a7224
Update README.md
Dana-Farber Aug 23, 2023
cda8fa7
changing opencv req to 1.3.1
jamesgwen Oct 17, 2023
a998708
fixing comment from last commit: updating openslide to 1.3.1
jamesgwen Oct 17, 2023
f65c72e
adjusting comments
jamesgwen Oct 17, 2023
b929b67
adjusting read the docs requirements
jamesgwen Oct 18, 2023
c058c1d
adjusting doc ddepen and miniconda version
jamesgwen Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Publish PathML distribution to PyPI and TestPyPI

on:
workflow_dispatch:
release:
types: [published]

jobs:
build-n-publish:
name: Build and publish PathML distribution to PyPI and TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
Expand Down
39 changes: 28 additions & 11 deletions .github/workflows/tests-conda.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Tests

on:
on:
workflow_dispatch:
pull_request:
branches:
- dev
Expand All @@ -17,41 +18,57 @@ jobs:
max-parallel: 5
matrix:
python-version: [3.8, 3.9]
timeout-minutes: 60 # add a timeout

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Test matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
shell: bash -l {0}
run: |
sudo apt-get update
# install openslide
sudo apt-get install openslide-tools
# install pandoc for making documentation
sudo apt-get install pandoc
- name: Setup Miniconda
# You may pin to the exact commit or the version.
# uses: conda-incubator/setup-miniconda@f4c00b0ec69bdc87b1ab4972613558dd9f4f36f3
uses: conda-incubator/[email protected]
uses: conda-incubator/setup-miniconda@v2
with:
add_pip_as_python_dependency: false
environment-file: environment.yml
auto-activate-base: false
activate-environment: pathml
environment-file: environment.yml
# mamba-version: "*"
miniforge-version: latest
use-mamba: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
- name: Debugging
run: |
echo "Printing the environment.yml file..."
cat environment.yml
echo "Checking the status of mamba..."
mamba --version
echo "Checking the available disk space..."
df -h
- name: Install dependencies with mamba
shell: bash -l {0}
run: mamba env update --file environment.yml --name pathml
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: pip install pathml
shell: bash -l {0}
- name: Install PathML
shell: bash -l {0}
run: pip install -e .

- name: Install python-spams
shell: bash -l {0}
run: pip install python-spams

- name: disk usage
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: black

- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
rev: 5.11.5
hooks:
- id: isort

Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.8"

# Build documentation with Sphinx
sphinx:
configuration: docs/source/conf.py
builder: html
fail_on_warning: false

python:
version: "3.8"
install:
- requirements: docs/readthedocs-requirements.txt
73 changes: 61 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
<img src=https://raw.githubusercontent.com/Dana-Farber-AIOS/pathml/master/docs/source/_static/images/logo.png width="300">

<img src=https://raw.githubusercontent.com/Dana-Farber-AIOS/pathml/master/docs/source/_static/images/overview.png width="750">
🤖🔬 **PathML: Tools for computational pathology**

[![Downloads](https://static.pepy.tech/badge/pathml)](https://pepy.tech/project/pathml)
[![Documentation Status](https://readthedocs.org/projects/pathml/badge/?version=latest)](https://pathml.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/Dana-Farber-AIOS/pathml/branch/master/graph/badge.svg?token=UHSQPTM28Y)](https://codecov.io/gh/Dana-Farber-AIOS/pathml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI version](https://img.shields.io/pypi/v/pathml)](https://pypi.org/project/pathml/)
[![Downloads](https://pepy.tech/badge/pathml)](https://pepy.tech/project/pathml)
[![codecov](https://codecov.io/gh/Dana-Farber-AIOS/pathml/branch/master/graph/badge.svg?token=UHSQPTM28Y)](https://codecov.io/gh/Dana-Farber-AIOS/pathml)

⭐ **PathML objective is to lower the barrier to entry to digital pathology**

Imaging datasets in cancer research are growing exponentially in both quantity and information density. These massive datasets may enable derivation of insights for cancer research and clinical care, but only if researchers are equipped with the tools to leverage advanced computational analysis approaches such as machine learning and artificial intelligence. In this work, we highlight three themes to guide development of such computational tools: scalability, standardization, and ease of use. We then apply these principles to develop PathML, a general-purpose research toolkit for computational pathology. We describe the design of the PathML framework and demonstrate applications in diverse use cases.

🚀 **The fastest way to get started?**

docker pull pathml/pathml && docker run -it -p 8888:8888 pathml/pathml

| Branch | Test status |
| ------ | ------------- |
| master | ![tests](https://github.com/Dana-Farber-AIOS/pathml/actions/workflows/tests-conda.yml/badge.svg?branch=master) |
| dev | ![tests](https://github.com/Dana-Farber-AIOS/pathml/actions/workflows/tests-conda.yml/badge.svg?branch=dev) |

An open-source toolkit for computational pathology and machine learning.
<img src=https://raw.githubusercontent.com/Dana-Farber-AIOS/pathml/master/docs/source/_static/images/logo.png width="300">

<img src=https://raw.githubusercontent.com/Dana-Farber-AIOS/pathml/master/docs/source/_static/images/overview.png width="750">

**View [documentation](https://pathml.readthedocs.io/en/latest/)**

Expand Down Expand Up @@ -125,6 +133,23 @@ Note that these instructions assume that there are no other processes using port
Please refer to the `Docker run` [documentation](https://docs.docker.com/engine/reference/run/) for further instructions
on accessing the container, e.g. for mounting volumes to access files on a local machine from within the container.

## Option 4: Google Colab

To get PathML running in a Colab environment:

````
!pip install openslide-python
!apt-get install openslide-tools
!apt-get install openjdk-8-jdk-headless -qq > /dev/null
os.environ["JAVA_HOME"] = "/usr/lib/jvm/java-8-openjdk-amd64"
!update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
!java -version
!pip install pathml
````

*Thanks to all of our open-source collaborators for helping maintain these installation instructions!*
*Please open an issue for any bugs or other problems during installation process.*

## CUDA

To use GPU acceleration for model training or other tasks, you must install CUDA.
Expand Down Expand Up @@ -191,12 +216,36 @@ See [contributing](https://github.com/Dana-Farber-AIOS/pathml/blob/master/CONTRI

# Citing

If you use `PathML` in your work, please cite our paper:
If you use `PathML` please cite:

- [**J. Rosenthal et al., "Building tools for machine learning and artificial intelligence in cancer research: best practices and a case study with the PathML toolkit for computational pathology." Molecular Cancer Research, 2022.**](https://doi.org/10.1158/1541-7786.MCR-21-0665)

So far, PathML was used in the following manuscripts:

- [J. Linares et al. **Molecular Cell** 2021](https://www.cell.com/molecular-cell/fulltext/S1097-2765(21)00729-2)
- [A. Shmatko et al. **Nature Cancer** 2022](https://www.nature.com/articles/s43018-022-00436-4)
- [J. Pocock et al. **Nature Communications Medicine** 2022](https://www.nature.com/articles/s43856-022-00186-5)
- [S. Orsulic et al. **Frontiers in Oncology** 2022](https://www.frontiersin.org/articles/10.3389/fonc.2022.924945/full)
- [D. Brundage et al. **arXiv** 2022](https://arxiv.org/abs/2203.13888)
- [A. Marcolini et al. **SoftwareX** 2022](https://www.sciencedirect.com/science/article/pii/S2352711022001558)
- [M. Rahman et al. **Bioengineering** 2022](https://www.mdpi.com/2306-5354/9/8/335)
- [C. Lama et al. **bioRxiv** 2022](https://www.biorxiv.org/content/10.1101/2022.09.28.509751v1.full)
- the list continues [**here 🔗 for 2023 and onwards**](https://scholar.google.com/scholar?oi=bibs&hl=en&cites=1157052756975292108)

# Users

<table style="border: 0px !important;"><tr><td>This is where in the world our most enthusiastic supporters are located:
<br/><br/>
<img src="https://user-images.githubusercontent.com/25375373/208137141-e450aa86-8433-415a-9cc7-c4274139bdc2.png" width="500px">
</td><td>
and this is where they work:
<br/><br/>
<img src="https://user-images.githubusercontent.com/25375373/208137644-f73c86d0-c5c7-4094-80d9-ea11e0edbdc5.png" width="400px">
</td>
</tr>
</table>

Rosenthal J, Carelli R, Omar M, Brundage D, Halbert E, Nyman J, Hari SN, Van Allen EM, Marchionni L, Umeton R, Loda M.
Building tools for machine learning and artificial intelligence in cancer research: best practices and a case study
with the PathML toolkit for computational pathology. *Molecular Cancer Research*, 2021.
DOI: [10.1158/1541-7786.MCR-21-0665](https://doi.org/10.1158/1541-7786.MCR-21-0665)
Source: https://ossinsight.io/analyze/Dana-Farber-AIOS/pathml#people

# License

Expand All @@ -209,6 +258,6 @@ Commercial license options are available also.

Questions? Comments? Suggestions? Get in touch!

[PathML@dfci.harvard.edu](mailto:PathML@dfci.harvard.edu)
[pathml@dfci.harvard.edu](mailto:pathml@dfci.harvard.edu)

<img src=https://raw.githubusercontent.com/Dana-Farber-AIOS/pathml/master/docs/source/_static/images/dfci_cornell_joint_logos.png width="750">
9 changes: 5 additions & 4 deletions docs/readthedocs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sphinx==4.3.2
sphinx==7.1.2
nbsphinx==0.8.8
nbsphinx-link==1.3.0
sphinx-rtd-theme==1.0.0
sphinx-autoapi==1.8.4
ipython==7.31.1
sphinx-rtd-theme==1.3.0
sphinx-autoapi==3.0.0
ipython==8.10.0
sphinx-copybutton==0.4.0

4 changes: 1 addition & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ channels:

dependencies:
- pip==21.3.1
- python==3.8
- numpy==1.19.5
- scipy==1.7.3
- scikit-image==0.18.3
- matplotlib==3.5.1
- python-spams==2.6.1
- openjdk==8.0.152
- pytorch==1.10.1
- h5py==3.1.0
Expand All @@ -26,7 +24,7 @@ dependencies:
- protobuf==3.20.1
- deepcell==0.11.0
- opencv-contrib-python==4.5.3.56
- openslide-python==1.1.2
- openslide-python==1.3.1 # upate to openslide 4.0.0
- scanpy==1.8.2
- anndata==0.7.8
- tqdm==4.62.3
Expand Down
2 changes: 1 addition & 1 deletion pathml/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
License: GNU GPL 2.0
"""

__version__ = "2.1.0"
__version__ = "2.1.1"
Loading