Giter Site home page Giter Site logo

Comments (15)

RanjitK avatar RanjitK commented on August 18, 2024

Hi,
Were you trying to CPAC or just the anatomical preprocessing workflow? What were the errors you were getting while importing CPAC?

Also, Here is an example of just running anatomical preprocessing workflow.

from CPAC.anat_preproc import create_anat_preproc
wf = create_anat_preproc()
wf.inputs.inputspec.anat = '/Users/Gagan/school shit/thesis/test/M87179880/t1_avg.nii.gz'
wf.base_dir = "'/Users/Gagan/school shit/working_dir" #this can be any folder where the output
wf.run()

Try the above example and let us know if that worked.

from c-pac.

gagans avatar gagans commented on August 18, 2024

hi, i tried setting the base_dir with a list of inputspec.anat:

121105-01:37:57,798 workflow INFO:
['check', 'execution', 'logging']
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 509, in run
execgraph = generate_expanded_graph(deepcopy(flatgraph))
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/utils.py", line 483, in generate_expanded_graph
graph_in = _remove_identity_nodes(graph_in, keep_iterables=True)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/utils.py", line 433, in _remove_identity_nodes
destnode.set_input(inport, value)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1017, in set_input
setattr(self.inputs, parameter, deepcopy(val))
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/traits_extension.py", line 74, in validate
validated_value = super( BaseFile, self ).validate( object, name, value )
File "/Library/Python/2.7/site-packages/traits-4.2.0-py2.7-macosx-10.8-intel.egg/traits/trait_types.py", line 320, in validate
self.error( object, name, value )
File "/Library/Python/2.7/site-packages/traits-4.2.0-py2.7-macosx-10.8-intel.egg/traits/trait_handlers.py", line 170, in error
value )
traits.trait_errors.TraitError: The 'in_file' trait of a ThreedrefitInputSpec instance must be an existing file name, but a value of ['/Users/Gagan/school shit/thesis/test/anat/M87101027/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101028/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101037/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101038/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101051/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101054/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101080/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101082/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87101227/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87104715/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87105785/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87106979/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87111314/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87111447/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87111523/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87111767/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87113516/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87115626/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87115634/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87118980/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87119059/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87123898/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87131172/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87135370/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87137121/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87138274/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87139161/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87139919/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87143941/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87144381/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87145992/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87147314/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87151011/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87151468/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87156754/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87157217/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87160111/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87162918/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87165589/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87168318/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87170333/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87172651/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87172809/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87175187/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87175780/t1_avg.nii.gz', '/Users/Gagan/school shit/thesis/test/anat/M87179880/t1_avg.nii.gz'] <type 'list'> was specified.

and that was the error.

i didn't try single file because i figured this issue would be the next one if it did work. am i using the lists wrong?

thx
gagan
On 2012-11-05, at 12:48 AM, Ranjit Khanuja wrote:

Hi,
Were you trying to CPAC or just the anatomical preprocessing workflow? What were the errors you were getting while importing CPAC?

Also, Here is an example of just running anatomical preprocessing workflow.

from CPAC.anat_preproc import create_anat_preproc
wf = create_anat_preproc()
wf.inputs.inputspec.anat = '/Users/Gagan/school shit/thesis/test/M87179880/t1_avg.nii.gz'
wf.base_dir = "'/Users/Gagan/school shit/working_dir" #this can be any folder where the output
wf.run()

Try the above example and let us know if that worked.


Reply to this email directly or view it on GitHub.

from c-pac.

RanjitK avatar RanjitK commented on August 18, 2024

Hi Gagan,

The input to the workflow is a single file. It doesn't take list as an input.

For your particular file structure, you can try something like this

