Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run spike sorting on multiple files from the same session #811

Open
PiezaKake opened this issue Nov 1, 2024 · 4 comments
Open

Run spike sorting on multiple files from the same session #811

PiezaKake opened this issue Nov 1, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@PiezaKake
Copy link

PiezaKake commented Nov 1, 2024

Feature you'd like to see:

Run Spike sorting on multiple files with the same configuration from the same session

Additional Context

Hi, I was wondering if it is possible to run spike sorting on multiple files with the same configuration.
I will soon start recording with open ephys, and my plan was to record multiple files in each session. Is it possible to 'feed' all files from a single session into kilosort for a single spike sorting output, insead of running spike sorting for each file individually?

@jacobpennington
Copy link
Collaborator

There isn't currently a way to do this through Kilosort, but it will be available in the future. The utility I was adding for it still needs some work.

@jacobpennington jacobpennington added the enhancement New feature or request label Nov 2, 2024
@jacobpennington
Copy link
Collaborator

Actually, not as much work as I thought. There's a working version in the latest commit, but like I said I haven't done much testing with it yet. If you want to try it, you can install using the developer instructions at the bottom of the read me and pull the latest changes. This is the minimal code needed:

from kilosort import run_kilosort
from kilosort.io import BinaryFileGroup, load_probe

# Also add whatever else you need to set for your data, like sampling rate
settings = {'n_chan_bin': 385}
probe = load_probe(probe_path)
# Recommended: set filename to the directory containing the data files.
# It can be any path that exists, but you do need to provide a filename still.
filename = data_dir
# Use the file_object argument
file_obj = BinaryFileGroup.from_filenames(list_of_filenames, n_chan_bin)
_ = run_kilosort(settings=settings, filename=data_dir, probe=probe, file_object=file_obj)

@PiezaKake
Copy link
Author

Thanks, I will give this try, but do you have any idea when the final add-on will be available? I just wanted to check whether it will be available by the time I start the data analysis

@jacobpennington
Copy link
Collaborator

I don't know, we have other priorities for development right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants