Skip to content

Commit

Permalink
Migrate cellfinder into this package (#29)
Browse files Browse the repository at this point in the history
* update travis config

* update readme link

* Update brainio req

* update imlib version

* Delete CNAME

* Create CNAME

* Delete CNAME

* update docs

* badges

* update docs

* v0.3.13 notes

* rcbump

* update requirements

* update requirements

* bump

* add xenial tests

* fix cell_standard import bugs

* bump

* remove unused code

* remove unused code

* remove docs

* update link to docs

* remove 3D viewer

* update reqs

* start napari 0.3.0 compatibility

* update curation to napari 0.3.0

* bump

* fix deleting files issue on windows

* update tf version

* update urls

* bump

* update contributing

* bump

* PR template

* update PR template

* update PR template

* gitter link in issues

* gitter link in issues

* troubleshooting link in issues

* update issue template

* update issue template

* add pytest config

* registration test and new atlas compatibility

* bump

* remove osx testing

* bump

* registration compatibility

* update reqs

* bump

* update badge

* add probe fig

* neuro docs link

* update readme

* update readme

* update readme

* bump reqs

* update reqs

* bump

* rcbump

* update reqs

* update reqs

* rc bump

* update reqs

* update deployment

* update deployment

* bump

* update reqs

* bump

* Update readme

* fix cells to standard space tool

* black formatting

* Update training w logging etc. (#125)

* fix checkpint saving bug with no validation data

* make saving after each training epoch the default

* update requirements

* remove testing reqs

* add training logging

* add more logging

* Add logging

* update readme

* add --version cli flag

* update required imlib version

* update license

* brainreg integration (#142)

* Update dependencies

* lint


* add brainreg registration

* continue brainreg integration

* refactor

* remove group summary

* remove amap references

* remove unused tests

* add reg test

* remove unused code

* remove unused code

* update whattorun

* remove heatmap

* remove neuro depedency

* remove brainio

* remove dependencies

* remove unused code

* update linting

* refactor

* save points

* save points to single directory

* add heatmap

* update summary csv saving

* remove option to save relative structure centres when splitting

* deal with no cells being detected

* update skipping of cell candidate dependent steps

* save json

* remove unused code

* update test scripts

* update reqs

* Update testing

* update requirements

* update testing

* update deployment

* update logging of metadata

* Update testing

* update registration test

* update cli docs

* remove pyside import

* pyqt -> pyside

* Update readme

* Update DOI

* update urls

* update readme

* V0.4.0 - brainglobe compatibility (#146)

* remove duplicate code

* save brainreg json

* update required numpy version

* update gitter links

* update reqs

* move from xyz to axes 012 etc

* make orientation mandatory

* allow registration test failures (for now)

* update travis config

* Update wheelbuilding (#147)

* update docker script

* Bump version: 0.4.0 → 0.4.1

* Update contributing

* update readme

* Bump version: 0.4.1 → 0.5.0

* Bump version: 0.5.0 → 0.6.0

* revert version

* Bump version: 0.4.1 → 0.4.2

* voxel size bug fix

* Bump version: 0.4.2 → 0.4.3

* update citation

* brainrender 1.1 compatibility

* Bump version: 0.4.3 → 0.4.4

* update cube extraction

* Bump version: 0.4.4 → 0.4.5

* Allow zero borders of image (#153)

* update gitignore

* Allow zero intensity backgrounds

* Bump version: 0.4.5 → 0.4.6

* Cell export (#155)

* update whattorun

* add all cell export

* don't run analysis without registration

* Migrate to GH actions and fix brainrender export (#156)

* start working on new curation interface

* load raw data

* add cell saving

* load and analyse cells

* reset status

* reorder imports

* remove duplicated code

* alpha bump

* switch raw data loading

* old curation compatibility

* test on GH actions

* brainrender export compatible with v2

* lint

* update GH actions

* Update conda env

* bump

* remove unused imports

* remove travis configs

* Bump version: 0.4.6 → 0.4.7

* update badhes

* Update issue links

* update dependencies (#161)

* Bump version: 0.4.7 → 0.4.8

* remove docs issue template

* Update README.md

* Update README.md

* Update citation.

* Update test_and_deploy.yml

* Extract computation to cellfinder-core (#164)

* remove unused code

* remove detection code

* remove core code

* remove config

* add coveralls github actions

* add github token for coveralls

* update token for coveralls

* update testing

* remove imlib.source dependency

* update file sourcing

* remove unused code

* Bump version: 0.4.8 → 0.4.9

* Update versioning (#166)

* Update deployment

* Update bump2version config

* update testing workflow

* Bump version: 0.4.11-rc5 → 0.4.11-rc6

* Bump version: 0.4.11-rc6 → 0.4.11

* Move to brainglobe-napari-io (#167)

* update flake config

* Update requirements

* update readme

* Update docs (#171)

* flake ignore .eggs

* Update readme

* Fix #172 (#173)

* fix bug when continuing from detection

* Bump version: 0.4.11 → 0.4.12-rc0

* Bump version: 0.4.12-rc0 → 0.4.12

* update readme

* Update readme & bundle cellfinder-napari (#177)

* Add napari plugin to requirements

* update readme with links to core & napari packages

* Update readme formatting

* Update readme formatting

* Update readme

* Emphasise link to the data requirements

* only analyse cells if points exist

* Bump version: 0.4.12 → 0.4.13-rc0

* Bump version: 0.4.13-rc0 → 0.4.13

* fix analysis bug

* Bump version: 0.4.13 → 0.5.0-rc0

* Bump version: 0.5.0-rc0 → 0.5.0

* revert version

* Bump version: 0.4.14 → 0.4.15-rc0

* Bump version: 0.4.15-rc0 → 0.4.15

* Update README.md

* Update README.md

* update url

* update readme

* update readme

* Export to abc4d (#183)

* export to abc4d

* update type of abcd4 output

* save to abc4d as float64

* pin to latest version of cellfinder-core

* Bump version: 0.4.15 → 0.4.16-rc0

* Bump version: 0.4.16-rc0 → 0.4.16

* update citation

* update supported python versions

* Bump version: 0.4.16 → 0.4.17-rc0

* Bump version: 0.4.17-rc0 → 0.4.17

* update testing

* run tests on PR

* update twitter

* Update environment.yml

* Update license.

* Update website badge

* Update README.md

* Add credits (#187)

* Update README.md

* figures bug

* Bump version: 0.4.17 → 0.4.18-rc0

* Bump version: 0.4.18-rc0 → 0.4.18

* remove cython from setup

* Bump version: 0.4.18 → 0.4.19-rc0

* Bump version: 0.4.19-rc0 → 0.4.19

* Update README.md

* Create Dockerfile

* Update test_and_deploy.yml

* Bump version: 0.4.19 → 0.4.20-rc0

* update GH actions workflow

* Bump version: 0.4.20-rc0 → 0.4.20-rc1

* Update README.md

* Bump version: 0.4.20-rc1 → 0.4.20

* Update README.md

* Expand pre commit and ci (#192)

* Expand `pre-commit` checks

* Add specific linting CI

* Run `pre-commit` explicitly

* Only run tests on successful linting

* Move badges

* Move linting CI within same file due to `workflow_run` limitations

* Use relative paths for test data directories

* Fix black version in pre-commit-config

* Use re-usable GH actions to run CI

* Allow easy testing with dev version of cellfinder-core

* Set input_coredev environment variable

* Ignore direnv

* Introduce some typing to understand the code

* Fix typing

* Add some docstrings to analyse

* Don't specify QT backend in requirements

* Update CODE_OF_CONDUCT.md

* Use standard BrainGlobe code of conduct.

* Revert "Don't specify QT backend in requirements" (#206)

* Delete CONTRIBUTING.md

* Add contributing link

* remove repo-specific templates

* Change readme badge to codecov.

* Modify setup for napari and tensorflow (#215)

* removed tensorflow dependency

* napari-related dependencies are now optional

* Update tooling (#218)

* update pre-commit

* lint

* update python version

* Update brainreg API use (#219)

* Update brainreg API usage

* Bump version: 0.4.20 → 0.4.21-rc0

* Bump version: 0.4.21-rc0 → 0.4.21

* Improve performance of create_all_cell_csv  (#220)

* improve performance of create_all_cell_csv

* update pre-commit config

* remove use of deprecated numpy bool alias

---------

Co-authored-by: Adam Tyson <[email protected]>

* Test on macOS (#222)

* Test on macOS

* Use NI actions

* Add logging of multiple processes (#224)

* Use standard pre-commit config (#223)

* Add standard pre-commit config

* Add automated pre-commit fixes

* Fix bare except

* Clean requirements (#225)

* Update README.md

* Test that planes are saved

Fix linting

* Make sure planes are saved

* Update links (#229)

* [pre-commit.ci] pre-commit autoupdate (#230)

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.240 → v0.0.272](astral-sh/ruff-pre-commit@v0.0.240...v0.0.272)
- [github.com/psf/black: 23.1.0 → 23.3.0](psf/black@23.1.0...23.3.0)
- [github.com/pre-commit/mirrors-mypy: v0.991 → v1.3.0](pre-commit/mirrors-mypy@v0.991...v1.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#232)

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.272 → v0.0.275](astral-sh/ruff-pre-commit@v0.0.272...v0.0.275)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](pre-commit/mirrors-mypy@v1.3.0...v1.4.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#233)

updates:
- https://github.com/charliermarsh/ruff-pre-commithttps://github.com/astral-sh/ruff-pre-commit
- [github.com/astral-sh/ruff-pre-commit: v0.0.275 → v0.0.276](astral-sh/ruff-pre-commit@v0.0.275...v0.0.276)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update dependency (imlib -> brainglobe-utils) (#231)

* [pre-commit.ci] pre-commit autoupdate (#234)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.276 → v0.0.277](astral-sh/ruff-pre-commit@v0.0.276...v0.0.277)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#237)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.277 → v0.0.278](astral-sh/ruff-pre-commit@v0.0.277...v0.0.278)
- [github.com/psf/black: 23.3.0 → 23.7.0](psf/black@23.3.0...23.7.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#238)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.278 → v0.0.280](astral-sh/ruff-pre-commit@v0.0.278...v0.0.280)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#239)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.280 → v0.0.281](astral-sh/ruff-pre-commit@v0.0.280...v0.0.281)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update setup.py (#240)

Force version of brainglobe-utils that has the `DefaultDict` fix.

* Update manual version (#241)

* Update manual version

New version in setup.py for patched version.

There look to be old tags (v0.6.0) that are datestamped 2020, but the latest releases are from 2021 and only reach v0.4.21.

Bumping to version `v0.7.0` to skip around this ambiguity. Will generate release notes once pushed to PyPI.

* Update version in __init__.py

* [pre-commit.ci] pre-commit autoupdate (#243)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.281 → v0.0.282](astral-sh/ruff-pre-commit@v0.0.281...v0.0.282)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#244)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.282 → v0.0.284](astral-sh/ruff-pre-commit@v0.0.282...v0.0.284)
- [github.com/pre-commit/mirrors-mypy: v1.4.1 → v1.5.0](pre-commit/mirrors-mypy@v1.4.1...v1.5.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Migrate to pyproject (#247)

* Add napari to dependencies

* Migrate to pyproject

* Update metadata fns in init

* Update CI to build with pyproject.toml

* Manifest fix

* Remove CLI scripts and hanging dependencies

* Apply code review suggestions

* [pre-commit.ci] pre-commit autoupdate (#248)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.284 → v0.0.285](astral-sh/ruff-pre-commit@v0.0.284...v0.0.285)
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](pre-commit/mirrors-mypy@v1.5.0...v1.5.1)

* update type assertion

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Adam Tyson <[email protected]>

* [pre-commit.ci] pre-commit autoupdate (#249)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.285 → v0.0.286](astral-sh/ruff-pre-commit@v0.0.285...v0.0.286)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Set pre-commit autoupdate frequency to monthly (#250)

* [pre-commit.ci] pre-commit autoupdate (#252)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.286 → v0.0.287](astral-sh/ruff-pre-commit@v0.0.286...v0.0.287)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#253)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.287 → v0.0.292](astral-sh/ruff-pre-commit@v0.0.287...v0.0.292)
- [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update to brainreg v1 compliance (#255)

* Update to brainreg v1 compliance

* Drop py3.8, add py3.11

* cellfinder-core (tensorflow <2.12) does not support py3.11

* [pre-commit.ci] pre-commit autoupdate (#256)

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0)
- [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.4](astral-sh/ruff-pre-commit@v0.0.292...v0.1.4)
- [github.com/psf/black: 23.9.1 → 23.10.1](psf/black@23.9.1...23.10.1)
- [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.6.1](pre-commit/mirrors-mypy@v1.5.1...v1.6.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Replace `pandas.df.append` with `safe_concat` (#259)

* add a failing test for get_region_totals

reproduces brainglobe/cellfinder#254
fails as expected with pandas 2.1.3
passes with pandas 1.5.3
a dummy volumes.csv created by cutting down version from registration_output data

* distribute test points across region/hemisphere, save regression data

regression data from pandas 1.5.3

* basic local fix

* use safe_concat util instead

* tweak test

avoid using hard-coded paths and writing tmp data to codebase

* Fix pathing problems (#260)

* adapt test_subdirectories to extra data subdir

---------

Co-authored-by: Will Graham <[email protected]>

* Change cellfinder to brainglobe-workflows everywhere

* Keep cellfinder alias for CLI script

* Ruff works

* Hard-depend on pooch

* Adapt pandas fix from cellfinder

* Comply with asv run specs

* Purge Docker-related things (#30)

* Add note on dependency information

* Update README with cellfinder name

* Convert cellfinder mention to a stub, and direct to documentaiton online

* Apply suggestions from code review

Co-authored-by: Alessandro Felder <[email protected]>

* Fix double link sentence

* Remove asv config file from MANIFEST and build

* Ship default napari backend with optional dependency

* Group cellfinder tests to make it clear where they are

* Update pyproject.toml

Co-authored-by: Alessandro Felder <[email protected]>

---------

Co-authored-by: Adam Tyson <[email protected]>
Co-authored-by: Adam Tyson <[email protected]>
Co-authored-by: Adam Tyson <[email protected]>
Co-authored-by: Patrick Roddy <[email protected]>
Co-authored-by: David Stansby <[email protected]>
Co-authored-by: Niko Sirmpilatze <[email protected]>
Co-authored-by: stegiopast <[email protected]>
Co-authored-by: Alessandro Felder <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
10 people authored Dec 13, 2023
1 parent e69e83e commit afba965
Show file tree
Hide file tree
Showing 476 changed files with 6,193 additions and 105 deletions.
48 changes: 30 additions & 18 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@ name: tests
on:
push:
branches:
- '*'
- "main"
tags:
- '*'
- "*"
pull_request:
workflow_dispatch:
inputs:
coredev:
description: 'Tests with development version of cellfinder-core'
required: true
default: 'false'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/lint@v2

manifest:
name: Check Manifest
name: Check manifest
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/check_manifest@v2
Expand All @@ -24,20 +35,21 @@ jobs:
needs: [linting, manifest]
name: ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
env:
INPUT_COREDEV: ${{ github.event.inputs.coredev }}
strategy:
fail-fast: false
matrix:
# Run all supported Python versions on linux
python-version: ["3.8", "3.9", "3.10"]
# Run tests on ubuntu across all supported versions
python-version: ["3.9", "3.10"]
os: [ubuntu-latest]
# Include one windows and macos run
# Include at least one MacOS and Windows test
include:
- os: macos-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.10"

steps:
# Run tests
- uses: neuroinformatics-unit/actions/test@v2
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -48,19 +60,19 @@ jobs:
if: github.event_name == 'push' && github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/build_sdist_wheels@v2

- uses: neuroinformatics-unit/actions/build_sdist_wheels@v2

upload_all:
name: Publish build distributions
needs: [build_sdist_wheels]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_type == 'tag'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TWINE_API_KEY }}
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TWINE_API_KEY }}
64 changes: 57 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Custom config files
*.conf.custom

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

# Cython
*.c
*.cpp

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -20,9 +26,11 @@ lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -42,8 +50,9 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
*,cover
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
Expand All @@ -52,22 +61,30 @@ coverage.xml
# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask instance folder
# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/build/

# pydocmd
_build/
mkdocs.yml

# MkDocs documentation
/site/
site/

# PyBuilder
target/

# Pycharm and VSCode
.idea/
venv/
.vscode/

# IPython Notebook
Expand All @@ -76,9 +93,42 @@ venv/
# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

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

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mypy
.mypy_cache/

*.~lock.*

pip-wheel-metadata/

# OS
.DS_Store

# written by setuptools_scm
**/_version.py
benchmarks/results/*

# Benchmarking with ASV
.asv/
14 changes: 9 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Configuring https://pre-commit.ci/
ci:
autoupdate_schedule: monthly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: check-executables-have-shebangs
Expand All @@ -12,20 +15,21 @@ repos:
args: [--fix=lf]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.10.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.6.1
hooks:
- id: mypy
additional_dependencies:
- types-setuptools
- types-requests
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
Expand Down
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023, BrainGlobe developers
Copyright (c) 2023, BrainGlobe developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +13,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of brainglobe-scripts nor the names of its
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand Down
25 changes: 17 additions & 8 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
include LICENSE
include README.md
include LICENSE

exclude .pre-commit-config.yaml
exclude *.yaml
exclude *.yml
exclude Dockerfile
exclude *.ini
exclude asv.conf.json
exclude brainglobe_workflows/cellfinder/default_config.json

recursive-include brainglobe_workflows *.py
include brainglobe_workflows/cellfinder/default_config.json

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude docs *
recursive-exclude tests *

include *.json
recursive-include benchmarks *.json
recursive-include benchmarks *.py
recursive-exclude benchmarks/results *
global-include *.pxd

prune benchmarks
prune docs
prune tests
prune resources

prune .github
prune .tox
76 changes: 75 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
# brainglobe-workflows
[![Python Version](https://img.shields.io/pypi/pyversions/brainglobe-workflows.svg)](https://pypi.org/project/brainglobe-workflows)
[![PyPI](https://img.shields.io/pypi/v/brainglobe-workflows.svg)](https://pypi.org/project/brainglobe-workflows)
[![Downloads](https://pepy.tech/badge/brainglobe-workflows)](https://pepy.tech/project/brainglobe-workflows)
[![Wheel](https://img.shields.io/pypi/wheel/brainglobe-workflows.svg)](https://pypi.org/project/brainglobe-workflows)
[![Development Status](https://img.shields.io/pypi/status/brainglobe-workflows.svg)](https://github.com/brainglobe/brainglobe-workflows)
[![Tests](https://img.shields.io/github/workflow/status/brainglobe/brainglobe-workflows/tests)](
https://github.com/brainglobe/brainglobe-workflows/actions)
[![codecov](https://codecov.io/gh/brainglobe/brainglobe-workflows/branch/master/graph/badge.svg?token=s3MweEFPhl)](https://codecov.io/gh/brainglobe/brainglobe-workflows)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](https://brainglobe.info/developers/index.html)
[![Website](https://img.shields.io/website?up_message=online&url=https%3A%2F%2Fbrainglobe.info)](https://brainglobe.info/documentation/brainglobe-workflows/index.html)
[![Twitter](https://img.shields.io/twitter/follow/brain_globe?style=social)](https://twitter.com/brain_globe)

# BrainGlobe Workflows

`brainglobe-workflows` is a package that provides users with a number of out-of-the-box data analysis workflows employed in neuroscience, implemented using BrainGlobe tools.
You can view the [full documentation for each workflow](https://brainglobe.info/documentation/brainglobe-workflows/index.html) online.
You can also find the documentation for the backend BrainGlobe tools these workflows use [on our website](https://brainglobe.info/).

At present, the package offers the following workflows:

- [cellfinder](#cellfinder): Whole-brain detection, registration, and analysis.

## Installation

If you want to install BrainGlobe workflows as a standalone tool, you can run `pip install` in your desired environment:

```bash
pip install brainglobe-workflows
```

`brainglobe-workflows` is built using BrainGlobe tools, and it will automatically fetch the tools that it needs and install them into your environment.
Once BrainGlobe version 1 is available, this package will fetch all BrainGlobe tools and handle their install into your environment, to prevent potential conflicts from partial-installs.

## Contributing

Contributions to BrainGlobe are more than welcome.
Please see the [developers guide](https://brainglobe.info/developers/index.html).

## Citing `brainglobe-workflows`

**If you use any tools in the [brainglobe suite](https://brainglobe.info/documentation/index.html), please [let us know](mailto:[email protected]?subject=cellfinder), and we'd be happy to promote your paper/talk etc.**

If you find [`cellfinder`](#cellfinder) useful, and use it in your research, please cite the paper outlining the cell detection algorithm:
> Tyson, A. L., Rousseau, C. V., Niedworok, C. J., Keshavarzi, S., Tsitoura, C., Cossell, L., Strom, M. and Margrie, T. W. (2021) “A deep learning algorithm for 3D cell detection in whole mouse brain image datasets’ PLOS Computational Biology, 17(5), e1009074
[https://doi.org/10.1371/journal.pcbi.1009074](https://doi.org/10.1371/journal.pcbi.1009074)
>
If you use any of the image registration functions in `cellfinder`, please also cite [`brainreg`](https://github.com/brainglobe/brainreg#citing-brainreg).

---

## Cellfinder

Whole-brain cell detection, registration and analysis.

If you want to just use the cell detection part of `cellfinder`, please see the standalone [cellfinder-core](https://github.com/brainglobe/cellfinder-core) package, or the [cellfinder plugin](https://github.com/brainglobe/cellfinder-napari) for [napari](https://napari.org/).

`cellfinder` is a collection of tools developed by [Adam Tyson](https://github.com/adamltyson), [Charly Rousseau](https://github.com/crousseau) and [Christian Niedworok](https://github.com/cniedwor) in the [Margrie Lab](https://www.sainsburywellcome.org/web/groups/margrie-lab), generously supported by the [Sainsbury Wellcome Centre](https://www.sainsburywellcome.org/web/).

`cellfinder` is a designed for the analysis of whole-brain imaging data such as [serial-section imaging](https://sainsburywellcomecentre.github.io/OpenSerialSection/) and lightsheet imaging in cleared tissue.
The aim is to provide a single solution for:

- Cell detection (initial cell candidate detection and refinement using deep learning) (using [cellfinder-core](https://github.com/brainglobe/cellfinder-core)),
- Atlas registration (using [brainreg](https://github.com/brainglobe/brainreg)),
- Analysis of cell positions in a common space.

Basic usage:

```bash
cellfinder -s signal_images -b background_images -o output_dir --metadata metadata
```

Full documentation can be found [here](https://brainglobe.info/documentation/cellfinder/index.html).
10 changes: 7 additions & 3 deletions brainglobe_workflows/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from importlib.metadata import PackageNotFoundError, version
from importlib.metadata import PackageNotFoundError, metadata

try:
__version__ = version("brainglobe-workflows")
__version__ = metadata("brainglobe_workflows")["version"]
__author__ = metadata("brainglobe_workflows")["author-email"]
__license__ = metadata("brainglobe_workflows")["license"]
except PackageNotFoundError:
# package is not installed
# Package not installed
pass

del metadata
Empty file.
Loading

0 comments on commit afba965

Please sign in to comment.