Hello everyone!
I’m using C-PAC (v1.8.7.dev1) on a HPC (singularity v3.11.5). I want to run an analysis comparing two groups pre-post, for which I’m trying to get the paired-two preset
from the command line.
These are the arguments that cpac asks for:
Usage: cpac group feat load-preset paired-two [OPTIONS] PIPELINE_DIR Z_THRESH
P_THRESH CONDITIONS
CONDITION_TYPE MODEL_NAME
So I’m entering:
singularity exec c-pac.sif \
cpac group feat load-preset paired-two /path/to/pipeline_cpac-ost-fix 2.3 0.05 [pre, post] session --output-dir /path/to/output
For which I get this error message:
INFO: Converting SIF file to temporary sandbox...
/usr/share/fsl/6.0/bin/cpac:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('CPAC==1.8.7.dev1')
Traceback (most recent call last):
File "/code/CPAC/utils/create_fsl_flame_preset.py", line 998, in run
keys = pd.read_csv(keys_csv)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 912, in read_csv
return _read(filepath_or_buffer, kwds)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 577, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1407, in __init__
self._engine = self._make_engine(f, self.engine)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1661, in _make_engine
self.handles = get_handle(
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/pandas/io/common.py", line 859, in get_handle
handle = open(
FileNotFoundError: [Errno 2] No such file or directory: '/code/CPAC/resources/cpac_outputs.csv'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/fsl/6.0/bin/cpac", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/code/scripts/cpac", line 5, in <module>
main()
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
[Previous line repeated 1 more time]
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/share/fsl/6.0/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/code/CPAC/__main__.py", line 258, in paired_two
create_fsl_flame_preset.run(pipeline_dir, 'all', z_thresh, p_thresh,
File "/code/CPAC/utils/create_fsl_flame_preset.py", line 1002, in run
raise Exception(err)
Exception:
[!] Could not access or read the cpac_outputs.csv resource file:
/code/CPAC/resources/cpac_outputs.csv
Error details [Errno 2] No such file or directory: '/code/CPAC/resources/cpac_outputs.csv'
I have tried changing PIPELINE_DIR
to the group_analysis_participants.txt
file, different combinations of singularity run
and singularity exec
, as well as different inputs for pre
and post
with the same result.
I was checking C-PAC’s GitHub and it seems that cpac_outputs is a .tsv
file (~/CPAC/resources/cpac_outputs.tsv
), which I’m not sure if could be the issue?
Thanks in advance!!
~L