Are `conmat.tsv` files generated when using `combineruns` option?

Hello,

When using the --combineruns option and xcp-d:0.5.2 (via dockerhub) I was expecting to get connectivity matrices, *_conmat.tsv files, for the combined timeseries. However I only seem to get the combined bold nii files and the atlas timeseries.tsv files. No errors were given.

for example see these outputs.

$ ls -l *_atlas-Tian*

sub-22759_ses-2201_task-rest_dir-AP_run-2_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv
sub-22759_ses-2201_task-rest_dir-AP_run-2_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv
sub-22759_ses-2201_task-rest_dir-AP_run-2_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv
sub-22759_ses-2201_task-rest_dir-AP_run-2_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv
sub-22759_ses-2201_task-rest_dir-PA_run-1_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv
sub-22759_ses-2201_task-rest_dir-PA_run-1_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv
sub-22759_ses-2201_task-rest_dir-PA_run-1_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv
sub-22759_ses-2201_task-rest_dir-PA_run-1_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv
sub-22759_ses-2201_task-rest_dir-PA_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv

You can see I get conmats for each individual run but not the combined. The combined is also maybe not named ideally.

So I have 2 questions

  1. Is this the expected behavior?
  2. Is there a trivial (or at least straight forward) command to go from timeseries.tsv files to conmat.tsv files in a comparable way to what xcp_d does?

Thanks!
Luke

  1. It is. I added concatenated correlation matrices in version 0.6.0rc6, but prior to that they weren’t being generated.
  2. Indeed there is:
    import pandas as pd
    
    df = pd.read_table("/path/to/timeseries.tsv")
    corr_df = df.corr()
    corr_df.to_csv("/path/to/conmat.tsv")
    

@tsalo Thanks for the quick reply, and for the extremely useful software :slight_smile:

A couple of quick follow ups,

  1. Is there a 0.6.0 release planned?
  2. Is there anything in the directory tree (or other outputs) that indicates which runs were combined into which file names? I’m currently assuming that it will be combined over all bold (that pass the bids-filter-file) inputs, but I’m not 100% on that.

Thanks.
Luke

1 Like
  1. Hopefully in the next week or two, but you can pull the release candidates from DockerHub and use those if you need it before the next stable release.
  2. It combines across the run and dir entities, but not others (e.g., task). In 0.6.0rc6, the sidecar JSON files will have a Sources field that indicates which inputs went into each output.