diff --git a/common/processor_pipeline.py b/common/processor_pipeline.py index 918d7be..cf65321 100644 --- a/common/processor_pipeline.py +++ b/common/processor_pipeline.py @@ -82,26 +82,21 @@ def run_pipeline(context: PipelineFullContext): run_postprocessing = context.run_postprocessing postprocessing_params = context.postprocessing_context.model_dump() qm_list = list() - if postprocessing_params['quality_metrics'].pop('presence_ratio'): - qm_list.append('presence_ratio') - if postprocessing_params['quality_metrics'].pop('snr'): - qm_list.append('snr') - if postprocessing_params['quality_metrics'].pop('isi_violation'): - qm_list.append('isi_violation') - if postprocessing_params['quality_metrics'].pop('rp_violation'): - qm_list.append('rp_violation') - if postprocessing_params['quality_metrics'].pop('sliding_rp_violation'): - qm_list.append('sliding_rp_violation') - if postprocessing_params['quality_metrics'].pop('amplitude_cutoff'): - qm_list.append('amplitude_cutoff') - if postprocessing_params['quality_metrics'].pop('amplitude_median'): - qm_list.append('amplitude_median') - if postprocessing_params['quality_metrics'].pop('nearest_neighbor'): - qm_list.append('nearest_neighbor') - if postprocessing_params['quality_metrics'].pop('nn_isolation'): - qm_list.append('nn_isolation') - if postprocessing_params['quality_metrics'].pop('nn_noise_overlap'): - qm_list.append('nn_noise_overlap') + qm_names = [ + 'presence_ratio', + 'snr', + 'isi_violation', + 'rp_violation', + 'sliding_rp_violation', + 'amplitude_cutoff', + 'amplitude_median', + 'nearest_neighbor', + 'nn_isolation', + 'nn_noise_overlap' + ] + for qm_name in qm_names: + if postprocessing_params['quality_metrics'].pop(qm_name): + qm_list.append(qm_name) postprocessing_params['quality_metrics']['metric_names'] = qm_list # Curation params diff --git a/si_mountainsort5/sample_context_1.yaml b/si_mountainsort5/sample_context_1.yaml index 09187b8..d1cc373 100644 --- a/si_mountainsort5/sample_context_1.yaml +++ b/si_mountainsort5/sample_context_1.yaml @@ -1,11 +1,13 @@ # https://api.dandiarchive.org/api/dandisets/000409/versions/draft/assets/c04f6b30-82bf-40e1-9210-34f0bcd8be24/ input: https://dandiarchive.s3.amazonaws.com/blobs/2dd/3a3/2dd3a3b3-7ede-4f2b-a327-5c81bf5718da output: ./output/sorting_upload.nwb +job_kwargs: + n_jobs: 0.7 recording_context: electrical_series_path: /acquisition/ElectricalSeriesAp lazy_read_input: true stub_test: true - stub_test_duration_sec: 30 + stub_test_duration_sec: 10 run_preprocessing: true preprocessing_context: motion_correction: