spacetx / starfish

starfish: unified pipelines for image-based transcriptomics
https://spacetx-starfish.readthedocs.io/en/latest/
MIT License
225 stars 67 forks source link

Errors when using example notebooks #300

Closed ebouilhol closed 6 years ago

ebouilhol commented 6 years ago

Hi, I tried a few notebooks and I can't rich the end of anyone I tried. Let's focus on the allen_smFISH.ipynb here : At the step 5

from starfish.pipeline.filter import Filter
s_clip = Filter.Clip(p_min=10, p_max=100, verbose=True)
s_clip.filter(s)

I get the following error :

--------------------------------------------------------------------
AttributeError                     Traceback (most recent call last)
<ipython-input-16-6caa463fd5e6> in <module>()
      1 from starfish.pipeline.filter import Filter
      2 s_clip = Filter.Clip(p_min=10, p_max=100, verbose=True)
----> 3 s_clip.filter(s)

~/Documents/10_starfish/starfish/starfish/pipeline/filter/clip.py in filter(self, stack)
     75         """
     76         clip = partial(self.clip, p_min=self.p_min, p_max=self.p_max)
---> 77         stack.apply(clip, is_volume=self.is_volume, verbose=self.verbose)

AttributeError: 'Stack' object has no attribute 'apply'

I use python 3.6 on Ubuntu 18.04 I pulled the starfish repository on monday 02 July 11h. I didn't change anything in the notebook's code, including the URL for the JSON, to be sure it don't come from my JSON. (I get the same error if I try to launch it on other data)

Thanks for your help,

Emmanuel

ttung commented 6 years ago

@ambrosejcarr do you know if the allen_SMFISH notebook is up-to-date?

ambrosejcarr commented 6 years ago

@ttung I'll be able to take a look tomorrow on the plane. This issue suggests not. @ebouilhol sorry for the slow response, I'm out on vacation this week.

I think as a part of "get the notebooks working again" I should write tests for each notebook similar to the iss one.

ttung commented 6 years ago

This particular notebook is skipped as part of master testing. Once it's unbroken, remove notebooks/allen_smFISH.py.skip to ensure that it's tested as part of master.

ambrosejcarr commented 6 years ago

When #307 is merged, this (more general) issue will be closed.

ebouilhol commented 6 years ago

ISS is currently working, if you want to look at a functional example

Okay, thanks a lot, I switch on ISS then !

ambrosejcarr commented 6 years ago

Okay, thanks a lot, I switch on ISS then !

Thanks for noticing the broken notebooks. 👍