import os
from CPAC.anat_preproc import create_anat_preproc
wf = create_anat_preproc()
anat_path = ''/Users/Gagan/school shit/thesis/test/anat"
for sub in os.listdir(anat_path):
wf.base_dir = os.path.join(''/Users/Gagan/school shit/working_dir", sub)
wf.inputs.inputspec.anat = os.path.join(anat_path, sub, "t1_avg.nii.gz")
wf.run()

Let me know if that works.

from c-pac.

jovo avatar jovo commented on August 18, 2024

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK and/or ATHENA/

thanks

from c-pac.

gagans avatar gagans commented on August 18, 2024

hi jovo,

mm i have not tried niak and or athena directly for different reasons (niak blurs and performs ICA, don't want that).

i tried using a single nii gz anatomical and got this error now (is 3drefit included with CPAC?):

procs.run()
121105-09:26:23,769 workflow INFO:
['check', 'execution', 'logging']
121105-09:26:23,800 workflow INFO:
Running serially.
121105-09:26:23,802 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-09:26:23,940 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-09:26:23,942 workflow ERROR:
['Node anat_deoblique failed to run on host GagansMacPro.local.']
121105-09:26:23,943 workflow INFO:
Saving crash info to /Users/Gagan/school shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,943 workflow INFO:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py", line 37, in run
node.run(updatehash=updatehash)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1128, in run
self._run_interface()
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1226, in _run_interface
self._result = self._run_command(execute)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1350, in _run_command
result = self._interface.run()
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py", line 820, in run
runtime = self._run_interface(runtime)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py", line 1097, in _run_interface
runtime.hostname))
IOError: 3drefit could not be found on host GagansMacPro.local
Interface Threedrefit failed to run.

121105-09:26:23,955 workflow INFO:


121105-09:26:23,956 workflow ERROR:
could not run node: anat_preproc.anat_deoblique
121105-09:26:23,956 workflow INFO:
crashfile: /Users/Gagan/school shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,957 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py", line 55, in run
report_nodes_not_run(notrun)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py", line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

On 2012-11-05, at 8:46 AM, joshua vogelstein wrote:

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK and/or ATHENA/

thanks


Reply to this email directly or view it on GitHub.

from c-pac.

ssikka avatar ssikka commented on August 18, 2024

IOError: 3drefit could not be found on host GagansMacPro.local

Interface Threedrefit failed to run.

COuld you please ensure Afni is in your path?

Regards,
sharad

On Mon, Nov 5, 2012 at 11:28 AM, gagans [email protected] wrote:

hi jovo,

mm i have not tried niak and or athena directly for different reasons
(niak blurs and performs ICA, don't want that).

i tried using a single nii gz anatomical and got this error now (is
3drefit included with CPAC?):

procs.run()
121105-09:26:23,769 workflow INFO:
['check', 'execution', 'logging']
121105-09:26:23,800 workflow INFO:
Running serially.
121105-09:26:23,802 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-09:26:23,940 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-09:26:23,942 workflow ERROR:
['Node anat_deoblique failed to run on host GagansMacPro.local.']
121105-09:26:23,943 workflow INFO:
Saving crash info to /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,943 workflow INFO:
Traceback (most recent call last):
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 37, in run
node.run(updatehash=updatehash)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1128, in run
self._run_interface()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1226, in _run_interface
self._result = self._run_command(execute)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1350, in _run_command
result = self._interface.run()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 820, in run
runtime = self._run_interface(runtime)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 1097, in _run_interface
runtime.hostname))
IOError: 3drefit could not be found on host GagansMacPro.local
Interface Threedrefit failed to run.

121105-09:26:23,955 workflow INFO:


121105-09:26:23,956 workflow ERROR:
could not run node: anat_preproc.anat_deoblique
121105-09:26:23,956 workflow INFO:
crashfile: /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,957 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 55, in run
report_nodes_not_run(notrun)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py",
line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

On 2012-11-05, at 8:46 AM, joshua vogelstein wrote:

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK and/or
ATHENA/

thanks


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-10077022.

from c-pac.

gagans avatar gagans commented on August 18, 2024

Will double check and get back to you
Thanks,
Gagan

