EnnyvanBeest / UnitMatch

Ephys toolbox to match single units (electrophysiology) either within the same day (over splits) or across two days
Other
43 stars 9 forks source link

Unrecognized function or variable 'bc_extractCbinData' and no ch json file #74

Closed xiaoxiong2n closed 1 month ago

xiaoxiong2n commented 1 month ago

I attempted to use ExtractKilosortData to preprocess my Neuropixels recording data (recorded with SpikeGLX and sorted with Kilosort 4). First, I noticed that the function bc_extractCbinData was missing, but there was an older version named bc_extractCbinData_OLD. Second, in the line "chName = [fileName(1), 'ch'];", there were no channel files ending in 'ch' for my Neuropixels recordings. Instead, I have imec0.ap.bin and imec0.ap.meta files. Should I modify the line to "chName = [fileName(1), '.meta'];"?

cbimbo commented 1 month ago

Hi,

Re. bc_extractCbinData: this is because bombcell (from which this function is coming) has recently changed its syntax. I've updated the call in UnitMatch. If you don't want to (re)install bombcell, you should still be able to use bc_extractCbinData_OLD without issues.

Re. ch file: the line ~exist(fullfile(Params.tmpdatafolder, strrep(rawD(id).name, 'cbin', 'bin'))) should only return true if you have compressed data (two files ending with 'cbin' and 'ch') only. It seems that your data is not compressed (you have the 'bin' file), yet the statement is true. Could you please double check that Params.tmpdatafolder contains the path to your raw data? Running the line fullfile(Params.tmpdatafolder, rawD(id).name) should give you the path to your bin file.

Thanks, Célian

xiaoxiong2n commented 1 month ago

Yes, it worked now! Thanks so much for your help, Célian!