APPIAN-PET / APPIAN

APPIAN is an open-source automated software pipeline for analyzing PET images in conjunction with MRI. The goal of APPIAN is to make PET tracer kinetic data analysis easy for users with moderate computing skills and to facilitate reproducible research.
MIT License
40 stars 17 forks source link

Error running example (with quantification) #16

Closed eebrown closed 5 years ago

eebrown commented 5 years ago

Hello, I have run into an error running the example data. Here is the last part of the output with the errors:

` Running FixHeaderLinkCommand

190212-17:43:20,526 workflow INFO: Runtime memory and threads stats unavailable 190212-17:43:20,531 workflow INFO: Executing node pvc_qc_metrics.a1 in dir: /path/to/cimbi/dir/out_cimbi/preproc/_args_run.task.ses02.sid01/pvc_qc_metrics 19 26821106966.0 ('PVC MSE:', array(data= -0.987869531793, start=[0 0 0 0], count=[ 38 207 256 256], separations=[1.0, 1.21875, 1.21875, -1.21875], dimnames=[]) 190212-17:43:24,539 workflow INFO: Runtime memory and threads stats unavailable 190212-17:43:24,543 workflow INFO: Executing node convertPET.a1 in dir: /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET minctoecat /path/to/cimbi/dir/out_cimbi/preproc/pvc/_args_run.task.ses02.sid01/fixHeaderNode/sub-01_ses-02_pet_center_GTM.mnc temp.v 190212-17:43:46,755 interface INFO: stdout 2019-02-12T17:43:46.755269:Converting data: .............................................................. ('mv', 'temp.v', '/path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v') /path/to/cimbi/dir/out_cimbi/preproc/initialization/_args_run.task.ses02.sid01/petSettings/sub-01_ses-02_pet_center.info ('Start -- Duration:', [28, 33, 38, 43, 48, 53, 58, 73, 88, 103, 118, 133, 148, 163, 178, 193, 208, 238, 268, 298, 328, 448, 568, 688, 808, 928, 1228, 1528, 1828, 2128, 2428, 3028, 3628, 4228, 4828, 5428, 6028, 6628], [5, 5, 5, 5, 5, 5, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 30, 30, 30, 30, 120, 120, 120, 120, 120, 300, 300, 300, 300, 300, 600, 600, 600, 600, 600, 600, 600, 600]) 190212-17:44:07,697 interface INFO: stdout 2019-02-12T17:44:07.696520:/path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v : unit 'unknown' replaced by 'Bq/cc' 190212-17:44:07,697 interface INFO: stdout 2019-02-12T17:44:07.696520:Writing image file /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v 190212-17:44:09,310 workflow INFO: Runtime memory and threads stats unavailable 190212-17:44:09,311 workflow INFO: Executing node referencemask_extract.a1 in dir: /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/referencemask_extract 190212-17:44:14,954 interface INFO: stdout 2019-02-12T17:44:14.954082:reading /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v 190212-17:44:14,954 interface INFO: stdout 2019-02-12T17:44:14.954082:reading /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/minctoecat_reference/sub-01_ses-02_T1w_normalized_brain_labeled_space-pet.v 190212-17:44:14,954 interface INFO: stdout 2019-02-12T17:44:14.954082:calculating mask VOIs 190212-17:44:14,954 interface INFO: stdout 2019-02-12T17:44:14.954082:1 regional TACs written in /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/referencemask_extract/sub-01_ses-02_pet_center_GTM.dft img2dft /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/minctoecat_reference/sub-01_ses-02_T1w_normalized_brain_labeled_space-pet.v /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/referencemask_extract/sub-01_ses-02_pet_center_GTM.dft

tacunit -xconv=min /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/referencemask_extract/sub-01_ses-02_pet_center_GTM.dft

190212-17:44:16,491 workflow INFO: Runtime memory and threads stats unavailable 190212-17:44:16,492 workflow INFO: Executing node lp.a1 in dir: /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/lp _parse_inputs _gen_output 190212-17:44:16,495 workflow INFO: Running: imgdv /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/referencemask_extract/sub-01_ses-02_pet_center_GTM.dft /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/lp/sub-01_ses-02_pet_center_GTM_lp.v _parse_inputs 190212-17:44:16,519 interface INFO: stderr 2019-02-12T17:44:16.518981:Error: missing result file name. 190212-17:44:17,524 workflow ERROR: ['Node lp.a1 failed to run on host 9dadccbcdd40.'] 190212-17:44:17,525 workflow INFO: Saving crash info to /opt/crash-20190212-174417-root-lp.a1-4886f66e-eb19-423c-a111-3017b2b25b81.pklz 190212-17:44:17,525 workflow INFO: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/plugins/linear.py", line 39, in run node.run(updatehash=updatehash) File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py", line 394, in run self._run_interface() File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py", line 504, in _run_interface self._result = self._run_command(execute) File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py", line 630, in _run_command result = self._interface.run() File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1043, in run runtime = self._run_wrapper(runtime) File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1660, in _run_wrapper runtime = self._run_interface(runtime) File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1694, in _run_interface self.raise_exception(runtime) File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1618, in raise_exception raise RuntimeError(message) RuntimeError: Command: imgdv /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/referencemask_extract/sub-01_ses-02_pet_center_GTM.dft /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/convertPET/sub-01_ses-02_pet_center_GTM.v /path/to/cimbi/dir/out_cimbi/preproc/quantification/_args_run.task.ses02.sid01/lp/sub-01_ses-02_pet_center_GTM_lp.v Standard output:

Standard error: Error: missing result file name. Return code: 1 Interface quantCommand failed to run.

190212-17:44:17,528 workflow INFO:


190212-17:44:17,528 workflow ERROR: could not run node: preproc.quantification.lp.a0 190212-17:44:17,529 workflow INFO: crashfile: /opt/crash-20190212-174231-root-lp.a0-ab68a46a-c829-4ede-89ba-1ed0497c4e41.pklz 190212-17:44:17,529 workflow ERROR: could not run node: preproc.quantification.lp.a1 190212-17:44:17,529 workflow INFO: crashfile: /opt/crash-20190212-174417-root-lp.a1-4886f66e-eb19-423c-a111-3017b2b25b81.pklz 190212-17:44:17,529 workflow INFO:


Traceback (most recent call last): File "/opt/APPIAN/Launcher.py", line 43, in run_scan_level(opts,args) File "/opt/APPIAN/scanLevel.py", line 31, in run_scan_level scan_level_workflow.workflow.run() File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/workflows.py", line 597, in run runner.run(execgraph, updatehash=updatehash, config=self.config) File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/plugins/linear.py", line 57, in run report_nodes_not_run(notrun) File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/plugins/base.py", line 95, in report_nodes_not_run raise RuntimeError(('Workflow did not execute cleanly. ' RuntimeError: Workflow did not execute cleanly. Check log for details `

tfunck commented 5 years ago

Thanks for your feedback!

tl;dr: the bug is fixed on tffunck/appian:latest-dev. give it a go and if it works i'll close the issue report.

long story: tracer kinetic analysis requires specifying a start time at which to begin the linear regression it uses to calculate radiotracer binding parameters. a default start time used to be specified in "args_parse.py", but was removed at some point. now, the start time is now set in the python modules in Tracer_Kinetic/methods/ that define the quantification modules.

Cheers,

Thomas

eebrown commented 5 years ago

Thanks--it does work now. Is there any way to have it output the TACs for all atlas ROIs?

tfunck commented 5 years ago

Nice, glad it worked for you.

Yes, this is actually done by default, so long as you don't use the --no-results-report flag. Would you mind sending an email with your question to the APPIAN-users email-list (https://groups.google.com/forum/#!forum/appian-users). Your question might be of interest to others and will be more accessible this way.