Mouse-Imaging-Centre / pydpiper

Python code for flexible pipeline control
Other
24 stars 10 forks source link

fix nonlinear minctracc file write errors #450

Closed dorkylever closed 4 years ago

dorkylever commented 4 years ago

The flag for --registration-method minctracc (i.e. MINCTRACC) causes file write errors (i.e. out being a character short during mincblur and saving outputs as blurmnc instead of blur.mnc. The following changes fixes this problem specifically for nonlinear minctracc runs and allows uCT scans of 15.5 dpc embryos to be analysed in minctracc via the following example command:

MBM.py --pipeline-name TCP_shrt --mem 100 --num-executors 40 \ --init-model /home/kyle_arkell/mouse_atlas/image.mnc \ --registration-method minctracc --registration-strategy pairwise_and_build_model \ --nlin-protocol /home/kyle_arkell/embryo_minctracc_protocol.csv \ --no-run-maget --maget-no-mask --no-common-space-registration --verbose --config-file /home/kyle_arkell/arkell.cfg \ --lsq12-protocol /home/kyle_arkell/Henrik/TCP-1700003F12Rik/MBM_lsq12_embryo_protocol.csv \ --output-dir /home/kyle_arkell/TCP_mrg_v3/ --files /home/kyle_arkell/TCP_short/*mnc

bcdarwin commented 4 years ago

Thanks for looking into this. I'm a bit concerned about merging this pull request since it complicates the logic without really explicating what the problem is. If you send me the names of the files in the TCP_short directory, I can investigate further to see if we can come up with a simpler fix.

dorkylever commented 4 years ago

Hi Ben,

These are the filenames in TCP_short:

ls TCP_short kat233_e3_wt.mnc kat233_e7_wt.mnc kat243_e1_wt.mnc kat243_e7_wt.mnc kat288_e2_wt.mnc kat288_e4_wt.mnc kat288_e7_wt.mnc kat233_e6_wt.mnc kat233_e9_wt.mnc kat243_e4_wt.mnc kat288_e1_wt.mnc kat288_e3_wt.mnc kat288_e6_wt.mnc kat288_e9_wt.mnc

The problem is issue #448

The logic is rewrite that incorrectly called filenames by using "nlin_MINCTRACC" as a flag as these issues only occur when minctracc is specified for nlin registration.

Kind Regards, Kyle Drover

bcdarwin commented 4 years ago

Closing for now since this has been fixed in 6860dda.