Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fish-quant/big-fish
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2
Choose a base ref
...
head repository: fish-quant/big-fish
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 16, 2020

  1. add mrc as dependency

    Henley13 committed Jan 16, 2020
    Copy the full SHA
    873fab0 View commit details
  2. read dv videos

    Henley13 committed Jan 16, 2020
    Copy the full SHA
    ab94c2b View commit details

Commits on May 5, 2020

  1. add test for stack.utils

    Henley13 committed May 5, 2020
    Copy the full SHA
    c5ce909 View commit details
  2. Copy the full SHA
    f4b7368 View commit details
  3. unitary tests for io

    Henley13 committed May 5, 2020
    Copy the full SHA
    4fa1d25 View commit details
  4. fix tests utils

    Henley13 committed May 5, 2020
    Copy the full SHA
    39dd090 View commit details
  5. initialize codecov

    Henley13 committed May 5, 2020
    Copy the full SHA
    85d9275 View commit details
  6. fix test io

    Henley13 committed May 5, 2020
    Copy the full SHA
    e564089 View commit details
  7. clean test_utils

    Henley13 committed May 5, 2020
    Copy the full SHA
    5f02000 View commit details
  8. misc with test io

    Henley13 committed May 5, 2020
    Copy the full SHA
    65483ba View commit details
  9. Copy the full SHA
    5f706d9 View commit details
  10. clean old notebooks

    Henley13 committed May 5, 2020
    Copy the full SHA
    375df0b View commit details
  11. Copy the full SHA
    8fc4b38 View commit details
  12. Copy the full SHA
    a4a36de View commit details
  13. refactor tests stack

    Henley13 committed May 5, 2020
    Copy the full SHA
    94a02a2 View commit details
  14. Copy the full SHA
    49bab67 View commit details
  15. Copy the full SHA
    2271aa9 View commit details
  16. misc

    Henley13 committed May 5, 2020
    Copy the full SHA
    d3ba99a View commit details
  17. Copy the full SHA
    fffe726 View commit details
  18. add loader for npz files

    Henley13 committed May 5, 2020
    Copy the full SHA
    98d8ffd View commit details
  19. add tests for filtering

    Henley13 committed May 5, 2020
    Copy the full SHA
    f95ed8c View commit details
  20. add tests for projection

    Henley13 committed May 5, 2020
    Copy the full SHA
    cf105bc View commit details
  21. add examples I/O

    Henley13 committed May 5, 2020
    Copy the full SHA
    11c6279 View commit details
  22. Copy the full SHA
    42984ed View commit details
  23. Copy the full SHA
    d0b3f83 View commit details
  24. Copy the full SHA
    96647f0 View commit details
  25. add TODOs

    Henley13 committed May 5, 2020
    Copy the full SHA
    6dbcb74 View commit details
  26. improve documentation

    Henley13 committed May 5, 2020
    Copy the full SHA
    e506909 View commit details
  27. Copy the full SHA
    141ef56 View commit details
  28. Copy the full SHA
    768e3c2 View commit details
  29. refactor preparation.py

    Henley13 committed May 5, 2020
    Copy the full SHA
    077453f View commit details
  30. Copy the full SHA
    3091a1c View commit details
  31. Copy the full SHA
    7e4d47d View commit details
  32. remove input data

    Henley13 committed May 5, 2020
    Copy the full SHA
    f3b0fb0 View commit details
  33. remove input test data

    Henley13 committed May 5, 2020
    Copy the full SHA
    bd041ce View commit details
  34. Copy the full SHA
    6f8926a View commit details
  35. update TODO

    Henley13 committed May 5, 2020
    Copy the full SHA
    3c5aa70 View commit details
  36. isolate deep learning code

    Henley13 committed May 5, 2020
    Copy the full SHA
    11f3c57 View commit details
  37. misc

    Henley13 committed May 5, 2020
    Copy the full SHA
    ca32f00 View commit details
  38. io csv

    Henley13 committed May 5, 2020
    Copy the full SHA
    3021523 View commit details
  39. Copy the full SHA
    bc87b15 View commit details
  40. refactor plots

    Henley13 committed May 5, 2020
    Copy the full SHA
    73aa119 View commit details
  41. Copy the full SHA
    973e15c View commit details
  42. refactor cell extraction

    Henley13 committed May 5, 2020
    Copy the full SHA
    bfb83f3 View commit details
  43. add new examples

    Henley13 committed May 5, 2020
    Copy the full SHA
    aa0b43f View commit details
  44. misc

    Henley13 committed May 5, 2020
    Copy the full SHA
    7e46465 View commit details
  45. add TODO

    Henley13 committed May 5, 2020
    Copy the full SHA
    ed2e341 View commit details
  46. Smaller fixes for packaging (#6)

    * Update setup.py
    
    - correct repo url
    - tensorflow as an extra requirement
    - add bigfish as a `find_package`
    
    Co-authored-by: Wei Ouyang <oeway007@gmail.com>
    2 people authored and Henley13 committed May 5, 2020
    Copy the full SHA
    9801b3b View commit details
  47. update requirements

    Henley13 committed May 5, 2020
    Copy the full SHA
    eb4207d View commit details
  48. Copy the full SHA
    a2b0e57 View commit details
Showing with 16,746 additions and 13,347 deletions.
  1. +27 −0 .codecov.yml
  2. +133 −13 .gitignore
  3. +23 −0 .readthedocs.yml
  4. +15 −0 .travis.yml
  5. +1 −0 MANIFEST.in
  6. +114 −1 README.md
  7. +15 −0 bigfish/__init__.py
  8. +29 −14 bigfish/classification/__init__.py
  9. +0 −101 bigfish/classification/base.py
  10. +915 −386 bigfish/classification/features.py
  11. +0 −1,083 bigfish/classification/features_old.py
  12. +273 −486 bigfish/classification/input_preparation.py
  13. +0 −1,097 bigfish/classification/squeezenet.py
  14. 0 bigfish/classification/{inception.py → tests/__init__.py}
  15. +18 −0 bigfish/classification/tests/test_features.py
  16. +9 −0 bigfish/classification/tests/test_input_preparation.py
  17. +68 −0 bigfish/deep_learning/__init__.py
  18. +499 −0 bigfish/deep_learning/models_segmentation.py
  19. +365 −0 bigfish/deep_learning/utils_models.py
  20. +62 −22 bigfish/detection/__init__.py
  21. +0 −1,227 bigfish/detection/cluster_decomposition.py
  22. +208 −0 bigfish/detection/cluster_detection.py
  23. +877 −0 bigfish/detection/dense_decomposition.py
  24. +0 −126 bigfish/detection/foci_detection.py
  25. +659 −263 bigfish/detection/spot_detection.py
  26. +1,181 −0 bigfish/detection/spot_modeling.py
  27. 0 tests/tests.py → bigfish/detection/tests/__init__.py
  28. +9 −0 bigfish/detection/tests/test_cluster_detection.py
  29. +11 −0 bigfish/detection/tests/test_dense_decomposition.py
  30. +13 −0 bigfish/detection/tests/test_spot_detection.py
  31. +15 −0 bigfish/detection/tests/test_spot_modeling.py
  32. +16 −0 bigfish/detection/tests/test_utils.py
  33. +700 −0 bigfish/detection/utils.py
  34. +73 −0 bigfish/multistack/__init__.py
  35. +270 −0 bigfish/multistack/colocalization.py
  36. +1,130 −0 bigfish/multistack/postprocess.py
  37. +643 −0 bigfish/multistack/preprocess.py
  38. 0 bigfish/multistack/tests/__init__.py
  39. +10 −0 bigfish/multistack/tests/test_colocalization.py
  40. +102 −0 bigfish/multistack/tests/test_postprocess.py
  41. +202 −0 bigfish/multistack/tests/test_preprocess.py
  42. +216 −0 bigfish/multistack/tests/test_utils.py
  43. +346 −0 bigfish/multistack/utils.py
  44. +39 −18 bigfish/plot/__init__.py
  45. +0 −107 bigfish/plot/plot_classification.py
  46. +0 −525 bigfish/plot/plot_coordinates.py
  47. +1,261 −495 bigfish/plot/plot_images.py
  48. +346 −0 bigfish/plot/plot_quality.py
  49. +20 −6 bigfish/plot/utils.py
  50. +51 −17 bigfish/segmentation/__init__.py
  51. +471 −0 bigfish/segmentation/cell_segmentation.py
  52. +0 −220 bigfish/segmentation/cyt_segmentation.py
  53. +201 −83 bigfish/segmentation/nuc_segmentation.py
  54. +328 −0 bigfish/segmentation/postprocess.py
  55. 0 bigfish/segmentation/test/__init__.py
  56. +15 −0 bigfish/segmentation/test/test_cell_segmentation.py
  57. +13 −0 bigfish/segmentation/test/test_nuc_segmentation.py
  58. +20 −0 bigfish/segmentation/test/test_postprocess.py
  59. +17 −0 bigfish/segmentation/test/test_utils.py
  60. +0 −362 bigfish/segmentation/unet.py
  61. +112 −91 bigfish/segmentation/utils.py
  62. +133 −79 bigfish/stack/__init__.py
  63. +182 −79 bigfish/stack/augmentation.py
  64. +221 −179 bigfish/stack/filter.py
  65. +0 −96 bigfish/stack/illumination.py
  66. +406 −82 bigfish/stack/io.py
  67. +0 −807 bigfish/stack/postprocess.py
  68. +0 −929 bigfish/stack/preparation.py
  69. +290 −1,243 bigfish/stack/preprocess.py
  70. +164 −335 bigfish/stack/projection.py
  71. +151 −0 bigfish/stack/quality.py
  72. 0 bigfish/stack/tests/__init__.py
  73. +225 −0 bigfish/stack/tests/test_augmentation.py
  74. +436 −0 bigfish/stack/tests/test_filter.py
  75. +201 −0 bigfish/stack/tests/test_io.py
  76. +180 −0 bigfish/stack/tests/test_preprocess.py
  77. +258 −0 bigfish/stack/tests/test_projection.py
  78. +101 −0 bigfish/stack/tests/test_quality.py
  79. +150 −0 bigfish/stack/tests/test_utils.py
  80. +332 −270 bigfish/stack/utils.py
  81. +5 −0 bigfish/weights/.gitignore
  82. 0 bigfish/weights/__init__.py
  83. +9 −0 build_package.sh
  84. +20 −0 docs/Makefile
  85. +5 −0 docs/README.md
  86. +35 −0 docs/make.bat
  87. +65 −0 docs/source/classification/extraction.rst
  88. +50 −0 docs/source/classification/features.rst
  89. +67 −0 docs/source/conf.py
  90. +14 −0 docs/source/detection/cluster.rst
  91. +18 −0 docs/source/detection/colocalization.rst
  92. +57 −0 docs/source/detection/dense.rst
  93. +64 −0 docs/source/detection/spots.rst
  94. +11 −0 docs/source/detection/subpixel.rst
  95. +145 −0 docs/source/index.rst
  96. +14 −0 docs/source/plot/plot_coordinate.rst
  97. +26 −0 docs/source/plot/plot_detection.rst
  98. +28 −0 docs/source/plot/plot_image.rst
  99. +21 −0 docs/source/plot/plot_segmentation.rst
  100. +46 −0 docs/source/segmentation/cell.rst
  101. +44 −0 docs/source/segmentation/nucleus.rst
  102. +57 −0 docs/source/segmentation/postprocessing.rst
  103. +33 −0 docs/source/stack/augmentation.rst
  104. +59 −0 docs/source/stack/io.rst
  105. +124 −0 docs/source/stack/preprocessing.rst
  106. +97 −0 docs/source/utils/utils.rst
  107. BIN images/plot_cell.png
  108. +0 −81 notebooks/Apply filters.ipynb
  109. +0 −129 notebooks/Load coordinates data.ipynb
  110. +0 −950 notebooks/Load images.ipynb
  111. +0 −972 notebooks/Normalize images.ipynb
  112. +4 −0 pytest.ini
  113. +0 −204 python_scripts/2d_pattern_classification.py
  114. +0 −102 python_scripts/check_gpu.py
  115. +3 −11 requirements.txt
  116. +3 −0 requirements_dev.txt
  117. +3 −0 requirements_docs.txt
  118. +0 −15 requirements_stable.txt
  119. +48 −41 setup.py
27 changes: 27 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
comment: false

ignore:
- "setup.py"
- "bigfish/plot"
- "bigfish/deep_learning"
- "bigfish/weights"

coverage:
status:
project:
default:
# Commits pushed to master should not make the overall project
# coverage decrease by more than 1%:
target: auto
threshold: 1%
patch:
default:
# Be tolerant on slight code coverage diff on PRs to limit
# noisy red coverage status on github PRs.
# Note The coverage stats are still uploaded
# to codecov so that PR reviewers can see uncovered lines
# in the github diff if they install the codecov browser
# extension:
# https://github.com/codecov/browser-extension
target: auto
threshold: 1%
146 changes: 133 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,140 @@
# Dot files
.idea/
# Mac OS files
.DS_Store

# Packaging related files
MANIFEST
# PyCharm stuff
.idea/

# folders
playground/

# ### General python stuff ###

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
big_fish.egg-info/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Notebooks
notebooks/old
notebooks/.ipynb_checkpoints
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Data
data/input/*
data/output/*
# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Cache
__pycache__/
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.6
install:
- requirements: requirements_docs.txt
- method: pip
path: .
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: python

python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"

install:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt

script:
- pytest --cov=./
- codecov
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include images/*
115 changes: 114 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,114 @@
# big-fish
# Big-FISH

[![PyPI version](https://badge.fury.io/py/big-fish.svg)](https://badge.fury.io/py/big-fish)
[![Build Status](https://travis-ci.com/fish-quant/big-fish.svg?branch=master)](https://travis-ci.com/fish-quant/big-fish)
[![Documentation Status](https://readthedocs.org/projects/big-fish/badge/?version=stable)](https://big-fish.readthedocs.io/en/latest/?badge=stable)
[![codecov](https://codecov.io/gh/fish-quant/big-fish/branch/master/graph/badge.svg)](https://codecov.io/gh/fish-quant/big-fish)
[![License](https://img.shields.io/badge/license-BSD%203--Clause-green)](https://github.com/fish-quant/big-fish/blob/master/LICENSE)
[![Python version](https://img.shields.io/pypi/pyversions/big-fish.svg)](https://pypi.python.org/pypi/big-fish/)

**Big-FISH** is a python package for the analysis of smFISH images. It includes various methods to **analyze microscopy images**, such **spot detection** and **segmentation of cells and nuclei**. The package allows the user represent the extract properties of a cell as coordinates (see figure below). The ultimate goal is to simplify **large scale statistical analysis** and quantification.

| Cell image (smFISH channel) and its coordinates representation |
| ------------- |
| ![](images/plot_cell.png "Nucleus in blue, mRNAs in red, foci in orange and transcription sites in green") |

## Installation

### Dependencies

Big-FISH requires Python 3.6 or newer. Additionally, it has the following dependencies:

- numpy (>= 1.16.0)
- scipy (>= 1.4.1)
- scikit-learn (>= 0.24.0)
- scikit-image (>= 0.14.2)
- matplotlib (>= 3.0.2)
- pandas (>= 0.24.0)
- mrc (>= 0.1.5)

For segmentation purpose, two additional dependencies can be requested:
- tensorflow (== 2.3.0)
- tensorflow-addons (== 0.12.1)

### Virtual environment

To avoid dependency conflicts, we recommend the the use of a dedicated [virtual](https://docs.python.org/3.6/library/venv.html) or [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) environment. In a terminal run the command:

```bash
conda create -n bigfish_env python=3.6
source activate bigfish_env
```

We recommend two options to then install Big-FISH in your virtual environment.

#### Download the package from PyPi

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install Big-FISH. In a terminal run the command:

```bash
pip install big-fish
```

#### Clone package from Github

Clone the project's [Github repository](https://github.com/fish-quant/big-fish) and install it manually with the following commands:

```bash
git clone git@github.com:fish-quant/big-fish.git
cd big-fish
pip install .
```

## Usage

Big-FISH provides a toolbox for the full analysis pipeline of smFISH images. A complete [documentation](https://big-fish.readthedocs.io/en/stable/) is available online.

This package is part of the [FISH-Quant](https://fish-quant.github.io/) framework and several examples are also available as [Jupyter notebooks](https://github.com/fish-quant/big-fish-examples/tree/master/notebooks).

## Support

If you have any question relative to the repository, please open an [issue](https://github.com/fish-quant/big-fish/issues). You can also contact [Arthur Imbert](mailto:arthur.imbert@mines-paristech.fr) or [Florian Mueller](mailto:muellerf.research@gmail.com).

## Roadmap (suggestion)

Version 1.0.0:
- Complete code coverage.
- Unpin deep learning dependencies
- Add a pretrained pattern recognition model

## Development

### Source code

You can access the latest sources with the commands:

```bash
git clone git@github.com:fish-quant/big-fish.git
cd big-fish
git checkout develop
```

### Contributing

[Pull requests](https://github.com/fish-quant/big-fish/pulls) are welcome. For major changes, please open an [issue](https://github.com/fish-quant/big-fish/issues) first to discuss what you would like to change.

### Testing

Please make sure to update tests as appropriate if you open a pull request. You can install exacts dependencies and specific version of [pytest](https://docs.pytest.org/en/latest/) by running the following command:

```bash
pip install -r requirements_dev.txt
```

To perform unit tests, run :

```bash
pytest bigfish
```

## Citation

If you exploit this package for your work, please cite:

> Arthur Imbert, Wei Ouyang, Adham Safieddine, Emeline Coleno, Christophe Zimmer, Edouard Bertrand, Thomas Walter, Florian Mueller. FISH-quant v2: a scalable and modular analysis tool for smFISH image analysis. bioRxiv (2021) https://doi.org/10.1101/2021.07.20.453024
15 changes: 15 additions & 0 deletions bigfish/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Author: Arthur Imbert <arthur.imbert.pro@gmail.com>
# License: BSD 3 clause

"""
The bigfish package.
"""


# keep a MAJOR.MINOR.PATCH format
# MAJOR: major API changes
# MINOR: new features
# PATCH: backwards compatible bug fixes
# MAJOR.MINOR.PATCHdev means a version under development
__version__ = "0.6.2"
Loading