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

[WIP] BaristaSeq Notebook #1096

Closed

Conversation

ambrosejcarr
Copy link
Member

  • Adds a work-in-progress BaristaSeq notebook that uses the PixelSpotDecoder to identify genes.

Next steps:

  • Check with the Zador lab if these data make sense for them.

shanaxel42 and others added 11 commits March 11, 2019 11:30
* adding todo's and comment about looping

* reverting experiement.py"

* example looping on allen test

* adding travis wait

* upping travis wait time

* trying to free up mem in allen test

* reverting mem thing

* moving ecample to 3dsmFish

* reverting tavis wait

* regenerated notebooks
Fix how we use starfish.display.
remove assay_comparison.py
1. Where tile shape is being used, we use a dict between axis and the size of the tile along that axis.
2. Where there is a contract for tile data, we indicate that the data should be row-major.

Test plan: make -j fast
This replaces #1080, and depends on #1084

Test plan: `make docker`
* make release targets and pbr-based versions

* Revert pbr

* versioneer-based versions

* Use a str for __is_release_tag__

* Add Makefile help

* Remove coverage files on clean

* Parameterize DOCKER_IMAGE

* Migrate metadata to setup.cfg

* Add twine to ci requirements

* Build release in a virtualenv

* Add docs and a dirty check

* Split release-docker

* Fix release-upload formatting

* Create changelog

* Remove quotes from classifiers

* Add newline to MANIFEST.in

* make docs & helper targets

* make release-tag and fix changelog

* Re-order release sections

* Add missing EDITOR and use '&&'

* Add public methods to help

* Clarify release-check wording
* enabled appending stack and/or spots to existing napari viewer in starfish.display()

Co-Authored-By: kevinyamauchi <kevin.yamauchi@gmail.com>
* Add decoded spot class and related docs to hold gene, x, y, and z coordinate information for each spot. New object is generated from a Decoded IntensityTable.
@codecov-io
Copy link

codecov-io commented Mar 19, 2019

Codecov Report

Merging #1096 into ajc-local-search-blob-detector will decrease coverage by 8.06%.
The diff coverage is 67.06%.

Impacted file tree graph

@@                        Coverage Diff                         @@
##           ajc-local-search-blob-detector    #1096      +/-   ##
==================================================================
- Coverage                           76.45%   68.38%   -8.07%     
==================================================================
  Files                                 221      128      -93     
  Lines                                9890     4865    -5025     
==================================================================
- Hits                                 7561     3327    -4234     
+ Misses                               2329     1538     -791
Impacted Files Coverage Δ
...ish/image/_filter/richardson_lucy_deconvolution.py 43.39% <ø> (-46.44%) ⬇️
.../spots/_pixel_decoder/combine_adjacent_features.py 87.23% <ø> (-4.44%) ⬇️
starfish/image/_filter/mean_high_pass.py 65.71% <ø> (-22.66%) ⬇️
starfish/image/_filter/bandpass.py 61.53% <ø> (-25.7%) ⬇️
starfish/image/_filter/gaussian_high_pass.py 65.71% <ø> (-22.66%) ⬇️
starfish/image/_filter/match_histograms.py 51.28% <ø> (-38.08%) ⬇️
starfish/image/_filter/white_tophat.py 87.09% <ø> (-12.91%) ⬇️
starfish/image/_filter/gaussian_low_pass.py 67.64% <ø> (-20.45%) ⬇️
starfish/spots/_target_assignment/label.py 88.88% <ø> (-1.74%) ⬇️
starfish/image/_filter/clip.py 65.51% <ø> (-25.66%) ⬇️
... and 163 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef92b32...49dae65. Read the comment docs.

shanaxel42 and others added 18 commits March 20, 2019 13:19
…1069)

* adding ability to pass aligned group to Imagestack.from_path_or_url

* fixing lint errors
For running pipeline recipes, we will need to refer to pipeline components by name.  To facilitate that, we will adds a map between the pipeline component name and its implementing class.

We mandate each PipelineComponent provide a name, and we source that from the same variable that defines the CLI command name.

