PennLINC / xcpEngine

Official public repository for the XCP Engine. This tool is deprecated in favor of XCP-D and ASLPrep.
MIT License
66 stars 42 forks source link

xcpengine-container direct assignment -a #465

Open BenSnowSipes opened 2 years ago

BenSnowSipes commented 2 years ago

Hello! I am so excited to be using this tool! Thank you all for your dedication here!! I don't see my issue yet addressed on this forum, so I am posting it here.

Error message

xcpEngine: error: unrecognized arguments: -a atlas=desikanKilliany

Runtime Information I am using the xcpengine-container wrapper with a Singularity container inside a clean conda environment.

Additional context Everything works great without any direct assignment argument, but if I try to specify an atlas (e.g. -a atlas=desikanKilliany) the wrapper doesn't recognize the flag.

Do I need to edit the design file directly to specify the atlas?

BlackHoleExelion commented 2 years ago

-a is not an available argument for XCP I think.

   Usage: xcpEngine -d <design> <options>

   Compulsory arguments:
    -d : Primary design file for pipeline:
         The design file specifies the pipeline modules to
         be included in the current analysis and configures
         any parameters necessary to run the modules.
    -c : Cohort file for pipeline input:
         A comma-separated catalogue of the analytic sample.
         Each row corresponds to a subject, and each column
         corresponds either to an identifier or to an input.
    -o : Parent directory for pipeline output:
         A valid path on the current filesystem specifying
         the directory wherein all output from the current
         analysis will be written.

   Optional arguments:
    -m : Execution mode:
         Input can either be 's' (for serial execution on a
         single machine)[default], 'c' (for execution on a
         computing cluster) or a path to a file (for execution
         on a computing cluster, subject to the specifications
         defined in the file).
    -i : Scratch space for pipeline intermediates:
         Some systems operate more quickly when temporary
         files are written in a dedicated scratch space. This
         argument enables a scratch space for intermediates.
    -r : Root directory for inputs:
         If all paths defined in the cohort file are defined
         relative to a root directory, then this argument will
         define the root directory. Otherwise, all paths will
         be treated as absolute.
    -t : Trace:
         Integer value ( 0 - 3 ) that indicates the level
         of verbosity during module execution. Higher
         levels reduce readability but provide useful
         information for troubleshooting.
         0  [default]: Human-readable explanations of
            processing steps and error traces only.
         1: Explicitly trace module-level computations.
            Print a workflow map when execution completes.
         2: Explicitly trace module- and utility-level
            computations.
         3: All commands called by the module and all
            children are traced and explicitly replicated
            in a log file.
BenSnowSipes commented 2 years ago

Hello, and thank you for your response! -a has worked as an argument when running xcpEngine within the container, and it is listed as an argument here: https://xcpengine.readthedocs.io/config/xcpEngine.html#a-direct-assignment

It seems that editing the design file directly is the best option when using the container wrapper.

The values of single variables in a design file can be overriden via direct assignment, which is discussed in the design file documentation. Direct assignment of variables is not generally advised. Direct assignment is enabled by passing, as the argument to -a, an equality with the variable to be assigned on the left-hand side and its new value on the right-hand side. For instance, to override the default value of the variable standard and replace it with MNI%2x2x2, use -a standard=MNI%2x2x2.

Other ways to override the default value of the variable especially in design files:

-a atlas=power264 # choose preferred atlases such as power264,schaefer

-a spatialsmooth=5 # spatial smoothing for regress (if needed), alff and reho, default is 6mm

-a temporalfilter=0.01,0.10 # temporal filter frequency range, the deafult is [0.01 0.08]

To select confound matrix by overriwriting design filter -a confound=24p # this equivalent to confound2_rps[cxt]=1; confound2_sq[cxt]=2; confound2_dx[cxt]=1

-a confound=36p # this equivalent to onfound2_rps[cxt]=1; confound2_sq[cxt]=2; confound2_dx[cxt]=1,confound2_wm[cxt]=1; confound2_csf[cxt]=1; confound2_gsr[cxt]=1

-a confound=aroma # confound2_wm[cxt]=1; confound2_csf[cxt]=1; confound2_aroma[cxt]=1;

-a confound=tcompcor # confound2_tcompcor[cxt] = 1

-a confound=acompcor # confound2_rps[cxt]=1; confound2_acompcor[cxt]=1; confound2_dx[cxt]=1;

-a fd_thresh=fds:0.083 # override the framewise threshold ( threshold will be 0.083*TRs in mm)

To select the regress option -a regress=despike # despiking, regress_process[cxt]=DMT-DSP-TMP-REG

-a regress=censor # censoring, regress_process[cxt]=DMT-TMP-REG ; censor=1