-----Original Message-----
From: Sharad Sikka [email protected]
Date: Mon, 05 Nov 2012 08:30:37
To: FCP-INDI/[email protected]
Reply-To: FCP-INDI/C-PAC [email protected]
Cc: [email protected]
Subject: Re: [C-PAC] preprocessing anatomical fails (potential newb issue)
(#91)

IOError: 3drefit could not be found on host GagansMacPro.local

Interface Threedrefit failed to run.

COuld you please ensure Afni is in your path?

Regards,
sharad

On Mon, Nov 5, 2012 at 11:28 AM, gagans [email protected] wrote:

hi jovo,

mm i have not tried niak and or athena directly for different reasons
(niak blurs and performs ICA, don't want that).

i tried using a single nii gz anatomical and got this error now (is
3drefit included with CPAC?):

procs.run()
121105-09:26:23,769 workflow INFO:
['check', 'execution', 'logging']
121105-09:26:23,800 workflow INFO:
Running serially.
121105-09:26:23,802 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-09:26:23,940 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-09:26:23,942 workflow ERROR:
['Node anat_deoblique failed to run on host GagansMacPro.local.']
121105-09:26:23,943 workflow INFO:
Saving crash info to /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,943 workflow INFO:
Traceback (most recent call last):
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 37, in run
node.run(updatehash=updatehash)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1128, in run
self._run_interface()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1226, in _run_interface
self._result = self._run_command(execute)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1350, in _run_command
result = self._interface.run()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 820, in run
runtime = self._run_interface(runtime)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 1097, in _run_interface
runtime.hostname))
IOError: 3drefit could not be found on host GagansMacPro.local
Interface Threedrefit failed to run.

121105-09:26:23,955 workflow INFO:


121105-09:26:23,956 workflow ERROR:
could not run node: anat_preproc.anat_deoblique
121105-09:26:23,956 workflow INFO:
crashfile: /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,957 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 55, in run
report_nodes_not_run(notrun)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py",
line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

On 2012-11-05, at 8:46 AM, joshua vogelstein wrote:

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK and/or
ATHENA/

thanks


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-10077022.


Reply to this email directly or view it on GitHub:
#91 (comment)

from c-pac.

gagans avatar gagans commented on August 18, 2024

Hi,

it wasn't on the path initially, but iti s now.

there is a new issue though:

procs.run()
121105-12:47:11,424 workflow INFO:
['check', 'execution', 'logging']
121105-12:47:11,433 workflow INFO:
Running serially.
121105-12:47:11,434 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-12:47:11,471 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-12:47:11,491 interface INFO:
stderr 2012-11-05T12:47:11.490772:++ 3drefit: AFNI version=AFNI_2011_12_21_1014 (Oct 26 2012) [64-bit]
121105-12:47:11,491 interface INFO:
stderr 2012-11-05T12:47:11.490772:++ Authored by: RW Cox
121105-12:47:11,502 interface INFO:
stderr 2012-11-05T12:47:11.502770:* ERROR: Can't open dataset /Users/Gagan/school
121105-12:47:11,503 interface INFO:
stderr 2012-11-05T12:47:11.502770:
* ERROR: Can't open dataset shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-12:47:11,503 interface INFO:
stderr 2012-11-05T12:47:11.502770:++ 3drefit processed 0 datasets
121105-12:47:11,512 workflow INFO:
Executing node anat_reorient in dir: /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_reorient
121105-12:47:11,517 workflow INFO:
Running: 3dresample -orient RPI -prefix /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz -inset /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-12:47:11,534 interface INFO:
stderr 2012-11-05T12:47:11.534117:invalid option <shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz>
121105-12:47:11,535 interface INFO:
stderr 2012-11-05T12:47:11.534117:usage: 3dresample [options] -prefix OUT_DSET -inset IN_DSET
121105-12:47:11,535 interface INFO:
stderr 2012-11-05T12:47:11.534117:usage: 3dresample -help
121105-12:47:11,535 workflow ERROR:
['Node anat_reorient failed to run on host GagansMacPro.local.']
121105-12:47:11,536 workflow INFO:
Saving crash info to /Users/Gagan/school shit/thesis/test/anat/crash-20121105-124711-Gagan-anat_reorient.npz
121105-12:47:11,536 workflow INFO:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py", line 37, in run
node.run(updatehash=updatehash)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1128, in run
self._run_interface()
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1226, in _run_interface
self._result = self._run_command(execute)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 1350, in _run_command
result = self._interface.run()
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py", line 820, in run
runtime = self._run_interface(runtime)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py", line 1100, in _run_interface
self.raise_exception(runtime)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py", line 1056, in raise_exception
raise RuntimeError(message)
RuntimeError: Command:
3dresample -orient RPI -prefix /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz -inset /Users/Gagan/school shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
Standard output:

