LernerLab / GuPPy

Guided Photometry Analysis in Python, a free and open-source FP analysis tool.
GNU General Public License v3.0
64 stars 11 forks source link

Input Parameters GUI Neurophotometrics #12

Closed cguerreromar closed 1 year ago

cguerreromar commented 2 years ago

Hi LernerLab, Thank you very much for this amazing tool. I am getting started with GuPPy and some questions arose, which are perhaps too basic. In the lab we are using Neurophotometrics to record GCamP photometry on operant boxes, where we also measure the licks in the shape of TTLs. As data, we obtain four channels corresponding to one mouse each instead of regions (like the sample file shows). Each channel has an isosbestic (flag 17) and GCamP signal (flag 18) and this is all included in a single .csv file. However, the TTL signal is given as a binary set of data (0 for no lick, 1 for lick) inside another .csv file. After 'playing' for days with GuPPy, I still have some open questions:

  1. Can I process the data with all mice together in the 4 channels or should I split them into one file per mouse?
  2. Is it possible to include the TTLs for each mouse in said file even if the nature of the signal is different?
  3. Since the timestamp is common for the three parameters, is there any way the software can detect them all and plot them in the same graph to observe the Calcium signal given at a certain TTL? The purpose would be to see the neural encoding of the licks.

Thank you in advance for your time and attention! Best regards, cguerreromar

venus-sherathiya commented 2 years ago

For question 1, you should store the storenames in 4 different output files. for example, when you load your Neurophotometrics data in GuPPy and open Storenames GUI, the storenames GUI will show 10 storenames like, chev1, chev2, chev3, chev4, chod1, chod2, chod3, chod4, event0(for no lick) and event1(for lick). so, when storing storenames select chev1, chod1, event0 or event1 or both (based on which TTL you wanna use) save them in a new file do the same thing again chev2, chod2, event0 or event1 or both and so on.

I didn't get your second question properly.

For third question, you can do that. To achieve that, first perform individual analysis on all your data and then do group analysis. You can watch the Group Analysis tutorial video to get a better idea. If you have any problem, you can always reach out to me. I am always happy to help in your analysis process !!

cguerreromar commented 2 years ago

Thank you for the feedback! For question 1 I wasn't successful at making it possible as plenty of channels are generated for a reason I cannot understand (chev 1 to 14 and chod 1 to 14). The TTLs (events) are given as well in random chod channels and some of the total 28 are rather duplicated or empty. Because all of this I tried to transform it myself for each mouse to .csv format in the same way as you displayed the sample files. Even if it's not the most efficient way to proceed it seemed to work, but it would be nice to find out how to make it compatible from the beginning. I'm sure it must be a matter of column order or something not that complicated to modify, as it does recognise some channels .

The second question was if it was possible to include the events in the all data file but, since I adapted the way of input to the .csv model, everything is split to separate files.

And for the third one, I will try for sure and let you know how it is going!

Now I'm facing an error with the visualization GUI, as it says the following:

['C:\Users\cguerrero\Desktop\PythonAnalysis\Test\Test_output_1'] tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x000001F160D69BE0>>, <Task finished name='Task-1502' coro=<_needs_document_lock.._needs_document_lock_wrapper() done, defined at C:\Users\cguerrero\Anaconda3\envs\guppy\lib\site-packages\bokeh\server\session.py:51> exception=FileNotFoundError('File C:\Users\cguerrero\Desktop\PythonAnalysis\Test\Test_output_1\TestTTL_test_z_score_test.h5 does not exist')>)

When entering the folder there is no such file, as it is indicated. Because it seems to be a file generated by the previous steps I cannot tell what could go wrong, probably because it is the first error message I found all over the prompt. However I do find a .h5 filed named freqAndAmp_z_score_test.h5

Sorry if my questions are too naïve, it's the first time I am using the software.

Thank you so very much again for your patience :)

venus-sherathiya commented 2 years ago

May I see how the screenshots of the Neurophotometrics file (actual raw 'csv' files without any pre-processing) you are using for the analysis ?

Can you also send me the screenshot of the storeslist.csv file ?

cguerreromar commented 2 years ago

Hi Venus, Sorry for the long delay. Here I send you a screenshot of the all data file that is generated in which flags have an assigned value that corresponds to either isobestic or GCamP, but no TTL. TTL is stored in another file which contains ten channels dedicated to the detection of changes in the sensor, and another ten which are saved for the 10 potential signals assigned to mice. However, we only record 4. That's why we would only be interested in taking the numerical columns from 11 to 14, both include CaptureAllData d TTL is stored in another file which contains ten channels dedicated to the detection of changes in the sensor, and another ten which are saved for the 10 potential signals assigned to mice. However, we only record 4. That's why we would only be interested in taking the numerical columns from 11 to 14, both include CaptureLicks

Here is the list of storenames generated CaptureStoreList

Thank you very very much for the support

venus-sherathiya commented 2 years ago

I am not able to understand your TTL file. I have not seen such a case in Neurophotometrics data before. Can we please do a zoom meeting to discuss about it ? Please reach out to me at venus.sherathiya@northwestern.edu