mriqc icon indicating copy to clipboard operation
mriqc copied to clipboard

--task-id doesn't work for generating group-level report

Open tepzhang opened this issue 4 years ago • 8 comments

After running the participant level mriqc and getting the report for individual runs, I wanted to generate separate group-level reports for each task I had (e.g., task-ER 5 runs, task-stroop 2 runs). I added the '--task-id ER -m bold' in the command but the group-level report I got still contained all bold data from all tasks.

After talking with Oscar, he suggested me to report an issue here.

tepzhang avatar Oct 22 '19 23:10 tepzhang

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 31 '20 05:01 stale[bot]

Hi, Is there any update on this? I can't also get group level report for separate task or even session.

manzouri avatar Jan 27 '22 12:01 manzouri

Yes, this would be pretty cool!

andreifoldes avatar Jun 09 '22 10:06 andreifoldes

This should be doable now with the --bids-filter-file argument. Please reopen if I'm wrong.

oesteban avatar Apr 17 '24 09:04 oesteban

Hi Oscar,

I tried the --bids-filter-file option without success. I use the latest mriqc 24.0.0 using a singularity build. I have two tasks. I created to json files:

reward: { "bold": {"task": ["reward"]} }

Flanker: { "bold": {"task": ["flanker"]} }

I used the command below #### in a bash script. Note that I renamed the generated output after each loop, as otherwise, the standard output names "group_bold.html" and "group_bold.tsv" are generated (e.g. the second loop overwrites the output of the first). So, initially, I thought that for some mystical reason, stuff was mixed after the second loop. Unfortunately, the result after renaming files is the same. The data of both tasks are mixed.

Did I misunderstand anything or use the wrong implementation? Is it because the individual data was generated using mriqc.23.1.0? If so, should I rerun mriqc.24.0.0 on the individual data and, already at this level, use the --bids-filter-file option to create separate HTML/tsv files? In this case, will the output file names get the "task label" pre- or postpended?

########## ....

for task in reward flanker do

filter="${SCRIPTS_DIR}/bids_filter_grouplevel_${task}.json"

catch_error singularity run --cleanenv --contain \
-B ${BIDS_TMP_DIR}/:/data_in \
-B ${SCRIPTS_DIR}/:${SCRIPTS_DIR} \
-B ${DERIV_DIR}/:/data_out \
-B /tmp:/tmp \
${mriqc_sif} \
/data_in \
/data_out \
group \
--session-id ${ses_label} \
--bids-filter-file ${filter} \
--no-sub \
--notrack \
-vv

# rename output

mv ${DERIV_DIR}/group_bold.tsv ${DERIV_DIR}/group_bold_${task}.tsv
mv ${DERIV_DIR}/group_bold.html ${DERIV_DIR}/group_bold_${task}.html

done

###########

I than used

WilliamFCB avatar Apr 18 '24 08:04 WilliamFCB

@oesteban, could you reopen the issue? see my comment above

WilliamFCB avatar Apr 18 '24 08:04 WilliamFCB

thanks!

WilliamFCB avatar Apr 18 '24 10:04 WilliamFCB

@oesteban
I know you are busy, so for now, I generated temporary BIDS directories for the separate fMRI tasks for creating group HTMLs for separate fMRI tasks.

However, it seems that when running mriqc on one bold series, the resulting individual HTMLs are not named using the input data name, in my case, sub-via297_ses-02CFINskyra_task-flanker_run-01_part-mag_bold.html, but instead sub-via297_ses-02CFINskyra_task-flanker_run-01_bold.html.

The effect of this is that when clicking on a data point in the group HTML, the associated HTML can not be loaded as it is looking for sub-via297_ses-02CFINskyra_task-flanker_run-01_part-mag_bold.html. Not a problem, as I just renamed the individual HTMLs, but do you have any idea when this functionality might work out of the box? Thanks in advance

WilliamFCB avatar Apr 29 '24 05:04 WilliamFCB