Skip to content

Autominerva could not read metadata from backsub generated ome TIFF image #577

@yujxiao

Description

@yujxiao

The pipeline runs fine with either backsub and no --viz false, or without backsub and --viz true. When running both backsub and minerva visualization, the error happens as below and the ome tiff generated is incomplete.

ERROR ~ Error executing process > 'viz:autominerva (1)'

Caused by:
Process viz:autominerva (1) terminated with an error exit status (1)

Command executed:

python /app/story.py --in rack-01-well-A01-roi-001-exp-1_backsub.ome.tif --m markers_bs.csv --out story.json
python /app/minerva-author/src/save_exhibit_pyramid.py rack-01-well-A01-roi-001-exp-1_backsub.ome.tif story.json rack-01-well-A01-roi-001-exp-1_backsub

Command exit status:
1

Command output:
Using marker names from markers_bs.csv

Command error:
opening image: rack-01-well-A01-roi-001-exp-1_backsub.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/38
Using marker names from markers_bs.csv
Traceback (most recent call last):
File "/app/story.py", line 159, in
main(in_path, out_path, vars(args)['m'])
File "/app/story.py", line 124, in main
vmin, vmax = auto_threshold(img)
File "/app/story.py", line 24, in auto_threshold
gmm.fit(img_log.reshape((-1,1)))
File "/usr/local/lib/python3.9/site-packages/sklearn/mixture/_base.py", line 181, in fit
self.fit_predict(X, y)
File "/usr/local/lib/python3.9/site-packages/sklearn/base.py", line 1151, in wrapper
return fit_method(estimator, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/sklearn/mixture/_base.py", line 212, in fit_predict
X = self._validate_data(X, dtype=[np.float64, np.float32], ensure_min_samples=2)
File "/usr/local/lib/python3.9/site-packages/sklearn/base.py", line 604, in _validate_data
out = check_array(X, input_name="X", **check_params)
File "/usr/local/lib/python3.9/site-packages/sklearn/utils/validation.py", line 969, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 2 is required by GaussianMixture

And below is the params.yml I used:

workflow:
  start-at: background
  stop-at: downstream
  downstream: scimap
  viz: true
  segmentation: mesmer
  segmentation-channel: 1 6
  segmentation-recyze: false
  background: true
  background-method: backsub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions