You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[`tat2`](https://lncd.github.io/lncdtools/tat2/) (cf. [`dR2*`](https://github.com/Larsen-Lab/dR2star)), `tsnr`, `melanin_align` - modality specific wrappers
21
25
*`4dConcatSubBriks` - extract a subbrick from a list of nifti label with luna ids. Useful for quality checking many structurals, subject masks, or individual contrasts. Wraps around 3dbucket and 3drefit:
22
26
*`img_bg_rm` - use imagemagick's `convert` to set a background to alpha (remove). Taken from ["hackerb9" stack overflow solution](https://stackoverflow.com/questions/9155377/set-transparent-background-using-imagemagick-and-commandline-prompt). use on afni and suma screen captures
23
27
*`mkmissing` - find missing patterns between two steps in a pipeline (file globs)
24
28
*`r` - read dataframe from stdin and run R code with shortcuts and magic a la DataScienceToolkit's Rio
25
-
*[`tat2`](https://lncd.github.io/lncdtools/tat2/), `melanin_align` - modality specific wrappers
[lncdtools](//github.com/lncd/lncdtools) is a suit of shell scripting, GNU Make, and general neuroimaging [^AFNI] companion tools developed in the [Laboratory of NeuroCognitive Development](https://lncd.pitt.edu).
9
9
@@ -13,9 +13,9 @@ Also see [LNCDR](https://github.com/LabNeuroCogDevel/LNCDR) for GNU R functions.
13
13
## Highlights
14
14
15
15
*[setup](lncdtools_setup) - guide for "installing": clone and add to path
16
-
*[`tat2`](tat2) - documentation for calculate time average T2* on 4D EPI
17
16
*[BIDS](BIDS) - converting DICOM folders to a BIDS spec file hierarchy using `dcmdirtab`, `dcmtab_bids`, and `mknii`
18
-
*[shell scripting tools](shell) - docs for shell scripting with `iffmain`, `waitforjobs`, `dryrun`, `drytee`
17
+
*[shell scripting tools](shell) - docs for shell scripting with `iffmain`, `waitforjobs`, `skip-exist`, `dryrun`, `drytee`
19
18
*`niinote` - warp a nifti creating command to append AFNI's note header (ad hoc provenance)
20
19
*`mkls`, `mkifdiff`, `mkstat`, `mkmissing` - tools for using make with sentinel files
Copy file name to clipboardExpand all lines: docs/tat2.md
+57-1Lines changed: 57 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,9 @@
1
1
# Time averaged T2*
2
+
3
+
> [!TIP]
4
+
> For the 2026 manuscript, `tat2` has been moved and renamed to [`dR2star`](https://github.com/Larsen-Lab/dR2star)).
5
+
> Validation code for that is hosted in [own repository `tat2-validation`](https://github.com/LabNeuroCogDevel/tat2-validation)
6
+
2
7
`tat2` ([code](https://github.com/LabNeuroCogDevel/lncdtools/blob/master/tat2)) wraps around `3dROIstats`, `3dcalc`, and `3dTstat` to reduce 4D EPI BOLD data to a per-voxel (3D) measure (`nT2*`) that is inversely related to iron concentration.
Will combine all of the matching `*preroc_bold.nii.gz` (presumably multiple 4D time series fMRI data) into a single 3D image `derive/tat2.nii.gz`
36
+
37
+
### fmriprep
38
+
39
+
Very limited fmriprep support is provided. More support is offered by [`dR2star`](https://github.com/Larsen-Lab/dR2star).
40
+
41
+
```
42
+
exort FD_THRES=0.3
43
+
tat2 -fmriprep /path/to/fmriprep-deriv/
44
+
# will make a tat2star file for each func folder found.
45
+
# e.g. /path/to/fmriprep-deriv/sub-1/ses-1/func/sub-1_ses-1_desc-preproc_tat2star.nii.gz
46
+
```
47
+
30
48
### With options and relative paths
49
+
See https://regex101.com/r/bM6p7X/1 for visual representation and playground of the regular expressions explored below.
50
+
51
+
The reference region mask and/or censor files may be in another folder or named specific to a participant's visit and run input file.
52
+
`-mask_rel` and `-censor_rel` support `s/search/replace/` regular expressions to transform the input `*.nii.gz` name into a matching motion or censor file.
53
+
54
+
55
+
Imagine a somewhat pathological file organization like
56
+
```
57
+
├── censor_files
58
+
│ └── sub-1_ses-2_run-1
59
+
│ └── preproc_censor-fd0.3.1D
60
+
│ └── sub-1_ses-2_run-2
61
+
│ └── preproc_censor-fd0.3.1D
62
+
└── func
63
+
└── sub-1_ses-2_run-1_desc-preproc_bold.nii.gz
64
+
└── sub-1_ses-2_run-1_desc-brain_mask.nii.gz
65
+
...
66
+
└── sub-1_ses-2_run-2_desc-preproc_bold.nii.gz
67
+
└── sub-1_ses-2_run-2_desc-brain_mask.nii.gz
68
+
```
69
+
70
+
`tat2` can accommodate matching pairing each run to the appropriate file using regular expression search and replace.
* sibling mask files are matched using `-mask_rel 's/preproc_bold.nii.gz/brain_mask.nii.gz/'`
87
+
1. searches each input file for `preproc_bold.nii.gz`
88
+
2. and replaces that with `brain_maks.nii.gz`
89
+
* to match censor files across directories, `censor_regex` uses `s/.*func\/(.*)-preproc_bold.nii.gz/censor_files\/\1\/preproc_censor-fd0.3.1D/`). Also see https://regex101.com/r/bM6p7X/1
90
+
1. searches each input file for `.*func\/(.*)-preproc_bold.nii.gz`, where
91
+
*`\/` "escapes" the directory slash, escape to distinguish it from the search-replace deliminator in `s///`
92
+
* where `(.*)` captures the matching part to reuse as `\\1` in
93
+
3. the replacement like `censor_files\/\1\/preproc_censor-fd0.3.1D`
94
+
95
+
Also see [issue#5](https://github.com/lncd/lncdtools/issues/5).
96
+
45
97
## Preprocessing
98
+
46
99
We slice-time and motion correction, skull strip, despiking (wavelet), and warp to MNI before running `tat2`.
47
-
Notably, smoothing is not included in datasets input to `tat2`.
100
+
The validation manuscript ([`tat2-validation`](https://github.com/LabNeuroCogDevel/tat2-validation)) also uses ABCD minimally preprocessed inputs.
101
+
102
+
> [!CAUTION]
103
+
> Notably, smoothing is not included in datasets input to `tat2`.
0 commit comments