sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
289 stars 141 forks source link

ROI analysis for multiple body parts in features extracted #238

Open Lucas97223 opened 1 year ago

Lucas97223 commented 1 year ago

Is your feature request related to a problem? Please describe. Unless I am incorrect, there is no possibility on SimBA to append ROi features to the features_extracted file for more than one body part. That means I have to create n different projects if I want to study n body parts at the same time. This is totally feasible but way longer than if it was possible to have the analyses of multiple body parts on the same file

Describe the solution you'd like It would therefore be very cool to have the possibility to append the ROI analyses for multiple body parts on the same file "features_extracted".

Describe alternatives you've considered The alternative I am working with for the moment is creating 5 different projects with the same ROIs to have the analyses for 5 body parts

sronilsson commented 1 year ago

Hi @Lucas97223 - yes I think I got it, just to confirm. rather then selecting the number of animals here in the screengrab, you would select the number of body-parts?

image

Lucas97223 commented 1 year ago

Yes, it would be amazing. I think it would be cool to have the possibility to chose which body parts we want to study and also to do that for all the animals

sronilsson commented 1 year ago

@Lucas97223 - if you update to version 1.53.8 you should see another button like the screengrab below. If you use the orange, rather than the red button, you can choose body-parts rather than animals. Please let me know if it works as expected on your end.

image
Lucas97223 commented 1 year ago

Hi @sronilsson, I finally could run the ROI analysis on multiple body parts at the same time thanks to the new version of SimBA and it worked well, as expected. Thank you so much for your help

sronilsson commented 1 year ago

Thanks for letting me know @Lucas97223 !

Lucas97223 commented 1 year ago

Hey, I'm reaching back to you cause I have a problem the output of SimBA when it is performing this analysis. First I want to say that the table is well generated and that it perfectly has the form that I needed for my analysis. The only problem remaining is that, as I just realized, all the columns when the body parts are studied "in zone" are just full of zeros and there are no data there. More precisely, this concerns the columns : "..._zone", "..._zone_cumulative_time" and "..._zone_cumulative_percent". I checked and thi issue appears consistently in different projects.

sronilsson commented 1 year ago

Hi @Lucas97223 - many thanks for helping me troubleshoot this! It took a little bit more re-writing than I expected.. as the body-part information wasn't stored in an accessable way in upstream classes the ROI featurizer it relied on.

I could re-create the error and inserted a fix. If you update to simba 1.54.4 with pip install simba-uw-dev --upgrade, hos does it look on your end?

Lucas97223 commented 1 year ago

Just ran a project again and everything seems fine. The values are here! Thank you

sronilsson commented 1 year ago

Just ran a project again and everything seems fine. The values are here! Thank you

Cheers, let me know if anything else pops up!