Skip to content

Commit 72c48da

Browse files
author
Walaaa Zakaria
committed
update README : clarify not tarring patients with single timepoint and add segmentHA_T1_long.sh workflow
1 parent e92512f commit 72c48da

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

  • examples/freesurfer/freesurfer_longitudinal_processing

examples/freesurfer/freesurfer_longitudinal_processing/README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Overview
55

6-
This repository contains scripts and instructions to run **FreeSurfer longitudinal pipeline** encompassing three processing steps (cross, base, long) using **VIP Client** and **Girder** for data storage and retrieval. The pipeline supports **3D T1-weighted MRIs** for whole brain segmentation.
6+
This repository contains scripts and instructions to run **FreeSurfer longitudinal pipeline** encompassing three processing steps (cross, base, long), as well as the longitudinal version of hippocampus/amygdala subfield segmentation (segmentHA_T1_long.sh). VIP Python Client is used to execute the pipeline, while Girder handles data storage and retrieval. The pipeline supports **3D T1-weighted MRIs** for both whole brain segmentation and hippocampus/amygdala subfield segmentation.
77

88
1. **Download MRI Data from Girder**
99
2. **Run FreeSurfer Longitudinal [CROSS]**: run the standard cross-sectional `recon-all` pipeline
@@ -126,8 +126,12 @@ This script prepares the **subject-specific timepoints tarballs for the BASE st
126126
- Must **not** contain `.long.`
127127
- Extracts each archive temporarily
128128
- Groups timepoints by subject (`sub-XXXX`)
129-
- Re-compresses them into one `.tgz` per subject
130-
- Cleans temporary extracted files
129+
- **For subjects with multiple timepoints:**
130+
- Re-compresses them into one `.tgz` per subject for the `recon-all -base` pipeline
131+
- **For subjects with only one timepoint:**
132+
- Does **not** tar them
133+
- Saves their folder names to `single_timepoint_subjects.csv` in `derivatives/freesurfer/`
134+
- Cleans up temporary extracted files
131135

132136
### ⚙️ Inputs
133137

@@ -137,7 +141,9 @@ This script prepares the **subject-specific timepoints tarballs for the BASE st
137141
### 📤 Outputs
138142

139143
- Grouped per-subject archives for longitudinal processing:
140-
`derivatives/freesurfer/`
144+
`derivatives/freesurfer/tmp/`
145+
- CSV listing subjects with only one timepoint:
146+
`derivatives/freesurfer/single_timepoint_subjects.csv`
141147

142148
### How to Run
143149

@@ -193,12 +199,14 @@ python3 4-FS_BASE_parallel_jobs.py
193199

194200

195201
This script runs **FreeSurfer `recon-all -long`** on VIP using the BASE templates from Step 4 and the timepoints (TPs) tarballs produced from Step 3 and were used as an input to step 4, producing segmentations more robustly by registering each timepoint to its corresponding subject template. The script:
196-
- Connects to VIP using the API key
197-
- Lists BASE templates and TP tarballs on VIP
198-
- Matches BASE templates with corresponding TP tarballs for each subject
199-
- Prepares VIP input settings for the LONG pipeline
200-
- Launches `recon-all -long` jobs in parallel on VIP
201-
- Monitors workflow progress
202+
- Connects to VIP using the API key
203+
- Lists BASE templates and TP tarballs on VIP
204+
- Matches BASE templates with corresponding TP tarballs for each subject
205+
- Prepares VIP input settings for the LONG pipeline
206+
- Workflow is **parallelized per subject**:
207+
- `recon-all -long` runs first
208+
- `segmentHA_T1_long.sh` runs after completion
209+
- Monitors workflow progress
202210
- Downloads the completed longitudinal outputs to the local output directory
203211

204212
### ⚙️ Inputs

0 commit comments

Comments
 (0)