Standard error:
invalid option <shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz>
usage: 3dresample [options] -prefix OUT_DSET -inset IN_DSET
usage: 3dresample -help
Return code: 255
Interface Threedresample failed to run.

121105-12:47:11,539 workflow INFO:


121105-12:47:11,539 workflow ERROR:
could not run node: anat_preproc.anat_reorient
121105-12:47:11,540 workflow INFO:
crashfile: /Users/Gagan/school shit/thesis/test/anat/crash-20121105-124711-Gagan-anat_reorient.npz
121105-12:47:11,540 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py", line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py", line 55, in run
report_nodes_not_run(notrun)
File "/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py", line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

is there an issue with the afni install or the way it's being used? again just want to emphasize that I'm on a mac and I know this can sometimes cause things to be screwy.

Thanks,
Gagan

On 2012-11-05, at 9:30 AM, Sharad Sikka [email protected] wrote:

IOError: 3drefit could not be found on host GagansMacPro.local

Interface Threedrefit failed to run.

COuld you please ensure Afni is in your path?

Regards,
sharad

On Mon, Nov 5, 2012 at 11:28 AM, gagans [email protected] wrote:

hi jovo,

mm i have not tried niak and or athena directly for different reasons
(niak blurs and performs ICA, don't want that).

i tried using a single nii gz anatomical and got this error now (is
3drefit included with CPAC?):

procs.run()
121105-09:26:23,769 workflow INFO:
['check', 'execution', 'logging']
121105-09:26:23,800 workflow INFO:
Running serially.
121105-09:26:23,802 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-09:26:23,940 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-09:26:23,942 workflow ERROR:
['Node anat_deoblique failed to run on host GagansMacPro.local.']
121105-09:26:23,943 workflow INFO:
Saving crash info to /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,943 workflow INFO:
Traceback (most recent call last):
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 37, in run
node.run(updatehash=updatehash)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1128, in run
self._run_interface()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1226, in _run_interface
self._result = self._run_command(execute)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1350, in _run_command
result = self._interface.run()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 820, in run
runtime = self._run_interface(runtime)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 1097, in _run_interface
runtime.hostname))
IOError: 3drefit could not be found on host GagansMacPro.local
Interface Threedrefit failed to run.

121105-09:26:23,955 workflow INFO:


121105-09:26:23,956 workflow ERROR:
could not run node: anat_preproc.anat_deoblique
121105-09:26:23,956 workflow INFO:
crashfile: /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,957 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 55, in run
report_nodes_not_run(notrun)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py",
line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

On 2012-11-05, at 8:46 AM, joshua vogelstein wrote:

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK and/or
ATHENA/

thanks


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-10077022.


Reply to this email directly or view it on GitHub.

from c-pac.

ssikka avatar ssikka commented on August 18, 2024

Hi Gagan,

the pipeline is trying to execute 3dresample command

3dresample -orient RPI -prefix /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz -inset
/Users/Gagan/school shit/thesis/test/anat/anat_
preproc/anat_deoblique/t1_avg.nii.gz

3dresample is a afni command.

since you have a ' ' (space in your input path /Users/Gagan/school
shit/thesis/test) it is causing afni to interpret the inputs as two inputs
which is clearly not the case.

So I suggest please remove the space from your input path

HTH
sharad

On Mon, Nov 5, 2012 at 2:48 PM, gagans [email protected] wrote:

Hi,

it wasn't on the path initially, but iti s now.

there is a new issue though:

