LINCellularNeuroscience/VAME

Still having issues with vame.community()

aGad117 opened this issue · 7 comments

I have seen this issue in previous posts, and I have tried using the fixes suggested and even tried alexcwsmith's version of the repo, but i am still facing issues.

When I try LINCellularNeuroscience VAME, I get this:
IndexError: index 14 is out of bounds for axis 0 with size 14
I tried it again with a smaller subset of videos and got:
IndexError: index 27 is out of bounds for axis 0 with size 27

When I tried alexcwsmith's version of VAME, I got this:
UnboundLocalError: local variable 'merge_nodes' referenced before assignment
I also get error messages depicted in the image:
Screen Shot 2022-09-21 at 10 08 00 AM

and I am also for some reason not able to access the vame.custom from alexcwsmith's version of VAME

Could anyone help and provide why I am facing such issues?

I tried running the code with fewer clusters and got this as an output:

AttributeError: 'FigureManagerBase' object has no attribute 'window'
I am running this on Google Colab so I do not know if this is related to that.

Hi!

To be very frank, the community code is quite messy at the moment and I think one needs to rewrite this functionality. The community analysis is not as straightforward as the rest and needs some hands on coding. I use at the moment other scripts, which I plan to share here soon when we update our VAME version. If you have some python knowledge just send me an email and I provide you with my scripts.

@kvnlxm I couldn't find your email address through normal ways... Do you know when the updates to VAME will come out?

It's in the making! Meanwhile, if there are any issues with the community tree script, could you please post an example of your label series file (_km_label) obtained from pose_segmentation() here, so we can have a look at it?

@Cumol
Hi, I tried this way and it worked for my analysis:

  1. make sure you have installed all the dependencies in the environment.
  2. after git clone the VAME folder, go to directory 'VAME/vame/analysis',
  3. find and open 'tree_hierarchy.py'
  4. find and change 'figManager.window.showMaximized()' to '#figManager.window.showMaximized()'
  5. in VAME virtual env and reinstall VAME by 'python setup.py install'

I guess 'figManager.window.showMaximized()' is just for plotting and not that necessary for following analysis. however, when you get stuck here, the following code just cannot move on.

Wulin

It's in the making! Meanwhile, if there are any issues with the community tree script, could you please post an example of your label series file (_km_label) obtained from pose_segmentation() here, so we can have a look at it?

Hi,
I've also encountered the same error which bothered me for a while. The error showed as follow:

Traceback (most recent call last):
File "demo2.py", line 77, in
vame.community(config, show_umap=False, cut_tree=2)
File "/home/chenlabadmin/miniconda3/envs/VAME/lib/python3.7/site-packages/vame-1.0-py3.7.egg/vame/analysis/community_analysis.py", line 206, in community
File "/home/chenlabadmin/miniconda3/envs/VAME/lib/python3.7/site-packages/vame-1.0-py3.7.egg/vame/analysis/community_analysis.py", line 86, in create_community_bag
File "/home/chenlabadmin/miniconda3/envs/VAME/lib/python3.7/site-packages/vame-1.0-py3.7.egg/vame/analysis/tree_hierarchy.py", line 105, in graph_to_tree
File "/home/chenlabadmin/miniconda3/envs/VAME/lib/python3.7/site-packages/vame-1.0-py3.7.egg/vame/analysis/tree_hierarchy.py", line 67, in merge_func
IndexError: index 28 is out of bounds for axis 0 with size 28

'#figManager.window.showMaximized()' worked for me