Skip to content

Special Cases

Yibei Chen edited this page Jul 28, 2022 · 1 revision

This page is used as a record for those interfaces that need extra modifications after the converter

Model

Cluster

In Nipype, outputs of Cluster() are:

  1. index_file
  2. localmax_txt_file
  3. localmax_vol_file
  4. max_file
  5. mean_file
  6. pval_file
  7. size_file
  8. threshold_file

Those are defined by Nipype not FSL, in FSL, they should be

  1. out_index_file
  2. out_localmax_txt_file
  3. out_localmax_vol_file
  4. out_max_file
  5. out_mean_file
  6. out_pval_file
  7. out_size_file
  8. out_threshold_file

FSL needs those filenames (str) to be defined in the inputs and then generates them (File) as output.

In Pydra, if we use the converter.py to get cluster.py, we will have the first set of outputs, but then we can't pass the test since those fields don't match their FSL counterparts.

What we did here is, after auto converting, (1) manually change output_field names in cluster.py (e.g., index_file -> out_index_file) and (2) change the outputs in test_run_cluster.py and test_spec_cluster.py in the same way as (1).

before the above solution, @yibeichen tried to use output_file_template in input_fields and set output_fields as []. It passed the test locally but failed the docker test online. It seems that output_file_template requires the field type as str, which makes sense when they are output filenames as inputs. But then those same fields need to become real outputs, which have to be File. It's Schrödinger‘s field type.

Clone this wiki locally