procs.run()
121105-12:47:11,424 workflow INFO:
['check', 'execution', 'logging']
121105-12:47:11,433 workflow INFO:
Running serially.
121105-12:47:11,434 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-12:47:11,471 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-12:47:11,491 interface INFO:
stderr 2012-11-05T12:47:11.490772:++ 3drefit: AFNI
version=AFNI_2011_12_21_1014 (Oct 26 2012) [64-bit]
121105-12:47:11,491 interface INFO:
stderr 2012-11-05T12:47:11.490772:++ Authored by: RW Cox
121105-12:47:11,502 interface INFO:
stderr 2012-11-05T12:47:11.502770:* ERROR: Can't open dataset
/Users/Gagan/school
121105-12:47:11,503 interface INFO:
stderr 2012-11-05T12:47:11.502770:
* ERROR: Can't open dataset
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-12:47:11,503 interface INFO:
stderr 2012-11-05T12:47:11.502770:++ 3drefit processed 0 datasets
121105-12:47:11,512 workflow INFO:
Executing node anat_reorient in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_reorient
121105-12:47:11,517 workflow INFO:
Running: 3dresample -orient RPI -prefix /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz -inset
/Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-12:47:11,534 interface INFO:
stderr 2012-11-05T12:47:11.534117:invalid option
<shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz>
121105-12:47:11,535 interface INFO:
stderr 2012-11-05T12:47:11.534117:usage: 3dresample [options] -prefix
OUT_DSET -inset IN_DSET
121105-12:47:11,535 interface INFO:
stderr 2012-11-05T12:47:11.534117:usage: 3dresample -help
121105-12:47:11,535 workflow ERROR:
['Node anat_reorient failed to run on host GagansMacPro.local.']
121105-12:47:11,536 workflow INFO:
Saving crash info to /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-124711-Gagan-anat_reorient.npz
121105-12:47:11,536 workflow INFO:
Traceback (most recent call last):
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 37, in run
node.run(updatehash=updatehash)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1128, in run
self._run_interface()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1226, in _run_interface
self._result = self._run_command(execute)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1350, in _run_command
result = self._interface.run()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 820, in run
runtime = self._run_interface(runtime)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 1100, in _run_interface
self.raise_exception(runtime)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 1056, in raise_exception
raise RuntimeError(message)
RuntimeError: Command:
3dresample -orient RPI -prefix /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz -inset
/Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
Standard output:

Standard error:
invalid option
<shit/thesis/test/anat/anat_preproc/anat_reorient/t1_avg_RPI.nii.gz>
usage: 3dresample [options] -prefix OUT_DSET -inset IN_DSET
usage: 3dresample -help
Return code: 255
Interface Threedresample failed to run.

121105-12:47:11,539 workflow INFO:


121105-12:47:11,539 workflow ERROR:
could not run node: anat_preproc.anat_reorient
121105-12:47:11,540 workflow INFO:
crashfile: /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-124711-Gagan-anat_reorient.npz
121105-12:47:11,540 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 55, in run
report_nodes_not_run(notrun)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py",
line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

is there an issue with the afni install or the way it's being used? again
just want to emphasize that I'm on a mac and I know this can sometimes
cause things to be screwy.

Thanks,
Gagan

On 2012-11-05, at 9:30 AM, Sharad Sikka [email protected] wrote:

IOError: 3drefit could not be found on host GagansMacPro.local

Interface Threedrefit failed to run.

COuld you please ensure Afni is in your path?

Regards,
sharad

On Mon, Nov 5, 2012 at 11:28 AM, gagans [email protected]
wrote:

hi jovo,

mm i have not tried niak and or athena directly for different reasons
(niak blurs and performs ICA, don't want that).

i tried using a single nii gz anatomical and got this error now (is
3drefit included with CPAC?):

procs.run()
121105-09:26:23,769 workflow INFO:
['check', 'execution', 'logging']
121105-09:26:23,800 workflow INFO:
Running serially.
121105-09:26:23,802 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-09:26:23,940 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-09:26:23,942 workflow ERROR:
['Node anat_deoblique failed to run on host GagansMacPro.local.']
121105-09:26:23,943 workflow INFO:
Saving crash info to /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,943 workflow INFO:
Traceback (most recent call last):
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",

line 37, in run

node.run(updatehash=updatehash)
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",

line 1128, in run

self._run_interface()
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",

line 1226, in _run_interface

self._result = self._run_command(execute)
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",

line 1350, in _run_command

result = self._interface.run()
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",

line 820, in run

runtime = self._run_interface(runtime)
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",

line 1097, in _run_interface

runtime.hostname))
IOError: 3drefit could not be found on host GagansMacPro.local
Interface Threedrefit failed to run.

121105-09:26:23,955 workflow INFO:


121105-09:26:23,956 workflow ERROR:
could not run node: anat_preproc.anat_deoblique
121105-09:26:23,956 workflow INFO:
crashfile: /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,957 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",

