harmonization_stats2combat
This module converts the TSV stats file to the CSV format expected by the Clinical-Combat module. This input TSV stats file might come from the output of modules such as the stats/metricsinroi or bundle/stats modules.
For context, the Clinical-Combat module currently expects a CSV file with the following columns: “sid,site,bundle,metric,mean,age,sex,handedness,disease”. And a separate CSV file PER metric.
However, in other nf-neuro modules (e.g. stats/metricsinroi or bundle/stats), the output stats files are in TSV format with the following columns: “sid,roi,<covariates>,metric1,metric2,…”.
Keywords : harmonization, combat, stats, format, tsv, csv
Inputs
Section titled “Inputs”Input 1
Section titled “Input 1”Format : path(stats_files)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| stats_files | file | Input tabular stats files to be reformatted in a CSV format ready for consumption by the harmonization module. The provided file(s) should be one or more TSV files with columns “sid,roi,<covariates>,metric1,metric2,…”. | True | *.tsv |
Outputs
Section titled “Outputs”stats_for_combat
Section titled “stats_for_combat”Format : path(*.csv)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| *.csv | file | Raw stats files in CSV format (harmonization ready). | True | *.csv |
versions
Section titled “versions”Format : path(versions.yml)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| versions.yml | file | File containing software versions | True | versions.yml |
Arguments (see process.ext)
Section titled “Arguments (see process.ext)”| Type | Description | Default | Choices | |
|---|---|---|---|---|
| covariates | list | List of column names that are not considered metrics in the input stats files. These columns will be kept unchanged (except for renaming the columns) while the other columns (i.e. the metrics and their values) will be pivotted. | ['sample', 'roi', 'site', 'age', 'sex', 'handedness', 'disease'] | |
| value_col_name | string | Name of the column containing the metric values in the output CSV files (ready for harmonization). | mean | |
| metric_col_name | string | Name of the column containing the metric names in the output CSV files (ready for harmonization). | metric | |
| suffix | string | Suffix to use for the output files based on the operation performed. The output files will be named as “site.metric.<suffix>.csv”. | raw |
| Description | DOI | |
|---|---|---|
| pandas | Python package used to manipulate the input and output tabular data for this module. |
Authors
Section titled “Authors”Last updated : 2026-02-12