Test plan: see new test.
…ase (#1095)

Rather than each specific PipelineComponent have a link to the AlgorithmBase that describes the contract that the algorithm must implement, each AlgorithmBase implementation points to the PipelineComponent that it serves.

The current arrangement forces all the algorithms to be defined and evaluated in the interpreter before the pipeline component is defined and evaluated.  If we want to create an algorithm that's only used in tests, this is not possible.

The new arrangement ensures that any implementation of a specific AlgorithmBase is registered with its corresponding PipelineComponent.

This adds explicit abstract classes to the AlgorithmBase class hierarchy to make it easier to detect what's an actual algorithm implementation.

Depends on #1094

Test plan: `make -j fast`
* adding make clean docs to travis build
versioneer depends on the git tag being somewhere in the lineage of master.  This updated procedure tries to get the tag into the lineage of master.
Test plan: `make docker`
1. Ensure that the algorithm base classes's `run()` method is consistent with the implementations.
2. Fix missing documentation.
3. Add `*args` to all the run methods such that the implementations' run methods can take additional parameters.

Test plan: `make -j fast lint mypy`
This doesn't change often enough to justify running on every branch.
For example, starfish/test/experiment/builder/* is getting moved to starfish/experiment/builder/test.

This simplifies navigation in the IDE, and also ensures we put the tests in the right place (c.f., all the filter tests in starfish/test/pipeline).

Test plan: `make -j fast lint mypy`
Exclude the test files from the calculations of what code is covered.

Also exclude the file that's autogenerated by versioneer.
This silences a harmless warning from pytest.  pytest scrapes all files for methods and classes that start with test to try to run them as tests.  This is not an actual test; instead, it's a class used in a test.

Test plan: `pytest starfish/multiprocessing/test/test_multiprocessing.py`
Shapes are mappings from axes to axis size.
* remove code from IntensityTable.to_expression_matrix that references regions object produced by deleted code
Remove Registration pipeline component in favor or Learn and ApplyTransform
I'm going to build other click-related code, and want to keep them together.

Remove the hack to suppress warnings because we don't check for F401 on `__init__.py` files.

Test plan: `make -j lint mypy`
ttung and others added 24 commits April 8, 2019 00:36
… arrays. (#1143)

1. blobs_image is, at the user's interaction level, an ImageStack.  Internally, `starfish.spots._detector.detect.detect_spots` will convert it to a numpy array.  This is to allow the code path where we don't have a reference image to continue taking advantage of ImageStack's apply/transform logic.
2. Because the way we generate the blobs_image (max projection) happens on different axes, it must be explicitly provided to `detect_spots`.
3. Other small and insignificant changes.

Test plan: `make -j test run_notebooks`
Test plan: `make -j4 fast slow run-notebooks`
1. Normalize the run(..) method with the contract specified in SpotFinderAlgorithmBase.
2. Flag an error if someone tries to specify a blobs_image with LocalSearchBlobDetector.
3. Temporarily provide a `image_to_spots` method which the SpotFinderAlgorithmBase requires.
…#1137)

#1124 introduced new click param types that directly return an ImageStack or a Codebook.  This refactors the existing cli params to use those types.

Test plan: `make -j fast`
1. Improve documentation.
2. Properly type the `convert` method.

Test plan: `make -j lint mypy`
Rather than download the dataset, we can now directly refer to the URL in the command line.

The allen_smFISH and merfish cli tests still reference `get_cli_test_data.py`, but both tests are disabled.

Test plan: `pytest -v -n4 starfish/test/full_pipelines/cli`
starfish/test/full_pipelines/cli/test_iss.py changed in #1083, but docs/source/usage/iss/iss_cli.sh was never updated.
1. Fix for starfish.display.stack being renamed to starfish.display.
2. substack should be stack.
3. Remove unneeded imports.
4. Use public API in notebooks `starfish.spots.SpotFinder.LocalSearchBlobDetector` instead of `starfish.spots._detector.local_search_blob_detector.LocalSearchBlobDetector`
#1124 ensures that blobs_stack is already an ImageStack, but #1143 still does the conversion.  Merging both created this conflict.

Test plan: `pytest starfish/test/full_pipelines/cli/test_iss.py`
I forgot to do this in #1150
This is needed as the memory requirements are too high.
1. `set_slice` will catch mismatched tile sizes, so we don't need that.
2. aggregate all the dtypes, and verify that len(data type kinds) == 1 and len(data type sizes) == 1.

Test plan: `pytest -v -n4 starfish/imagestack`
* uses 3d smfish notebook as test case
* no changes to logic of testing (the new script is untested!)
* adds gitignore keys for the output of sphinx-gallery, which are incorporated into the documentation in the source directory
* adds additional galleries to docs/conf.py to render each of the data formatting examples and what were previously the notebooks
* Does NOT remove the notebooks, but they can be removed once they are properly tested in their new .py form/home.
* Makes minimal changes to the .py files to add docstrings to each data formatting and data processing example. These docstrings are needed by sphinx-gallery to add references to each file's header such that they can be linked to by the documentation.
* Adds several WIP vignettes about how to use starfish to create an image processing pipeline

* New makefile targets: run-examples, run__$(shell_script_name), and run__$(python_script_name)

Examples:

```
% make run-examples
% make run__iss_cli.sh
% make run__iss_pipeline.py
```
@ambrosejcarr ambrosejcarr force-pushed the ajc-baristaseq-notebook branch from 8c7f7f5 to 0d4a479 Compare April 10, 2019 19:10
@ttung ttung closed this Apr 11, 2019
@ttung ttung deleted the ajc-baristaseq-notebook branch April 11, 2019 00:01
@ambrosejcarr ambrosejcarr restored the ajc-baristaseq-notebook branch April 11, 2019 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants