No DICOMs only Nii files available--creating JSON Sidecars and TSV Files

Hi,

I just wanted to follow-up on this thread.

I don’t have access to the DICOM files for a project that I am working on. I only have access to the nii files (e.g., 0691035I_106_FMRI-ABCD-STT2-PA_8_1.nii). I also not have JSON Sidecars or TSV files. But I do have the sequence PDF form.

Does anyone have a script to convert nii files to BIDS format and also create JSON sidecars and TSV files in the process?

I’m not sure what parameters to include in the JSON sidecars and how that changes from subject to subject. Also I’m assuming all the parameters that are included with a wrapper like heudiconv is not needed for processing down the line with fmriprep. If I’m manually creating the JSON sidecars and tsv files and renaming the bold subjects how do I go about doing that?

*Sidenote: My nii files are all bold task based files.

Thanks.

–Subbi M.

For creating the JSON sidecars, you’ll need some info from the original mri protocol. Sidecars contain extra dicom info that the nifti format does not preserve.

1 Like

@ajschadler

I do have the sequence PDF from the MRI Scanner site. I just don’t know how to go about manually creating the JSON sidecars and TSV for each subject. What specific parameters do I need to include in the JSON sidecars + TSV file that is additional to what the nii files do not contain. At the end it should look like this for each subject.

I need to run MRIQC + fmriprep on the BIDS data.

image

Thanks.

–Subbi M.

please see this question in the FAQ:

https://bids-website.readthedocs.io/en/latest/faq/faq_mri.html#i-only-have-nifti-files-and-no-dicom-can-i-still-create-a-bids-dataset

Note this is from a temporary version of the BIDS website so this link may not be valid in the future.

not mentioned in the FAQ:

  • if all your BOLD runs are the same across sessions, subjects the you only need to create a single json file in the root of your dataset task-images_bold.json with values for the TaskName and RepetitionTime
  • for the TSV you cannot recover those from the nifti only, you will have to generate them from the ‘log’ files that kept track of what stimulus was presented at the participant during the experiment
1 Like

@Remi-Gau,

  1. I have multiple runs for different tasks (There are 4 tasks each with 2 runs each. E.g., SST has 2 runs, MID has 2 runs…), each task has an AP and a PA directionality so the end would be sub-01_ses-01_task-sst_dir-AP_run-01_bold.nii.gz and sub-01_ses-01_task-sst_dir-PA_run-02_bold.nii.gz.
    Would a single json file work for something like this?

If yes–could you share an example if you have one?

  1. My TSV files don’t actually have any data in them and I don’t think we actually use the TSV files. For example for a previous study the TSV files look like this:

Is there a way to create just an empty TSV file with those headers for each subject/ses/run?

Thanks.

–Subbi M.

@Remi-Gau,

Outer directory:
image

The TSV in the outer directory looks like this:

that’s a scans.tsv not an events.tsv: they are completely different things.

scans.tsv say when what scan was acquired.

events.tsv
https://bids-specification.readthedocs.io/en/latest/modality-specific-files/task-events.html

scans.tsv
https://bids-specification.readthedocs.io/en/latest/modality-agnostic-files.html#scans-file

if the participants were performing a task in the scanner, but you do not know when what stimulus was presented of what participants did while in the scanner, I don’t think you will be able to do much with the data