aces / Loris-MRI

The set of scripts that preprocess and insert MRI data into the database.
10 stars 50 forks source link

Change mkdir to make_path in run_defacing_script.pl #978

Closed cmadjar closed 1 year ago

cmadjar commented 1 year ago

Description

This should fix the issue @zaliqarosli was having when testing run_defacing_script.pl. Use make_path from File::Path instead of mkdir when creating the output directory for the pipeline.

zaliqarosli commented 1 year ago

this is directly fixing the error with deface_minipipe.pl. running

deface_minipipe.pl /data/Loris-MRI/data/assembly/676061/V1/mri/native/demo_676061_V1_t1_001.mnc /data/Loris-MRI/data/assembly/676061/V1/mri/native/demo_676061_V1_t2_001.mnc /data/Loris-MRI/data/assembly/676061/V1/mri/native/demo_676061_V1_t2_001.mnc /data/Loris-MRI/data/assembly/676061/V1/mri/native/demo_676061_V1_t2_001.mnc /data/tmp/deface-tmVg7Wve/676061/V1/demo_676061_V1 --keep-real-range --beastlib /opt/minc/1.9.18/../share/beast-library-1.1  --model mni_icbm152_t1_tal_nlin_sym_09c  --model-dir /opt/minc/1.9.18/../share/icbm152_model_09c

works well, with defaced mincs appearing in /data/tmp/deface-tmVg7Wve/676061/V1. but i'm still getting an error with running run_defacing_script.pl -profile prod -sessionIDs 2145:

Transforming slices:................................................................................................................................................................Done
Transforming slices:..........................................................................................Done
Copying chunks:.Done.
Transforming slices:................................................................................................................................................................Done
Copying chunks:................................................................................................................................................................Done.
Copying chunks:................................................................................................................................................................Done.
Constant subroutine NeuroDB::objectBroker::ConfigOB::CREATE_CANDIDATES redefined at /usr/lib/x86_64-linux-gnu/perl-base/constant.pm line 171.
PSCID is: DCC292
 CandID id: 676061
 visit_label is: V1
Argument "8Exiting now\n\n" isn't numeric in right bitshift (>>) at /opt/Loris-MRI/bin/mri/tools/run_defacing_script.pl line 682.
Argument "\nAn error occurred when running register_processed_data..." isn't numeric in right bitshift (>>) at /opt/Loris-MRI/bin(

and processed defaced files/dir not appearing in /data/Loris-MRI/data/assembly/676061/V1/mri/

cmadjar commented 1 year ago

@zaliqarosli I have a feeling the second bug is related to register_processed_data script. I will merge this PR and maybe you can create a new issue for the defacing pipeline with the error you wrote above?

zaliqarosli commented 1 year ago

new issue created https://github.com/aces/Loris-MRI/issues/982