line 519, in run

runner.run(execgraph, updatehash=updatehash, config=self.config)
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",

line 55, in run

report_nodes_not_run(notrun)
File

"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py",

line 89, in report_nodes_not_run

raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for
details

On 2012-11-05, at 8:46 AM, joshua vogelstein wrote:

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK
and/or
ATHENA/

thanks


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/FCP-INDI/C-PAC/issues/91#issuecomment-10077022>.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-10084923.

from c-pac.

gagans avatar gagans commented on August 18, 2024

update:

removed the base_dir option and it works now. thanks!

will let you guys know if there are other isuses.

Thanks,
Gagan

On 2012-11-05, at 9:30 AM, Sharad Sikka [email protected] wrote:

IOError: 3drefit could not be found on host GagansMacPro.local

Interface Threedrefit failed to run.

COuld you please ensure Afni is in your path?

Regards,
sharad

On Mon, Nov 5, 2012 at 11:28 AM, gagans [email protected] wrote:

hi jovo,

mm i have not tried niak and or athena directly for different reasons
(niak blurs and performs ICA, don't want that).

i tried using a single nii gz anatomical and got this error now (is
3drefit included with CPAC?):

procs.run()
121105-09:26:23,769 workflow INFO:
['check', 'execution', 'logging']
121105-09:26:23,800 workflow INFO:
Running serially.
121105-09:26:23,802 workflow INFO:
Executing node anat_deoblique in dir: /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique
121105-09:26:23,940 workflow INFO:
Running: 3drefit -deoblique /Users/Gagan/school
shit/thesis/test/anat/anat_preproc/anat_deoblique/t1_avg.nii.gz
121105-09:26:23,942 workflow ERROR:
['Node anat_deoblique failed to run on host GagansMacPro.local.']
121105-09:26:23,943 workflow INFO:
Saving crash info to /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,943 workflow INFO:
Traceback (most recent call last):
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 37, in run
node.run(updatehash=updatehash)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1128, in run
self._run_interface()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1226, in _run_interface
self._result = self._run_command(execute)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 1350, in _run_command
result = self._interface.run()
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 820, in run
runtime = self._run_interface(runtime)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/interfaces/base.py",
line 1097, in _run_interface
runtime.hostname))
IOError: 3drefit could not be found on host GagansMacPro.local
Interface Threedrefit failed to run.

121105-09:26:23,955 workflow INFO:


121105-09:26:23,956 workflow ERROR:
could not run node: anat_preproc.anat_deoblique
121105-09:26:23,956 workflow INFO:
crashfile: /Users/Gagan/school
shit/thesis/test/anat/crash-20121105-092623-Gagan-anat_deoblique.npz
121105-09:26:23,957 workflow INFO:


Traceback (most recent call last):
File "", line 1, in
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/engine.py",
line 519, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/linear.py",
line 55, in run
report_nodes_not_run(notrun)
File
"/Library/Python/2.7/site-packages/nipype-0.6.0-py2.7.egg/nipype/pipeline/plugins/base.py",
line 89, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. '
RuntimeError: Workflow did not execute cleanly. Check log for details

On 2012-11-05, at 8:46 AM, joshua vogelstein wrote:

gagan - can you please clarify

(1) are using functional and/oranatomical data
(2) have you tried other pre-processing packages, including NIAK and/or
ATHENA/

thanks


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-10077022.


Reply to this email directly or view it on GitHub.

from c-pac.

gagans avatar gagans commented on August 18, 2024

guys just curious-- is there a quick/dirty way to implement slice timing correction in the functional preprocessing?

from c-pac.

ssikka avatar ssikka commented on August 18, 2024

slice timing correction should be there , docs might not be updated .
@ranjit Can you confirm?

regards,
sharad

On Mon, Nov 5, 2012 at 10:42 PM, gagans [email protected] wrote:

guys just curious-- is there a quick/dirty way to implement slice timing
correction in the functional preprocessing?


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-10098248.

from c-pac.

RanjitK avatar RanjitK commented on August 18, 2024

Hi Gagan,

Functional PreProcessing workflow has an option for slice timing correction.

Here is an example

