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

[Kilososrt 2.5] Phy doesn't recognize cluster groupings from Kilosort output file 'cluster_group.tsv' #498

Closed
djhavert opened this issue May 12, 2022 · 2 comments · Fixed by #595

Comments

@djhavert
Copy link

Description:
When I load Kilosort 2.5 output into Phy, the cluster groupings are not recognized by Phy. There is a column 'KSLabel' in Cluster View, but internally every cluster is labeled as 'unsorted'. This is evidenced by two things. One, every cluster is color coded white, the color for unsorted neurons, rather than being color coded appropriately. Second, if you manually sort any clusters in phy and click the save button, the 'cluster_groups.tsv' file is overwritten and only includes the clusters you manually sorted.

Cause:
I believe the reason for this is that Phy expects the 'cluster_groups.tsv' file to have two categories: 'cluster_id' and 'group'. Instead, the file output from Kilosort has the categories 'cluster_id' and 'KSLabel'.

@djhavert
Copy link
Author

I've confirmed this was indeed the problem. It's not an elegant solution but I changed rezToPhy.m to save the 'cluster_group.tsv' file separately with the correct label rather than just copying the 'cluster_KSLabel.tsv' file. I'll open a pull request with the changes, but leave this issue open since this is just a temporary workaround.

@marius10p
Copy link
Contributor

The KSlabel should be a column of Phy, not directly a "sorting decision". The sorting decisions are for you to make, if you want to change the output of Kilosort.

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

Successfully merging a pull request may close this issue.

2 participants