File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -369,14 +369,11 @@ async def request_spa_preprocessing(
369369 visit_idx = parts .index (visit_name )
370370 core = Path ("/" ) / Path (* parts [: visit_idx + 1 ])
371371 ppath = Path ("/" ) / Path (* parts )
372- sub_dataset = ppath .relative_to (core ).parts [0 ]
373- extra_path = machine_config .processed_extra_directory
374- for i , p in enumerate (ppath .parts ):
375- if p .startswith ("raw" ):
376- movies_path_index = i
377- break
372+ if machine_config .process_multiple_datasets :
373+ sub_dataset = ppath .relative_to (core ).parts [0 ]
378374 else :
379- raise ValueError (f"{ proc_file .path } does not contain a raw directory" )
375+ sub_dataset = ""
376+ extra_path = machine_config .processed_extra_directory
380377 mrc_out = (
381378 core
382379 / machine_config .processed_directory_name
@@ -385,7 +382,7 @@ async def request_spa_preprocessing(
385382 / "MotionCorr"
386383 / "job002"
387384 / "Movies"
388- / "/" . join ( ppath .parts [ movies_path_index + 1 : - 1 ] )
385+ / ppath .parent . relative_to ( core / sub_dataset )
389386 / str (ppath .stem + "_motion_corrected.mrc" )
390387 )
391388 try :
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class MachineConfig(BaseModel): # type: ignore
5757 processing_enabled : bool = True
5858 process_by_default : bool = True
5959 gain_directory_name : str = "processing"
60+ process_multiple_datasets : bool = True
6061 processed_directory_name : str = "processed"
6162 processed_extra_directory : str = ""
6263 recipes : dict [str , str ] = {
You can’t perform that action at this time.
0 commit comments