Giter Club home page Giter Club logo

auto-minerva's People

Contributors

jmuhlich avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

auto-minerva's Issues

Slice step cannot be zero

Example HTAN dataset syn24829436, an mIHC dataset, fails with the error slice step cannot be zero

python story.py ~/miniature/data/HTA9_1_BA_M_ROI03.ome.tif
opening image: /home/ubuntu/miniature/data/HTA9_1_BA_M_ROI03.ome.tif
reading metadata
analyzing channel 1/12
Traceback (most recent call last):
  File "/home/ubuntu/auto-minerva/story.py", line 109, in <module>
    main()
  File "/home/ubuntu/auto-minerva/story.py", line 90, in main
    vmin, vmax = auto_threshold(img)
  File "/home/ubuntu/auto-minerva/story.py", line 16, in auto_threshold
    img = img[::ss, ::ss]
ValueError: slice step cannot be zero

Home button access denied

Generated stories show access denied when clicking the home button (for s3 hosted stories served through cloudfront.

Can we remove or point this back to the story "start"

Elegantly set thresholds for empty channels

Auto-minerva story.py fails on blank channels as follows (where channel 15 is all zero)
[note there is also a Warning for channel 1]

This is likely to occur for techniques such as MIBI where there is very low contrast, particularly for normal tissues with no/few cells exhibiting a particular marker and for included control channels.

Could we add a try/except into the mixture fitting that perhaps just sets [0,1] threshold when fitting fails

nxf-scratch-dir ip-172-22-12-59.ec2.internal:/tmp/nxf.MWYxHayB6P
opening image: Point3301_31717.ome.tif
reading metadata
WARNING: Could not read OME metadata. Story will use generic channel names and
    the scale bar will be omitted.
analyzing channel 1/45
/venv/lib/python3.9/site-packages/sklearn/mixture/_base.py:143: ConvergenceWarning: Number of distinct clusters (2) found smaller than n_clusters (3). Possibly due to duplicate points in X.
  cluster.KMeans(
analyzing channel 2/45
analyzing channel 3/45
analyzing channel 4/45
analyzing channel 5/45
analyzing channel 6/45
analyzing channel 7/45
analyzing channel 8/45
analyzing channel 9/45
analyzing channel 10/45
analyzing channel 11/45
analyzing channel 12/45
analyzing channel 13/45
analyzing channel 14/45
analyzing channel 15/45
Traceback (most recent call last):
  File "/auto-minerva/story.py", line 139, in
    main()
  File "/auto-minerva/story.py", line 120, in main
    vmin, vmax = auto_threshold(img)
  File "/auto-minerva/story.py", line 22, in auto_threshold
    gmm.fit(img_log.reshape((-1,1)))
  File "/venv/lib/python3.9/site-packages/sklearn/mixture/_base.py", line 198, in fit
    self.fit_predict(X, y)
  File "/venv/lib/python3.9/site-packages/sklearn/mixture/_base.py", line 228, in fit_predict
    X = self._validate_data(X, dtype=[np.float64, np.float32], ensure_min_samples=2)
  File "/venv/lib/python3.9/site-packages/sklearn/base.py", line 561, in _validate_data
    X = check_array(X, **check_params)
  File "/venv/lib/python3.9/site-packages/sklearn/utils/validation.py", line 797, in check_array
    raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 2 is required.

Can't handle float32 pixel type

story.py fails for an example HTAN dataset (syn25701060, an IMC image)

python story.py ~/miniature/data/HT060P1_REMAIN_ROI_04.ome.tiff  > HT060P1_REMAIN_ROI04.story.json
opening image: /home/ubuntu/miniature/data/HT060P1_REMAIN_ROI_04.ome.tiff
Traceback (most recent call last):
  File "/home/ubuntu/auto-minerva/story.py", line 109, in <module>
    main()
  File "/home/ubuntu/auto-minerva/story.py", line 58, in main
    raise Exception(f"Can't handle {zarray.dtype} pixel type")
Exception: Can't handle float32 pixel type

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.