Skip to content

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


Format : path(stats_files)

TypeDescriptionMandatoryPattern
stats_filesfileInput 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

Format : path(*.csv)

TypeDescriptionMandatoryPattern
*.csvfileRaw stats files in CSV format (harmonization ready).
True*.csv

Format : path(versions.yml)

TypeDescriptionMandatoryPattern
versions.ymlfileFile containing software versionsTrueversions.yml

TypeDescriptionDefaultChoices
covariateslistList 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_namestringName of the column containing the metric values in the output CSV files (ready for harmonization).
mean
metric_col_namestringName of the column containing the metric names in the output CSV files (ready for harmonization).
metric
suffixstringSuffix to use for the output files based on the operation performed. The output files will be named as “site.metric.<suffix>.csv”.
raw

DescriptionDOI
pandasPython package used to manipulate the input and output tabular data for this module.


Last updated : 2026-02-12