from CPAC.func_preproc import create_func_preproc
wf = create_func_preproc(slice_timing_correction=True)
wf.base_dir = '/home/data/working_dir'
wf.inputs.inputspec.rest = '/home/data/new_site/sub05676/func/lfo.nii.gz'
wf.inputs.scan_params.tr = '2.0'
wf.inputs.scan_params.ref_slice = 19
wf.inputs.scan_params.acquisition = 'alt+z2'
wf.run()

if you have a file for slice pattern, you provide that as input too
wf.inputs.scan_params.acquisition = '/home/data/slice_timing_pattern.txt'

CPAC uses afni 3dTshift for slice timing correction, here is the command

3dTshift -prefix output_file_path -tpattern alt+z2 -TR 2.0 -slice 19 input_file_path

Dropping TRs
When running functional preprocessing workflow, you can also specify the start index(how many volumes to drop) and the last tr/index.
example:
wf.inputs.inputspec.start_idx = 4
wf.inputs.inputspec.stop_idx = 250

If the information for dropping tr's is not specified, the workflow takes first and last volume as start and stop index respectively.

from c-pac.

gagans avatar gagans commented on August 18, 2024

awesome, thank you :)

On 2012-11-05, at 10:18 PM, Ranjit Khanuja wrote:

Hi Gagan,

Functional PreProcessing workflow has an option for slice timing correction.

Here is an example

from CPAC.func_preproc import create_func_preproc
wf = create_func_preproc(slice_timing_correction=True)
wf.base_dir = '/home/data/working_dir'
wf.inputs.inputspec.rest = '/home/data/new_site/sub05676/func/lfo.nii.gz'
wf.inputs.scan_params.tr = '2.0'
wf.inputs.scan_params.ref_slice = 19
wf.inputs.scan_params.acquisition = 'alt+z2'
wf.run()

if you have a file for slice pattern, you provide that as input too
wf.inputs.scan_params.acquisition = '/home/data/slice_timing_pattern.txt'

CPAC uses afni 3dTshift for slice timing correction, here is the command

3dTshift -prefix output_file_path -tpattern alt+z2 -TR 2.0 -slice 19 input_file_path

Dropping TRs
When running functional preprocessing workflow, you can also specify the start index(how many volumes to drop) and the last tr/index.

example:
wf.inputs.inputspec.start_idx = 4
wf.inputs.inputspec.stop_idx = 250

If the information for dropping tr's is not specified, the workflow takes first and last volume as start and stop index respectively.


Reply to this email directly or view it on GitHub.

from c-pac.

gagans avatar gagans commented on August 18, 2024

hi guys,

another question:

is there a way to speed up the registration step without compromising the quality?

i really like what i'm seeing when i look at the warped T1 anatomicals for subjects, but fnirt is quite slow.

if not, its all good. again i really like what i'm seeing so far, much nicer than spm for the warps (so far!)

Thanks,
Gagan

On 2012-11-05, at 10:18 PM, Ranjit Khanuja [email protected] wrote:

Hi Gagan,

Functional PreProcessing workflow has an option for slice timing correction.

Here is an example

from CPAC.func_preproc import create_func_preproc
wf = create_func_preproc(slice_timing_correction=True)
wf.base_dir = '/home/data/working_dir'
wf.inputs.inputspec.rest = '/home/data/new_site/sub05676/func/lfo.nii.gz'
wf.inputs.scan_params.tr = '2.0'
wf.inputs.scan_params.ref_slice = 19
wf.inputs.scan_params.acquisition = 'alt+z2'
wf.run()

if you have a file for slice pattern, you provide that as input too
wf.inputs.scan_params.acquisition = '/home/data/slice_timing_pattern.txt'

CPAC uses afni 3dTshift for slice timing correction, here is the command

3dTshift -prefix output_file_path -tpattern alt+z2 -TR 2.0 -slice 19 input_file_path

Dropping TRs
When running functional preprocessing workflow, you can also specify the start index(how many volumes to drop) and the last tr/index.

example:
wf.inputs.inputspec.start_idx = 4
wf.inputs.inputspec.stop_idx = 250

If the information for dropping tr's is not specified, the workflow takes first and last volume as start and stop index respectively.


Reply to this email directly or view it on GitHub.

from c-pac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.