RawWaveforms does not match the number of clusters #99
-
|
When I run the extract_raw_data_demo I get less waveforms than expected. This then results in errors when I try to run UnitMatch as it looks for waveforms that do not exist. This happens for all datasets I try to run. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
Hi, could you give a bit more details? How many waveforms do you expect, how many do you get? |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the quick response! |
Beta Was this translation helpful? Give feedback.
-
|
I pushed some changes to the python version recently that have to do with extraction of data if you used an older version from Kilosort, so it may be worth redownloading unitmatch from scratch. In either case, you seem to be using cluster_info.tsv which is a file created by manual curation with phy(2), the pipeline uses cluster_group.tsv when good_units_only is true, and cluster_ids as found in spike_clusters.npy when extracting all neurons. My suspicion is that some of the clusters in cluster_info.tsv are empty after having merged two units into one. The old 'cluster_id' ghost remains, but it does not have spikes anymore and hence no extracted waveform to be stored for it (as it no longer appears in spike_clusters.npy). The best strategy for your data would be to keep it |
Beta Was this translation helpful? Give feedback.
-
|
I have discovered that the issues arises because the Unit # that is being assigned to the saved RawWaveforms does not match the cluster ids. The number of clusters is actually the same but since the cluster ids from kilosort are not sequential, the values for the two parameters do not align. |
Beta Was this translation helpful? Give feedback.
Hi Laura, can you confirm that new versions of UnitMatch now work for you? If not, can you please open an issue? Thanks!