Skip to content

Commit

Permalink
Merge pull request #27 from fish-quant/develop
Browse files Browse the repository at this point in the history
v0.4.0
  • Loading branch information
Henley13 authored Sep 24, 2020
2 parents 3448a7d + ec73168 commit 6d3eef9
Show file tree
Hide file tree
Showing 43 changed files with 2,794 additions and 7,071 deletions.
11 changes: 11 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@ coverage:
# 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%
143 changes: 133 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +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
examples/old
examples/.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

# Cache
__pycache__/
# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# 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/
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python

python:
- "3.6"

install:
- pip install -r requirements_dev.txt

script:
- pytest --cov=./
- codecov
53 changes: 30 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Big-FISH

[![Build Status](https://travis-ci.com/fish-quant/big-fish.svg?branch=master)](https://travis-ci.com/fish-quant/big-fish)
[![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)
[![codecov](https://codecov.io/gh/fish-quant/big-fish/branch/master/graph/badge.svg?token=kEnikxXOxP)](https://codecov.io/gh/fish-quant/big-fish)
![License](https://img.shields.io/badge/python-3.6-blue)
[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)

**Big-FISH** is a python package for the analysis of smFISH images. It includes various methods to **manipulate microscopic images**, **detect spots** and **segment relevant area** of the cells. The package allows the user to extract specific signal from images and build a coordinate representation of the cells. The ultimate goal is to ease **large scale statistical analysis** and quantification.
**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 |
| ------------- |
Expand All @@ -16,30 +17,38 @@

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

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

### User installation
Updated dependencies might break.

To avoid dependency conflicts 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 should be a considered option.
### Virtual environment

#### From PyPi
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 bigfish
pip install big-fish
```

#### From Github
#### Clone package from Github

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

```bash
git clone [email protected]:fish-quant/big-fish.git
Expand All @@ -50,26 +59,23 @@ pip install .
## Usage

Big-FISH provides a toolbox for the full analysis pipeline of smFISH images:

- Use `bigfish.stack` subpackage for I/O operations, preprocessing and postprocessing.
- Use `bigfish.segmentation` subpackage for nucleus and cell segmentation.
- Use `bigfish.detection` subpackage for mRNAs detection.
- Use `bigfish.plot` subpackage for plotting routines.
- Use `bigfish.classification` subpackage for pattern recognition tasks.

Several examples are developed in the [examples](https://github.com/fish-quant/big-fish/tree/master/examples) directory.
Several examples are 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:[email protected]) or [Florian Mueller](mailto:[email protected]).

## Roadmap (suggestion)

Version 0.4.0:
- Refactor `bigfish.classification` subpackage.
- Add pattern recognition examples.

Version 0.5.0:
- Switch to tensorflow 2.0.0.
- Switch to tensorflow 2.2.0.
- Integrate a deep learning model for segmentation.

Version 1.0.0:
Expand All @@ -84,6 +90,7 @@ You can access the latest sources with the commands:

```bash
git clone [email protected]:fish-quant/big-fish.git
cd big-fish
git checkout develop
```

Expand Down
4 changes: 2 additions & 2 deletions bigfish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
# MAJOR: major API changes
# MINOR: new features
# PATCH: backwards compatible bug fixes

__version__ = "0.3.0"
# MAJOR.MINOR.PATCHdev means a version under development
__version__ = "0.4.0"
42 changes: 30 additions & 12 deletions bigfish/classification/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
# -*- coding: utf-8 -*-
# Author: Arthur Imbert <[email protected]>
# License: BSD 3 clause

"""
The bigfish.classification module includes models to classify the localization
patterns of the RNA.
The bigfish.classification subpackage includes functions to prepare input data,
craft features and train classification models.
"""

from .input_preparation import (prepare_coordinate_data,
build_boundaries_layers, build_surface_layers,
build_distance_layers, Generator)
from .features import get_features, get_features_name
from .input_preparation import prepare_extracted_data

# ### Load models ###
from .features import compute_features
from .features import get_features_name
from .features import features_distance
from .features import features_in_out_nucleus
from .features import features_protrusion
from .features import features_dispersion
from .features import features_topography
from .features import features_foci
from .features import features_area
from .features import features_centrosome

_features = ["get_features", "get_features_name"]

_input_preparation = ["prepare_coordinate_data", "build_boundaries_layers",
"build_surface_layers", "build_distance_layers",
"Generator"]
_input_preparation = [
"prepare_extracted_data"]

__all__ = _features + _input_preparation
_features = [
"compute_features",
"get_features_name",
"features_distance"
"features_in_out_nucleus"
"features_protrusion"
"features_dispersion"
"features_topography"
"features_foci"
"features_area"
"features_centrosome"]

__all__ = _input_preparation + _features
Loading

0 comments on commit 6d3eef9

Please sign in to comment.