Description:
I am looking at changes in fc among several regions from pre-task rest through several repetitions of the task to post task rest. fc_compute_roifc. seems to be perfect for my purposes. However, I have difficulties running it.
Call:
RAStudy="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA"
cd $RAStudy
qunex_container fc_compute_roifc \
--bolds="rest|$RAStudy/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="$RAStudy/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="$RAStudy/sessions/pb1719/images/functional/events/restfc.fidl|RS:rest:s0:e0" \
--targetf="$RAStudy/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.97.3.sif"
Error message:
Running:
>>> fc_compute_roifc('rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc.fidl|RS:rest:s0:e0', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI', 'roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN')
Options used:
------------
roimethod: mean
eventdata: all
ignore: use,fidl
badevents: use
fcmeasure: r
saveind: txt
verbose: true
debug: true
fcname: DMN_SN
Checking ...
... found results folder (/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI)
... creating ROI mask
... reading image file(s) ... 420 frames read, done.
... generating extraction sets ...
Options used:
------------
ignore: use,fidl
badevents: use
verbose: true
debug: true
roimethod: mean
eventdata: all
fcmeasure: r
saveind: {txt}
fcname: DMN_SN
Matlab Error! Processing Failed!
bsxfun: dimensions of A and B must match
ERROR: fc_compute_roifc failed! Please check output / log!
Logs:
No log files produced
** For an example of how to report an issue, please refer to this post .
grega
April 11, 2024, 12:05pm
2
Helen, hi!
I reviewed the files on grace
and it seems there are two issues. First, your fidl file is not a valid fidl file. If you want the FC to be computed on the whole timeseries, then use “0” as input to --frames
parmeter. Second, there seems to be a bug in the code and the default value for subjectname
is not set, so it needs to be set explicitly. I have a problem running singularity on grace
, but I tested the changed command on our severs, an this should work:
qunex_container fc_compute_roifc \
--bolds="rest|$RAStudy/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="$RAStudy/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="0" \
--targetf="$RAStudy/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.97.3.sif"
Please, give it a try and let me know if issues persist.
In the upcoming version of QuNex (> 0.99.3) the issue with subjectname
is already addressed.
Hi Grega,
Unfortunately this did not help.
I tried several different versions of parameters.
Setting frames to “0”
qunex_container fc_compute_roifc \
--bolds="rest|$RAStudy/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="$RAStudy/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="0" \
--targetf="$RAStudy/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.97.3.sif"
produced this error:
... could not find fidlfile (0), please check your paths!
Matlab Error! Processing Failed!
ERROR: Fidl file was not found. Please check the path!\n\n
ERROR: fc_compute_roifc failed! Please check output / log!
Setting subjectname=pb1719 produced the same error.
Revising fidl file and including subjectname produced the same error as before.
So, it does look like it is about the fidl file.
Do you have a sample fidl file to share? I tried many-many different formats.
Thank you.
If I use a fidl file:
0.8 rest
0 0 336
and a call
qunex_container fc_compute_roifc \
--bolds="rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc.fidl|rest:s0:e0" \
--targetf="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.98.6a.sif"
I get this error:
Running:
>>> fc_compute_roifc('rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc.fidl|rest:s0:e0', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI', 'roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719')
Options used:
------------
roimethod: mean
eventdata: all
ignore: use
badevents: use
fcmeasure: r
saveind: txt
verbose: true
debug: true
fcname: DMN_SN
subjectname: pb1719
Checking ...
... found results folder (/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI)
... creating ROI mask
... reading image file(s) ... 420 frames read, done.
... generating extraction sets ...
Options used:
------------
ignore: use
badevents: use
verbose: true
debug: true
roimethod: mean
eventdata: all
fcmeasure: r
saveind: {txt}
fcname: DMN_SN
subjectname: pb1719
Matlab Error! Processing Failed!
operator /: nonconformant arguments (op1 is 1x1, op2 is 0x0)
ERROR: fc_compute_roifc failed! Please check output / log!
I see you are using an older version of the container, did you try with the latest release one - 0.99.2d
?
Jure
Yes, I tried many different containers, including this one.
qunex_container fc_compute_roifc \
--bolds="rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc.fidl|rest:s0:e0" \
--targetf="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.99.2d.sif"
Same error.
Running:
>>> fc_compute_roifc('rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc.fidl|rest:s0:e0', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI', 'roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719')
Options used:
------------
roimethod: mean
eventdata: all
ignore: use
badevents: use
fcmeasure: r
saveind: txt
verbose: true
debug: true
fcname: DMN_SN
subjectname: pb1719
Checking ...
... found results folder (/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI)
... creating ROI mask
... reading image file(s) ... 420 frames read, done.
... generating extraction sets ...
Options used:
------------
ignore: use
badevents: use
verbose: true
debug: true
roimethod: mean
eventdata: all
fcmeasure: r
saveind: {txt}
fcname: DMN_SN
subjectname: pb1719
Matlab Error! Processing Failed!
operator /: nonconformant arguments (op1 is 1x1, op2 is 0x0)
Or
qunex_container fc_compute_roifc \
--bolds="rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="0" \
--targetf="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.99.2d.sif"
Returns this
>>> fc_compute_roifc('rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names', '0', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI', 'roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719')
Options used:
------------
roimethod: mean
eventdata: all
ignore: use
badevents: use
fcmeasure: r
saveind: txt
verbose: true
debug: true
fcname: DMN_SN
subjectname: pb1719
Checking ...
... found results folder (/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI)
... creating ROI mask
... reading image file(s) ... 420 frames read, done.
... generating extraction sets ...
Options used:
------------
ignore: use
badevents: use
verbose: true
debug: true
roimethod: mean
eventdata: all
fcmeasure: r
saveind: {txt}
fcname: DMN_SN
subjectname: pb1719
... could not find fidlfile (0), please check your paths!
Matlab Error! Processing Failed!
ERROR: Fidl file was not found. Please check the path!\n\n
ERROR: fc_compute_roifc failed! Please check output / log!
grega
April 17, 2024, 4:04pm
7
Helen,
Try changing your fidl file to:
0.8 rest
0 0 336
I tried it:
0.8 rest
0 0 336
But getting the same error:
type or Running:
>>> fc_compute_roifc('rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc.fidl|rest:s0:e0', '/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI', 'roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719')
Options used:
------------
roimethod: mean
eventdata: all
ignore: use
badevents: use
fcmeasure: r
saveind: txt
verbose: true
debug: true
fcname: DMN_SN
subjectname: pb1719
Checking ...
... found results folder (/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI)
... creating ROI mask
... reading image file(s) ... 420 frames read, done.
... generating extraction sets ...
Options used:
------------
ignore: use
badevents: use
verbose: true
debug: true
roimethod: mean
eventdata: all
fcmeasure: r
saveind: {txt}
fcname: DMN_SN
subjectname: pb1719
Matlab Error! Processing Failed!
operator /: nonconformant arguments (op1 is 1x1, op2 is 0x0)
ERROR: fc_compute_roifc failed! Please check output / log!paste code here
grega
April 17, 2024, 6:11pm
9
Helen,
I will need to get help fixing my access to singularity on grace, so that I can run the same container in your environment and resolve the issue. Let me come back with a fix for you.
Thank you Grega - I really appreciate your time.
grega
April 17, 2024, 7:42pm
11
Ok! Mysteries resolved.
First, your fidl file started with non-ascii characters. It might be, that it was written in an app that added BOM to the file. To resolve that, I created a new file w/o BOM:
/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc_g.fidl
Second, in your frames parameter, the name of the extraction set was missing. The full specification of the extraction has to be:
'<fidlfile>|<extraction name>:<event list>:<extraction start>:<extraction end>'
I corrected the specification to:
--frames="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc_g.fidl|rest:rest:s0:e0"
And third, e0 denotes the first frame after the end of the event. This was now outside of the timeseries, so the event was skipped. The correct specification is:
--frames="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc_g.fidl|rest:rest:s0:e-1"
and the full command call:
qunex_container fc_compute_roifc \
--bolds="rest|/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d.dtseries.nii" \
--roiinfo="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/GlasserParcellation/ROIs/SN_DMN.GlasserParcellation.names" \
--frames="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/sessions/pb1719/images/functional/events/restfc_g.fidl|rest:rest:s0:e-1" \
--targetf="/gpfs/gibbs/pi/n3/Studies/Pushkarskaya.RA/analysis/fcROI" \
--options="roimethod=mean|eventdata=all|ignore=use|badevents=use|fcmeasure=r|saveind=txt|verbose=true|debug=true|fcname=DMN_SN|subjectname=pb1719" \
--container="/gpfs/gibbs/pi/n3/software/Singularity/qunex_suite-0.99.2d.sif"
I have tested it out and it works.
===> Successful completion of task
Grega - Thank you so much!!!
Grega, thanks for your deep dive into this!