AugustineY07 / Neuron_Tracking

9 stars 1 forks source link

Missing argument #5

Open anaisanjim opened 7 months ago

anaisanjim commented 7 months ago

Hi, first of all thank you for this very useful code. I was just trying to run it with the example data provided and I ran into the following error:

_Not enough input arguments.

Error in split (line 3) f = find(str==del);

Error in readKS2label (line 12) ln = split(tline);

Error in create_EMD_input (line 84) kscall1 = readKS2label(fullfile(input_path,data_path1,KSLabel_name),npts_f1);

Error in NT_main (line 27) output = create_EMD_input(input, output, wf_metrics1, wf_metrics2, mwf1, mwf2, 'pre');

Error in Example_run_original (line 96) NTmain(input, mwf1, mwf2);

It seems that 'split' is missing the argument 'del'. I hope you can provide a solution for this, thank you in advance.

jenniferColonell commented 6 months ago

Hi @anaisanjim Sorry it took us so long to get back to you. I don't know how the split command could be generating that error -- I think you must either be running a very old version of MATLAB or you have another function named 'split' in your MATLAB path. If you have a MATLAB license, you can download the latest version, without deleting the old version. To avoid confusion with other functions named 'split' that you have defined, leave the MATLAB path as the default.

anaisanjim commented 3 months ago

Thank you for your answer, you were right and I fixed it. I have another unrelated question that I am posting here but I can add it as a different issue if needed. It is related to the cluster ID. When the code reads the KS label to get the 'good' units, it uses 'find' to get the cluster ID, however in the KSlabel file there is a cluster 0, so as a result of using 'find' you get clusterID+1. I was wondering if this gets corrected later on, but checking the output chain_all I see that I get units that were mua as part of a chain, for example, when running the example data, in the 4th chain, the first unit is cluster 12 which is a mua, I wonder if it should be cluster 11 ('good' unit) but it is selected as 12 not taking into account cluster 0. I am not sure if I am missing something but could you clarify this, please? Thank you.

jenniferColonell commented 3 months ago

The code uses 1-based indices throughout, and does not convert back to zero based in the output. I agree that would be a good change, thanks for pointing it out! Going forward, we will be updating the code here: https://github.com/janelia-TDHarrisLab/Yuan-Neuron_Tracking