-
Notifications
You must be signed in to change notification settings - Fork 21
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
AP_align_probe_histology #17
Comments
Right that Kilosort doesn't output template depths, you can get them from that templatesPositionsAmplitudes code that you referenced, or here's how I do it using the Kilosort output
This function isn't very clean at the moment (I align using landmarks, like lack of spikes for ventricles or correlation changes across regions), for this kind of alignment I might suggest these alternatives:
You can see that second alignment tool, and some other new alignment tools, demoed at our recent Neuropixels course (Lecture 9 here: https://www.ucl.ac.uk/neuropixels/training/2022-intro-neuropixels-course) |
Hey Andy, thanks! Many thanks! |
Sorry, I've never used SpikeGLX so I don't know how to load the data! You could try the Neuropixels slack (https://app.slack.com/client/T93QUDDCM), or ping Enny van Beest at UCL for MATLAB code (https://github.com/EnnyvanBeest), or try NeuroPyxels for Python code (https://github.com/m-beau/NeuroPyxels) |
Thanks a lot!!!! |
Hey Andy, sorry, I have a following up question regarding how to use the output from AP_histology as the input of iblapps for mapping ephys with histology of the probe tracing. The output of AP_histology is three .mat files: atlas2histology_tform.mat, histology_ccf.mat, probe_ccf.mat. According to the wiki, https://github.com/int-brain-lab/iblapps/wiki/4.-Preparing-data-for-ephys-GUI, "If you have traced probe tracks that are in the Allen CCF coordinate framework, the following code snippets can be used to transform between Bregma coordinate space (origin bregma) and CCF coordinate space (origin front, top, left corner of Allen CCF)" They suggested to do Probe tracing using brainreg-segment and Lasagna, but I already have probe-tracing file from the output of AP_histology, how could I use them as the input. Sorry I am not sure if I understand their instruction clearly. |
You could convert the probe_ccf.mat to an npy file with something like this in matlab:
Note that I'm not totally sure what orientation they expect their array to be - probe_ccf stores it as n points x 3 coordinates, but the IBL might expect a different organization. Then you could load that file in python and use their
Let me know if that works, would be useful if so. |
I see - I'm not clear on how IBL stores multiple probes, is it one xyz_picks per probe? If so, you could save the CCF points separately for each probe, e.g.:
Then you could create a xyz_picks for each of those probe files |
THANK YOU SO MUCH!!! Also, you mentioned the GUI on another issue page, are you developing a GUI for the AP_histology? This is truly amazing and quite user-friendly! Also, the Neuropixels_Trajactory_Planner is fantastic! Thank you!!! |
No problem - were you successfully able to load it into the IBL application? I haven't planned any other types of GUI - probably the GUI I was referring to was just the ones that are already there. |
Not yet! Thanks for your code, now I have the .json file for probe tracing. But I have issues when converting the raw Ephys data from SpikeGLX using their codes, waiting for their responses. Will keep u posted if it works! Thanks a lot! |
I have another question regarding mapping ephys with histology.
In the output folder of kilosort, I can't find the .npy file called template_depths. Then I searched for that it seems like needs some extra function to calculate the template_depths.
https://github.com/cortex-lab/spikes/blob/master/analysis/templatePositionsAmplitudes.m
Not sure if it is the correct way for doing so. I have lfp date from SpikeGLX, don't know how to load it as well..
Looking forward to hearing from you! Many thanks!
The text was updated successfully, but these errors were encountered: