pynapple icon indicating copy to clipboard operation
pynapple copied to clipboard

Suite2P as supported input

Open mariacozan opened this issue 3 years ago • 6 comments

Hi, This is an amazing tool, thank you for creating it! Unfortunately though I use Suite2P to extract calcium traces, could you implement it in Pynapple as a supported input?

Thanks!

mariacozan avatar Jul 05 '22 10:07 mariacozan

Hi sure. It will be part of the next version of pynapple. I will leave the issue open until it's ready

gviejo avatar Jul 05 '22 14:07 gviejo

Hello I just pushed a Suite2P loader but I would like to know if what is attached to the loader is sufficient for further analysis.. Would you be ok to test it? The steps to install it are here :

$ conda create --name pynapple pip python=3.8
$ conda activate pynapple
$ git clone https://github.com/PeyracheLab/pynapple.git
$ cd pynapple
$ pip install -e .

You can load a session like this :

data = nap.load_session("yourpath", "suite2p")

The doc : https://peyrachelab.github.io/pynapple/io.suite2p/

gviejo avatar Sep 15 '22 20:09 gviejo

Following up on this thread with a related, but different question.

suite2p has a built-in mechanism to save out NWB files which preserves all of the information used for suite2p processing. If I use their native loading mechanism, I can load all kinds of settings that are valuable.

I want to use suite2p's native loading mechanism combined with Pynapple to perform some visualizations and analysis.

When using Pynapple to load in the data, I get a tsdFrame named 'plane0' (see screenshot - ignore the other variables). This is not surprising because I only have one imaging plane.

The issue arising is that rather than extracting the various kinds of information (Deconvolved signals, Fluorescence, neuropil), pynapple only seems to extract Deconvolved signals and terms them plane0.

I can work around this by simply saving out separate processing modules for 'Deconvolved', 'Fluorescence' and 'neuropil' for one plane, but I'll have redundancies in the NWB file.

Do you all have plans to incorporate suite2p's NWB saving mechanism into Pynapples loading mechanism? Or do you have any other recommendations? Happy to share any files as needed.

Screenshot 2024-06-21 082246

JohnStout avatar Jun 21 '24 12:06 JohnStout

Hi John, it might be a problem of nested time series. I guess the easier is to share a small NWB and I can take a look.

gviejo avatar Jun 22 '24 13:06 gviejo

Sorry about the delay. I think you are correct about the nested time series. Do you have a preferred email? Github doesn't support .nwb

JohnStout avatar Jun 28 '24 17:06 JohnStout

You can send it to gviejo[at]flatironinstitute[dot]org

gviejo avatar Jun 29 '24 17:06 gviejo