Importing confounds file and avoiding preprocessing

Hello everyone,

I tried uploading the .tsv file that comes as a result of fmriprep output into conn using
confound_files = condir(“file path”).
batch.Setup.importfile = confounds_file

after this I directly give commands for denoising, the program runs without any error and gives the analysis outputs in GUI but in 1st covariates segment, there are no confounds.

I don’t know what mistake I am doing . Can anyone help me?
My target is, I want to upload the confounds file from fmriprep output and skip the preprocessing step in connGUI but I want to do this through scripting and not by manually uploading in CONN GUI.

Thank you

Is there a reason you are against the GUI? The GUI does have a convenient automated import from fMRIPrep option, which you can run and then script the rest.

No No it’s nothing like that, My target is to use coding completely and display only the results. Therefore I asked this question.
Actually I almost did it through converting the covariates file to .txt and then uploaded it. As the covariates had “NaN” values, it shows error while importing ROIs, Then I tried replacing NaN with 0 and the code ran properly but when the output appears in GUI, in 1st level covariates section the plots are not there but the outliers are mentioned correctly. Do you know why this is happening?

You might want to check out XCPEngine / XCP_ABCD. These are tailored to work with fmriprep and require much less scripting. The primary outputs are first-level roi-to-roi maps, although there is also seed-based connectivity pipelines too. These can be fed into a second-level model, such as in Nilearn, to get and visualize group-level results.

not sure what your end goal is you might also be interested in