ryanharvey1 / ephys_tools

Code for internal lab sharing
GNU General Public License v3.0
6 stars 0 forks source link

Converting cheetah acquired data to kilosort format #2

Closed ouardouzm closed 4 years ago

ouardouzm commented 4 years ago

Good Afternoon, We were looking for a way to convert our Neuralynx .ncs electrophysiology data so we can use Kilosort. I tried your Ephys-tool. When running handleAnimalMetaData.m I did not get animal id folder. and when I run ncs2dat.py I got the following

ncs2dat running Traceback (most recent call last): File "C:\Users\ouard\OneDrive\Documents\MATLAB\ephys_tools\LFP\ncs2dat.py", line 108, in main() File "C:\Users\ouard\OneDrive\Documents\MATLAB\ephys_tools\LFP\ncs2dat.py", line 45, in main inputs = [open(input_name, 'rb') for input_name in input_names] File "C:\Users\ouard\OneDrive\Documents\MATLAB\ephys_tools\LFP\ncs2dat.py", line 45, in inputs = [open(input_name, 'rb') for input_name in input_names] FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\ouard\OneDrive\Desktop\mouse' ERROR ERROR ERROR ERROR

Do you have an updated version that I can use for my analysis of course you will be sited in any publication.

Thanks you for the tools

Best Regards

Mohamed Ouardouz

ryanharvey1 commented 4 years ago
  1. It looks like you might be running ncs2dat.py instead of ncs2dat.m. In matlab, cd to your session folder that contains the .ncs files and try running ncs2dat.

  2. As for handleAnimalMetaData.m, create_project_folder.m from step 5 in the readme will create all the subfolders necessary to use the toolbox.

Let me know if these solutions work out for you.

ouardouzm commented 4 years ago

Can you elaborate on how to populate the newly created folder It may be the problem. thanks

ryanharvey1 commented 4 years ago

ncs2dat.m does not depend on any specific folder structure. It just needs to be run when you are in a folder with .ncs files. It will generate and save your .dat file for use in kilosort to that same folder.

ouardouzm commented 4 years ago

Thanks for your help and for sharing the ephys-tools. it did work All the best