Skip to content

error when running 'ms4alg.create_label_map' #210

@vjtiznado

Description

@vjtiznado

Hi, first I have to say that I really appreciate your work with mountainsort, it is very valuable

So now my problem.
I'm using the new version of mountainsort in Ubuntu 16.04, and I want to perform the 'curation' step after clustering. As soon as I understood properly the functions' inputs and outputs, after getting the 'firings.mda' file I should run the following functions, in this order:

ephys.compute_cluster_metrics
which gives the metrics.json file as output, then
ms4alg.p_create_label_map
and finally
ms4alg.p_apply_label_map

However, when running ms4alg.p_create_label_map I get the following error:

$ ml-run-process ms4alg.create_label_map --inputs metrics:CM18_reg06_
tt8_cluster_metrics.json --outputs label_map_out:CM18_reg06_tt8_label_map2.mda --parameters firing_rate_thresh:.05 noise_overlap_thresh:.03 peak_snr_thresh:1.5[ Getting processor spec... ]
[ Checking inputs and substituting prvs ... ]
[ Computing process signature ... ]
[ Checking outputs... ]
[ Checking process cache ... ]
[ Creating temporary directory ... ]
[ Preparing temporary outputs... ]
[ Initializing process ... ]
[ Running ... ] /home/labpf/conda/envs/ml-dev/bin/python3 /home/labpf/conda/envs/ml-dev/etc/mountainlab/packages/ml_ms4alg/curation_spec.py.mp ms4alg.create_label_map --metrics=/home/labpf/Documents/VT/mountainlab/data/Registros_para_comparar/cm18_reg06_TTR/CM18_reg06_tt8_cluster_metrics.json --label_map_out=/home/labpf/Documents/VT/mountainlab/data/Registros_para_comparar/cm18_reg06_TTR/tempdir_6fc4b94a0c_dkx9l0/output_label_map_out.mda --firing_rate_thresh=.05 --noise_overlap_thresh=.03 --peak_snr_thresh=1.5 --_tempdir=/home/labpf/Documents/VT/mountainlab/data/Registros_para_comparar/cm18_reg06_TTR/tempdir_6fc4b94a0c_dkx9l0
Traceback (most recent call last):
  File "/home/labpf/conda/envs/ml-dev/etc/mountainlab/packages/ml_ms4alg/curation_spec.py.mp", line 15, in <module>
    if not PM.run(sys.argv):
  File "/home/labpf/conda/envs/ml-dev/lib/python3.6/site-packages/mountainlab_pytools/processormanager/processormanager_impl.py", line 37, in run
    return P(**args)
  File "/home/labpf/conda/envs/ml-dev/lib/python3.6/site-packages/ml_ms4alg/p_create_label_map.py", line 100, in create_label_map
    metrics_data['clusters'][idx]['metrics']['isolation'] < isolation_thresh or \
KeyError: 'isolation'

[ Removing temporary directory ... ]
Process returned with non-zero exit code.

I guess that the error is because the metrics.json file has not the 'isolation' metric, but I'm not sure.
Can you help me, please? If that's the case, how can I make curation function give me the 'isolation' metric?

Thanks in advance,
Vicente

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions