Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcm-zurich BIDSification #217

Closed
wants to merge 17 commits into from
Closed

dcm-zurich BIDSification #217

wants to merge 17 commits into from

Conversation

valosekj
Copy link
Member

@valosekj valosekj commented Feb 27, 2023

Overview

This PR discusses the BIDSification of dcm-zurich dataset.

Sample of the input dataset (located on joplin in ~/duke/projects/dcm-normalization/data_zurich_2023-02-22/Nifti_proCSM/Nifti_proCSM):

 ├── 250791
 │	├── t2_tse_sag_384_25mm_0005
 │	│	└── s250791-113456-00001-00020-1.nii
 │	├── t2_tse_tra_oben_0006
 │	│	└── s250791-113720-00001-00015-1.nii
 │	└── t2_tse_tra_unten_0007
 │	    └── s250791-113952-00001-00015-1.nii
 ...

Sample of the output BIDS dataset (located on joplin in ~/extrassd1/janvalosek/dcm-zurich):

 ├── code
 │	└── curate_dcm-zurich.py
 ├── dataset_description.json
 ├── README.md
 ├── participants.json
 ├── participants.tsv
 ├── sourcedata
 │	 ├── dataset_description.json
 │	 ├── sub-250791
 │	 │	 └── anat
 │	 │	     ├── sub-250791_acq-axialBottom_T2w.json
 │	 │	     ├── sub-250791_acq-axialBottom_T2w.nii.gz            # non-stitched image
 │	 │	     ├── sub-250791_acq-axialTop_T2w.json
 │	 │	     └── sub-250791_acq-axialTop_T2w.nii.gz               # non-stitched image
 ...
 ├── sub-250791
 │	 └── anat
 │	     ├── sub-250791_acq-axial_T2w.json
 │	     ├── sub-250791_acq-axial_T2w.nii.gz                          # stitched image
 │	     ├── sub-250791_acq-sagittal_T2w.json
 │	     └── sub-250791_acq-sagittal_T2w.nii.gz
...

README.md is provided within this PR to allow easy review.

Stitching

Most subjects (n=121) have two T2tra images. One covers the upper cervical SC (top FOV), second covers the lower cervical SC (bottom FOV). I stitched these two images using sct_match -stitch:

os.system('sct_image -i ' + path_file_top + ' ' + path_file_bottom + ' -stitch -o ' + path_file_stitched +
' -qc ' + path_qc + ' -qc-subject sub-' + subject)

I also stored the original non-stitched images under sourcedata folder (point 2 of "storage of derived datasets").

I checked the QC (~/extrassd1/janvalosek/dcm-zurich/qc) for 121 subjects where the stitching was applied, and it looks fine.

Checks

bids-validator is reasonably happy. The upload of the dataset to git-annex will be discussed in a separate issue, as usual.

Below are some checks that the number of subjects between the input and output datasets is the same.

The number of subjects in the input dataset:

$ cd ~/duke/projects/dcm-normalization/data_zurich_2023-02-22/Nifti_proCSM/Nifti_proCSM
$ ls -1d * | wc -l
140

The number of subjects in the output dataset:

$ cd extrassd1/janvalosek/dcm-zurich
$ ls -1d sub-* | wc -l
140

The number of subjects in the output dataset under sourcedata (i.e. subjects with two T2w axial images --> stitching was done, and the original non-stitched images are stored under sourcedata):

$ ls -1d sourcedata/sub-* | wc -l
121

There are also:

  • 17 subjects with only a single T2w image --> no stitching was performed (see README.md)
  • 2 subjects with no T2w image at all (see README.md)

121 + 17 + 2 = 140 (i.e. the number of subjects is the same between the input and the output datasets)

@valosekj valosekj marked this pull request as ready for review February 27, 2023 20:19
@valosekj
Copy link
Member Author

@jcohenadad Could you please review if README.md is fine?

Copy link
Member

@jcohenadad jcohenadad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! thanks

Copy link
Member

@sandrinebedard sandrinebedard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good!

@valosekj valosekj mentioned this pull request Feb 28, 2023
@valosekj
Copy link
Member Author

Thank you for your feedback!
The dataset has been pushed to git-annex within #218 --> closing this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants