Repository navigation
Conversation
Ephys jobs can now select a post-processing step list, built like the
preprocessing one. New table definitions in u19_pipeline/ephys_postcluster.py:
- PostClusterMethod, PostClusterParamSet and PostClusterParamSteps (+ .Step)
in the ephys element schema, mirroring the PreCluster tables.
- EphysPostParams in recording_process: the list a job selected.
No existing table is altered. A job without an EphysPostParams row has no
post-processing. The schemas are activated on demand and never on import.
scripts/create_ephys_postcluster_tables.py creates the tables and their
first rows (spikeinterface and bombcell). It is a dry run without --create,
and nothing in this commit runs it.
For every ephys job the pipeline now writes postprocess_paramset_<id>.json:
the selected steps as [{postcluster_method: params}, ...], or [] when none is
selected (also when the tables don't exist yet), so a stale file on the
cluster never applies. BrainCogsEphysSorters reads it. Post-processing
job_kwargs count toward the slurm cores request, the same way the
preprocessing ones do.
Assisted-by: ClaudeCode:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ephys jobs can now choose a post-processing step list, built the same way as the preprocessing (PreCluster) list. The pipeline carries it to BrainCogsEphysSorters, which runs it after the sort. The two methods are
spikeinterface(sorting-analyzer metrics) andbombcell(unit labels good / mua / noise / non_soma).Changes
u19_pipeline/ephys_postcluster.py. They mirror element-array-ephys'sephys_precluster:PostClusterMethod,PostClusterParamSet,PostClusterParamSteps(+.Step) in<prefix>pipeline_ephys_element.EphysPostParams(-> recording_process.Processing,-> PostClusterParamSteps) in<prefix>recording_process.EphysPostParamsrow has no post-processing.ephys_postcluster.tables()returnsNoneuntil the tables exist.postprocess_paramset_<id>.json(automatic_job/ephys_postprocess_params.py,parameter_file_creator.py). It holds[{postcluster_method: params}, ...]in step order, or[]when the job chose none or the tables don't exist yet. Writing[]explicitly means a stale file left on the cluster from an earlier job id can never apply.job_kwargs.n_jobscounts toward the cores request, the same way the preprocessing steps do (ephys_slurm_resources.py,slurm_creator.py).scripts/create_ephys_postcluster_tables.py:spikeinterfaceandbombcellmethods, two default paramsets and two one-step lists.--createis given, and nothing in this PR runs it.Not done here, and needs a person
uv run python -m scripts.create_ephys_postcluster_tables --config dj_local_conf.json --create. This needs CREATE + REFERENCES on both schemas. Until then everything here is a no-op that writes[].+pipeline_ephys_element/PostCluster*.mclasses and a+recording_process/EphysPostParams.m. Note that the MATLAB PreCluster lists allow null name/desc, but these new tables declare them NOT NULL. RecordingProcessJobGUI keeps working, and the jobs it creates simply get no post-processing.recording.DefaultParamshas no post-processing column, so new recordings get no list by default; one is chosen through the website's "Rerun with different parameters".Testing
uv run pytest -rs: 733 passed, 7 skipped (DB / extras only). This includes the newtests/test_ephys_postcluster.pyandtests/automatic_job/test_ephys_postprocess_params.py, plus additions to the slurm-resources and missing-params tests. I rebased on currentmasterand ran the tests again.uvx prek run --all-files: passed.Companion PRs
Any deploy order works. The sorter treats a missing file as no post-processing, and this side writes
[]until the tables exist.