Error in dyn.mv.animate_fates
See original GitHub issueHi, I am interested in animate fate transition, but I get an error when run the codes:
progenitor = adata.obs_names[adata.obs.celltype.isin(['Mono'])]
dyn.pd.fate(adata, basis='umap', init_cells=progenitor, interpolation_num=100, direction='forward',
inverse_transform=False, average=False, cores=3)
fig, ax = plt.subplots()
ax = dyn.pl.topography(adata, color='celltype', ax=ax, save_show_or_return='return')
dyn.mv.animate_fates(adata, color='celltype', basis='umap', n_steps=100, fig=fig, ax=ax,
save_show_or_return='save', logspace=True, max_time=None)
|-----? the number of cell states with fate prediction is more than 50. You may want to lower the max number of cell states to draw via cell_states argument.
MovieWriter stderr:
convert: unexpected end-of-file `-': No such file or directory @ error/rgb.c/ReadRGBImage/243.
convert: no images defined `fate_ani.gif' @ error/convert.c/ConvertImageCommand/3235.
Traceback (most recent call last):
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 236, in saving
yield self
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 1091, in save
anim._draw_next_frame(d, blit=False)
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 1126, in _draw_next_frame
self._draw_frame(framedata)
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 1720, in _draw_frame
self._drawn_artists = self._func(framedata, *self._args)
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/dynamo/movie/fate.py", line 222, in update
self.ax.lines = []
AttributeError: can't set attribute
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/dynamo/movie/fate.py", line 363, in animate_fates
anim.save(**save_kwargs_) # save as gif file.
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 1095, in save
writer.grab_frame(**savefig_kwargs)
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 238, in saving
self.finish()
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 344, in finish
self._cleanup() # Inline _cleanup() once cleanup() is removed.
File "/NAS/lh/software/miniconda3/envs/dynamonew/lib/python3.8/site-packages/matplotlib/animation.py", line 375, in _cleanup
raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['convert', '-size', '640x480', '-depth', '8', '-delay', '10.0', '-loop', '0', 'rgba:-', 'fate_ani.gif']' returned non-zero exit status 1.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
dynamo.mv.animate_fates — dynamo 1.2.0 documentation
This class creates necessary components to produce an animation that describes the exact speed of a set of cells at each time point,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, @hyjforesight I rebuild the conda env and downgraded matplotlib to 3.4.3, and it works.
hello @lh12565 how did u fix it? Thanks!