dandi_compute_code.aind_ephys_pipeline#
- dandi_compute_code.aind_ephys_pipeline.prepare_aind_ephys_job(
- pipeline_version,
- content_id=None,
- dandiset_id=None,
- dandiset_path=None,
- config_key='default',
- parameters_key='default',
- pipeline_directory=None,
- silent=False,
Prepares an AIND ephys job by generating a submission script and returning the script file path.
- Parameters:
pipeline_version (
str) – The version of the pipeline to use, which will be used to checkout a branch of the pipeline repository.content_id (
str|None) – The content ID for the data to be processed.dandiset_id (
str|None) – The Dandiset ID for the data to be processed. Required if content_id is not provided and will be used to look up the content ID if content_id is not provided.dandiset_path (
str|None) – The local path to the Dandiset data to be processed. Required if content_id is not provided and will be used to look up the content ID if `content_id is not provided.config_key (
str) – The short name of the configuration to use. Must be a key registered in registries/registered_configs.json.parameters_key (
str) – The short name of the parameters to use. Must be a key registered in registries/registered_params.json.pipeline_directory (
Path|None) – Local path to the AIND pipeline repository.silent (
bool) – Whether to suppress output messages from the DANDI client. Default is False.
- Returns:
script_file_path – The path to the generated submission script.
- Return type:
- Raises:
ValueError – Raised in any of the following situations. - Neither
content_idnor bothdandiset_idanddandiset_pathare provided. -pipeline_versionis an empty string. -pipeline_versionequals the unsupportedv1.0.0. -config_keyis not registered inregistered_configs.json. -parameters_keyis not registered inregistered_params.json. - The resolved parameters file is missing apipeline_versionfield. - The parameters filepipeline_versionis in a different major series than the requestedpipeline_version. - The parameters filepipeline_versionis newer than the requestedpipeline_version. - The MD5 checksum of the resolved config or parameters file does not match its registry entry. -content_idis not present in the content-id-to-Dandiset mapping. -content_idmaps to the retired sandbox dandiset. - ThesubBIDS entity cannot be extracted from the resolved Dandiset path. - A resolved git commit hash does not match the expected 40-character hexadecimal format.
- dandi_compute_code.aind_ephys_pipeline.submit_job(script_file_path)[source]#
Submit a pipeline script via sbatch.
- Raises:
RuntimeError – If the
DANDI_API_KEYenvironment variable is not set, if thesbatchsubmission returns a non-zero exit code, or if the subsequentdandi uploadinvocation returns a non-zero exit code.- Return type:
- Parameters:
script_file_path (Path)
- dandi_compute_code.aind_ephys_pipeline.generate_aind_ephys_submission_script(
- script_file_path,
- log_directory,
- nwb_file_path,
- results_directory,
- work_directory,
- apptainer_cache_directory,
- environment_directory,
- config_file_path,
- pipeline_file_path,
- pipeline_repo_directory,
- pipeline_version,
- temp_name,
- done_tracker_file_path,
- params_file_path,
Generate AIND Ephys submission script from template.
Arguments are ordered as they occur in the submission template.
- Parameters:
script_file_path (
Path) – Where to write the submission script.log_directory (
str) – The log directory.nwb_file_path (
str) – The input NWB file path.results_directory (
str) – The results directory.work_directory (
str) – The work directory.apptainer_cache_directory (
str) – The Apptainer cache directory.environment_directory (
str) – The conda environment to activate.config_file_path (
str) – The configuration file path.pipeline_file_path (
str) – The pipeline file path.pipeline_repo_directory (
str) – Path to the base pipeline repository intended to be used.pipeline_version (
str) – The pipeline version, which is used to checkout a branch of the pipeline repository.temp_name (
str) – The name of the temporary processing directory.done_tracker_file_path (
str) – The path to the ‘done’ tracker file.params_file_path (
str) – The parameters file path.
- Return type: