-
Notifications
You must be signed in to change notification settings - Fork 164
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
Preprocessing of raw SpikeGLX data with spikeinterface #1018
Comments
Not yet, but Joe Mininski from London is working on it in coordination with Olivier Winter.
No, we do not have this.
The "concatenation" of "multi segment" (aka multi binary file) is handle also in a lazy mode with 2 differents flavors in spikeinterface ("append" = true multi segment or "conatenate" = virtual mono segment) In spikeinetrface, you can already do this Please have a deep look at this : https://spikeinterface.readthedocs.io/en/latest/modules/core/plot_5_append_concatenate_segments.html#sphx-glr-modules-core-plot-5-append-concatenate-segments-py Important, no sorter at the moment handle the "multi segment" correctly problem except the experimental ones inside spikeinetrface ("spkykingcircus2" quite advanced, "tridesclous" not working yet). This is why in many cases you need to write everything to single gigantic file with the |
Thanks, Samuel.
It is a very simple procedure (details). In short, it takes 3 parameters, Is there a write-up anywhere of the ways in which SpyKING CIRCUS 2 differs from SpyKING CIRCUS? I couldn't find a document in Pierre's fork or on his website. |
Hi everyone, I'm working on porting some of the IBL tools to SpikeInterface with Olivier Winter. Currently have been focusing on the bad channel detection / interpolation (will post draft PR soon), but next the kfilt averaging. Would also be happy to take a look at a opening a PR for the gifx detection this or next week if it would be useful? Cheers, |
Thanks @samuelgarcia for the thorough response. Hi @JoeZiminski Great to hear that, we'll be happy to keep in touch regarding the timeline for the kfilt averaging, thank you! |
@yger is atively working on SC2, and solving some final caveats! When it's ready, we'll add some proper documentation :) Pierre do you want to comment on this? |
I have been looking a bit into preprocessing raw SGLX data with SI, bypassing CatGT. Using SI to do the sample alignment and the preprocessing steps usually done by kilosort seems to work as well (if not better) (3 vs 4) Anyway, my question here regards scaling of traces. In the same way that values are scaled * 200 after kilosort preprocessing before being cast to int16 and written to temp_wh.dat , shouldn't spikeinterface scale recordings when necessary before running a sorter? Or, what is the best way to scale trace values manually? Calling Thanks for feedback! |
Hi Tom, Regarding the scale : if you do not apply whittening (which force float32), we keep the same gain as the original file. In short the "bit to microVolt" gain is kept along your preprocess chain (even if internaly it is float at some steps like fft sample alignement). If you need gain at some steps, you can use some the of the scalers preprocessing : https://github.com/SpikeInterface/spikeinterface/blob/master/spikeinterface/preprocessing/normalize_scale.py Note that you can also change the dtype to float32 at several step of your pipeline if you need it. Just add dtype='float' in the kwargs. |
Ok great! I didn't see that there were specifically scaling preprocessing. Will keep you posted on speed when doing some tests on longer recordings. I tried once |
I looking at your figure. Your gain is due to the whitening. |
@TomBugnon can you try using these
Personally, I found that smaller chunks makes processing faster! |
Oups. This is slow. But 70h is for the full: align/CMR/bandpass/whiten ? By the way I would do CMR after bandpass to remove only commmon noise in high ferqs something like this no ? |
@alejoe91 : with 100 jobs you also have to control the memory!!!!! |
70h was with NO preprocessing steps, @samuelgarcia The idea was bypassing completely kilosort's preprocessing (so that there's no extra step of writing |
@TomBugnon we are almost done with a patch to allow one to skip KS preprocessing: #1418 |
Cool! I did it directly in KS but your version will probably be cleaner |
You can now skip KS preprocessing in SI: #1418 |
Hi!
We (@grahamfindlay) are intending to sort very long (~48h) neuropixels 1.0 data, for which we are now hitting serious bottlenecks in terms of (pre)processing time and disk usage.
So far, we have been using Bill Karsh's CatGT tool to preprocess the raw SpikeGLX files, before feeding the preprocessed data into sorters via spikeinterface. CatGT takes care of concatenating the successive "trigger" files (eg
run_name_g{gate_index}_t{trigger_index}.ap.bin
), at the same time as it performs various preprocessing steps, the most crucial of which (for us) being sample alignment, artifact removel ("gfix") and common average referencing.Since spikeinterface seems to be able to perform the crucial sample alignment step, and also promises to offer the tools to perform the full "destriping" preprocessing presented in the IBL preprocessing white paper and implemented here, we would like to follow Samuel's suggestion ( #1010 ) and perform the full preprocessing and sorting from raw spikeGLX traces, bypassing CatGT.
For us, taking this step would be a serious gain in terms of disk usage (since we will avoid the useless step of writing the binary
recording.dat
file), and in terms of following the evolving preprocessing/sorting standards. In short, using spikeinterface from start to finish sounds amazing and we'd be really happy to make the switch.So, here are a couple questions:
gfix
-type automatic detection of short large amplitude artifact?Thank you so much for your continuous help, and let me say it is very exciting to see this project make such huge advances!
Tom
The text was updated successfully, but these errors were encountered: