Multi-Echo Denoising with tedana
#
In this analysis tutorial, we will use tedana
[DuPre et al., 2021] to perform multi-echo denoising.
Specifically, we will use tedana.workflows.tedana_workflow()
.
import json
import os
from glob import glob
from pprint import pprint
import pandas as pd
from IPython.display import HTML, display
from repo2data.repo2data import Repo2Data
from tedana import workflows
# Install the data if running locally, or point to cached data if running on neurolibre
DATA_REQ_FILE = os.path.join("../binder/data_requirement.json")
# Download data
repo2data = Repo2Data(DATA_REQ_FILE)
data_path = repo2data.install()
data_path = os.path.abspath(data_path[0])
---- repo2data starting ----
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/repo2data
Config from file :
../binder/data_requirement.json
Destination:
./../data/multi-echo-data-analysis
Info : ./../data/multi-echo-data-analysis already downloaded
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
func_dir = os.path.join(data_path, "func/")
data_files = [
os.path.join(
func_dir,
"sub-04570_task-rest_echo-1_space-scanner_desc-partialPreproc_bold.nii.gz",
),
os.path.join(
func_dir,
"sub-04570_task-rest_echo-2_space-scanner_desc-partialPreproc_bold.nii.gz",
),
os.path.join(
func_dir,
"sub-04570_task-rest_echo-3_space-scanner_desc-partialPreproc_bold.nii.gz",
),
os.path.join(
func_dir,
"sub-04570_task-rest_echo-4_space-scanner_desc-partialPreproc_bold.nii.gz",
),
]
echo_times = [12.0, 28.0, 44.0, 60.0]
mask_file = os.path.join(
func_dir, "sub-04570_task-rest_space-scanner_desc-brain_mask.nii.gz"
)
confounds_file = os.path.join(
func_dir, "sub-04570_task-rest_desc-confounds_timeseries.tsv"
)
out_dir = os.path.join(data_path, "tedana")
workflows.tedana_workflow(
data_files,
echo_times,
out_dir=out_dir,
mask=mask_file,
prefix="sub-04570_task-rest_space-scanner",
fittype="curvefit",
tedpca="mdl",
verbose=True,
gscontrol=["mir"],
)
The tedana workflow writes out a number of files.
out_files = sorted(glob(os.path.join(out_dir, "*")))
out_files = [os.path.basename(f) for f in out_files]
print("\n".join(out_files))
figures
sub-04570_task-rest_space-scanner_S0map.nii.gz
sub-04570_task-rest_space-scanner_T2starmap.nii.gz
sub-04570_task-rest_space-scanner_dataset_description.json
sub-04570_task-rest_space-scanner_desc-ICAAcceptedMIRDenoised_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAAccepted_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAAccepted_stat-z_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAAveragingWeights_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICACrossComponent_metrics.json
sub-04570_task-rest_space-scanner_desc-ICAMIRDenoised_mixing.tsv
sub-04570_task-rest_space-scanner_desc-ICAS0_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAT2_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICA_decision_tree.json
sub-04570_task-rest_space-scanner_desc-ICA_decomposition.json
sub-04570_task-rest_space-scanner_desc-ICA_mixing.tsv
sub-04570_task-rest_space-scanner_desc-ICA_stat-z_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICA_status_table.tsv
sub-04570_task-rest_space-scanner_desc-PCAAveragingWeights_components.nii.gz
sub-04570_task-rest_space-scanner_desc-PCACrossComponent_metrics.json
sub-04570_task-rest_space-scanner_desc-PCAS0_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-PCAT2_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-PCA_decomposition.json
sub-04570_task-rest_space-scanner_desc-PCA_metrics.json
sub-04570_task-rest_space-scanner_desc-PCA_metrics.tsv
sub-04570_task-rest_space-scanner_desc-PCA_mixing.tsv
sub-04570_task-rest_space-scanner_desc-PCA_stat-z_components.nii.gz
sub-04570_task-rest_space-scanner_desc-T1likeEffect_min.nii.gz
sub-04570_task-rest_space-scanner_desc-adaptiveGoodSignal_mask.nii.gz
sub-04570_task-rest_space-scanner_desc-confounds_timeseries.tsv
sub-04570_task-rest_space-scanner_desc-denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-limited_S0map.nii.gz
sub-04570_task-rest_space-scanner_desc-limited_T2starmap.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomAcceptedMIRDenoised_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomAccepted_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomMIRDenoised_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomRejected_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcom_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcom_whitened_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-rmse_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-tedana_metrics.json
sub-04570_task-rest_space-scanner_desc-tedana_metrics.tsv
sub-04570_task-rest_space-scanner_desc-tedana_registry.json
sub-04570_task-rest_space-scanner_echo-1_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_references.bib
sub-04570_task-rest_space-scanner_report.txt
sub-04570_task-rest_space-scanner_tedana_report.html
tedana_2025-08-21T151613.tsv
metrics = pd.read_table(
os.path.join(out_dir, "sub-04570_task-rest_space-scanner_desc-tedana_metrics.tsv")
)
Component | kappa | rho | variance explained | normalized variance explained | countsigFT2 | countsigFS0 | dice_FT2 | dice_FS0 | countnoise | signal-noise_t | signal-noise_p | d_table_score | optimal sign | varex kappa ratio | d_table_score_node20 | Var Exp of rejected to accepted | classification | classification_tags | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | ICA_00 | 23.963910 | 18.845160 | 0.974387 | 0.014406 | 813 | 766 | 0.000000 | 0.000000 | 1223 | -2.264125 | 0.025652 | 31.200000 | 1 | 3.124711 | nan | nan | rejected | Unlikely BOLD |
1 | ICA_01 | 18.386390 | 15.105416 | 0.209236 | 0.002638 | 322 | 163 | 0.243200 | 0.000000 | 1228 | 0.000000 | 0.000000 | 31.200000 | 1 | 0.874533 | nan | 5.337717 | accepted | Low variance |
2 | ICA_02 | 53.904796 | 11.570936 | 0.365079 | 0.004694 | 1849 | 375 | 0.621872 | 0.252033 | 880 | 10.298052 | 0.000000 | 7.600000 | -1 | 0.520470 | 6.600000 | 11.642397 | accepted | Likely BOLD |
3 | ICA_03 | 22.443964 | 29.659039 | 0.394177 | 0.005023 | 840 | 1175 | 0.336829 | 0.364685 | 1183 | 0.000000 | 0.000000 | 25.800000 | 1 | 1.349670 | nan | nan | rejected | Unlikely BOLD |
4 | ICA_04 | 36.402447 | 36.417731 | 1.079447 | 0.010505 | 2030 | 1616 | 0.447545 | 0.424479 | 1136 | 7.114071 | 0.000000 | 14.400000 | -1 | 2.278803 | nan | nan | rejected | Unlikely BOLD |
5 | ICA_05 | 14.776330 | 53.185372 | 0.539564 | 0.012173 | 280 | 786 | 0.000000 | 0.362080 | 509 | -8.452758 | 0.000000 | 31.000000 | -1 | 2.806160 | nan | nan | rejected | Unlikely BOLD |
6 | ICA_06 | 35.682686 | 41.152975 | 1.411969 | 0.016422 | 722 | 729 | 0.268085 | 0.332160 | 1050 | 6.150607 | 0.000002 | 19.000000 | -1 | 3.040910 | nan | nan | rejected | Unlikely BOLD |
7 | ICA_07 | 102.876143 | 10.929019 | 0.754819 | 0.009029 | 3277 | 362 | 0.669988 | 0.166436 | 613 | 6.615788 | 0.000000 | 2.800000 | -1 | 0.563851 | 2.400000 | 14.470979 | accepted | Likely BOLD |
8 | ICA_08 | 14.768110 | 20.934533 | 0.273712 | 0.003667 | 226 | 300 | 0.059908 | 0.384615 | 997 | -6.963965 | 0.000000 | 34.200000 | -1 | 1.424309 | nan | nan | rejected | Unlikely BOLD |
9 | ICA_09 | 21.605372 | 17.761140 | 0.307787 | 0.004137 | 388 | 282 | 0.000000 | 0.000000 | 1225 | 0.000000 | 0.000000 | 32.000000 | 1 | 1.094775 | nan | 13.269860 | accepted | Low variance |
10 | ICA_10 | 49.297713 | 30.183255 | 0.940788 | 0.012705 | 3215 | 1499 | 0.515872 | 0.268544 | 1121 | -1.525198 | 0.131335 | 16.400000 | 1 | 1.466563 | nan | nan | rejected | Unlikely BOLD |
11 | ICA_11 | 22.601135 | 36.298328 | 0.453209 | 0.004387 | 470 | 538 | 0.341151 | 0.458527 | 1089 | 1.325181 | 0.197289 | 23.400000 | -1 | 1.541007 | nan | nan | rejected | Unlikely BOLD |
12 | ICA_12 | 23.968036 | 20.341244 | 0.472085 | 0.004739 | 570 | 377 | 0.255958 | 0.176471 | 1148 | -3.632142 | 0.000857 | 29.000000 | -1 | 1.513643 | 17.000000 | 26.592542 | accepted | Likely BOLD |
13 | ICA_13 | 24.006483 | 14.921336 | 0.218386 | 0.003102 | 1128 | 630 | 0.319091 | 0.296675 | 1231 | 0.000000 | 0.000000 | 26.000000 | -1 | 0.699088 | nan | 9.380691 | accepted | Low variance |
14 | ICA_14 | 52.863978 | 11.030685 | 0.808909 | 0.009880 | 2942 | 188 | 0.563806 | 0.000000 | 929 | 12.391319 | 0.000000 | 7.600000 | -1 | 1.175915 | 6.600000 | 11.451016 | accepted | Likely BOLD |
15 | ICA_15 | 28.881649 | 23.392165 | 1.202041 | 0.011165 | 1297 | 433 | 0.313320 | 0.163170 | 1233 | 0.000000 | 0.000000 | 25.200000 | 1 | 3.198404 | 15.200000 | nan | rejected | Less likely BOLD |
16 | ICA_16 | 25.912802 | 31.719562 | 0.420603 | 0.004614 | 392 | 463 | 0.304124 | 0.282916 | 1099 | 0.000000 | 0.000000 | 26.400000 | 1 | 1.247365 | nan | nan | rejected | Unlikely BOLD |
17 | ICA_17 | 16.999247 | 19.297453 | 0.278863 | 0.003151 | 420 | 655 | 0.203593 | 0.222566 | 1230 | 0.000000 | 0.000000 | 31.800000 | -1 | 1.260659 | nan | nan | rejected | Unlikely BOLD |
18 | ICA_18 | 66.799022 | 11.946827 | 0.683821 | 0.006818 | 2054 | 421 | 0.645953 | 0.255696 | 689 | 14.985958 | 0.000000 | 4.400000 | -1 | 0.786699 | 3.800000 | 19.209823 | accepted | Likely BOLD |
19 | ICA_19 | 37.562890 | 40.905321 | 1.464678 | 0.015207 | 547 | 710 | 0.389199 | 0.400868 | 1001 | 3.334854 | 0.002702 | 17.000000 | 1 | 2.996533 | nan | nan | rejected | Unlikely BOLD |
20 | ICA_20 | 15.305864 | 21.290880 | 0.407149 | 0.006202 | 45 | 192 | 0.000000 | 0.317708 | 831 | -2.145011 | 0.032462 | 33.200000 | -1 | 2.044238 | nan | nan | rejected | Unlikely BOLD |
21 | ICA_21 | 84.952283 | 11.250273 | 1.244685 | 0.008481 | 2580 | 288 | 0.658527 | 0.117647 | 628 | 10.338983 | 0.000000 | 3.400000 | 1 | 1.125953 | 3.000000 | 7.678323 | accepted | Likely BOLD |
22 | ICA_22 | 47.428357 | 22.884456 | 18.118683 | 0.147507 | 5043 | 2404 | 0.457943 | 0.179092 | 1041 | 0.000000 | 0.000000 | 13.600000 | -1 | 29.357867 | 9.400000 | nan | rejected | Less likely BOLD |
23 | ICA_23 | 12.120251 | 29.573528 | 0.326093 | 0.004685 | 94 | 214 | 0.000000 | 0.503529 | 650 | -8.669511 | 0.000000 | 33.600000 | 1 | 2.067595 | nan | nan | rejected | Unlikely BOLD |
24 | ICA_24 | 34.286932 | 24.547042 | 0.972365 | 0.010708 | 1262 | 419 | 0.400000 | 0.000000 | 1251 | 0.000000 | 0.000000 | 22.800000 | 1 | 2.179397 | 13.800000 | nan | rejected | Less likely BOLD |
25 | ICA_25 | 16.953422 | 16.732650 | 0.211095 | 0.002731 | 260 | 459 | 0.000000 | 0.317181 | 1270 | 0.000000 | 0.000000 | 36.400000 | 1 | 0.956880 | nan | nan | rejected | Unlikely BOLD |
26 | ICA_26 | 20.361392 | 14.432911 | 0.176224 | 0.002748 | 500 | 235 | 0.377510 | 0.186147 | 1203 | 3.117638 | 0.002406 | 24.200000 | 1 | 0.665110 | nan | 7.400702 | accepted | Low variance |
27 | ICA_27 | 33.321036 | 32.060287 | 0.865706 | 0.010818 | 492 | 365 | 0.357895 | 0.000000 | 1084 | 0.000000 | 0.000000 | 22.800000 | 1 | 1.996586 | 14.600000 | nan | rejected | Less likely BOLD |
28 | ICA_28 | 30.108351 | 12.927686 | 1.039400 | 0.007045 | 1158 | 121 | 0.388220 | 0.000000 | 1155 | 0.000000 | 0.000000 | 22.200000 | 1 | 2.652965 | 14.400000 | nan | rejected | Less likely BOLD |
29 | ICA_29 | 80.883760 | 12.626881 | 0.636901 | 0.010566 | 2945 | 465 | 0.581311 | 0.026287 | 601 | 8.423694 | 0.000000 | 4.000000 | -1 | 0.605127 | 3.600000 | 11.847878 | accepted | Likely BOLD |
30 | ICA_30 | 43.827473 | 11.578461 | 0.519174 | 0.005640 | 1534 | 313 | 0.566335 | 0.130081 | 819 | 14.342942 | 0.000000 | 9.000000 | 1 | 0.910338 | 8.000000 | 14.850684 | accepted | Likely BOLD |
31 | ICA_31 | 29.139108 | 23.873300 | 0.759698 | 0.011004 | 1720 | 1160 | 0.207729 | 0.188510 | 1255 | 0.000000 | 0.000000 | 26.600000 | -1 | 2.003553 | 15.400000 | 27.335733 | accepted | Accept borderline |
32 | ICA_32 | 14.755411 | 17.029743 | 0.269894 | 0.003557 | 401 | 440 | 0.000000 | 0.000000 | 1239 | 0.000000 | 0.000000 | 35.000000 | 1 | 1.405653 | nan | nan | rejected | Unlikely BOLD |
33 | ICA_33 | 44.086324 | 18.077004 | 1.513722 | 0.009673 | 2119 | 408 | 0.523480 | 0.037783 | 777 | 1.150975 | 0.250259 | 10.600000 | -1 | 2.638628 | 8.400000 | 12.408701 | accepted | Likely BOLD |
34 | ICA_34 | 56.429382 | 10.814910 | 0.247334 | 0.004278 | 1781 | 95 | 0.617319 | 0.000000 | 666 | 11.382307 | 0.000000 | 6.000000 | 1 | 0.336833 | 5.200000 | 6.951763 | accepted | Likely BOLD |
35 | ICA_35 | 17.790500 | 12.597793 | 0.232961 | 0.003241 | 285 | 51 | 0.352113 | 0.000000 | 1242 | -5.030514 | 0.000018 | 33.600000 | -1 | 1.006310 | nan | 13.233910 | accepted | Low variance |
36 | ICA_36 | 32.499106 | 34.934669 | 0.689722 | 0.007488 | 1095 | 1807 | 0.434334 | 0.462183 | 1082 | 0.153060 | 0.878607 | 18.200000 | 1 | 1.630942 | nan | nan | rejected | Unlikely BOLD |
37 | ICA_37 | 70.548540 | 17.969418 | 29.229082 | 0.233936 | 5731 | 1645 | 0.566419 | 0.110131 | 709 | 0.000000 | 0.000000 | 8.600000 | -1 | 31.839269 | 5.800000 | 79.586949 | accepted | Likely BOLD |
38 | ICA_38 | 21.288556 | 23.449890 | 1.429819 | 0.018098 | 1218 | 1285 | 0.240820 | 0.334156 | 1131 | 2.114198 | 0.037227 | 23.600000 | -1 | 5.161439 | nan | nan | rejected | Unlikely BOLD |
39 | ICA_39 | 32.808892 | 32.459510 | 1.024512 | 0.010649 | 683 | 544 | 0.362297 | 0.336725 | 1065 | 0.000000 | 0.000000 | 21.600000 | 1 | 2.399724 | 14.000000 | nan | rejected | Less likely BOLD |
40 | ICA_40 | 16.606237 | 18.724607 | 0.389232 | 0.005196 | 270 | 307 | 0.172084 | 0.164204 | 920 | -10.839641 | 0.000000 | 32.800000 | 1 | 1.801246 | nan | nan | rejected | Unlikely BOLD |
41 | ICA_41 | 48.017993 | 36.938387 | 26.082638 | 0.311829 | 6059 | 5930 | 0.515417 | 0.356028 | 719 | 0.000000 | 0.000000 | 10.800000 | 1 | 41.742980 | 7.600000 | nan | rejected | Less likely BOLD |
42 | ICA_42 | 17.346959 | 15.014701 | 0.360350 | 0.005460 | 268 | 68 | 0.434263 | 0.135338 | 956 | 5.441800 | 0.000000 | 22.600000 | -1 | 1.596382 | nan | 16.339245 | accepted | Low variance |
with open(
os.path.join(out_dir, "sub-04570_task-rest_space-scanner_desc-tedana_metrics.json"),
"r",
) as fo:
data = json.load(fo)
first_five_keys = list(data.keys())[:5]
reduced_data = {k: data[k] for k in first_five_keys}
pprint(reduced_data)
{'Component': {'Description': 'The unique identifier of each component. This '
'identifier matches column names in the mixing '
'matrix TSV file.',
'LongName': 'Component identifier'},
'classification_tags': {'Description': 'A single tag or a comma separated '
'list of tags to describe why a '
'component received its classification',
'LongName': 'Component classification tags'},
'countnoise': {'Description': "Number of 'noise' voxels (voxels highly "
'weighted for component, but not from clusters) '
'from each component.',
'LongName': 'Noise voxel count',
'Units': 'voxel'},
'countsigFS0': {'Description': 'Number of significant voxels from the '
'cluster-extent thresholded S0 model '
'F-statistic map for each component.',
'LongName': 'S0 model F-statistic map significant voxel count',
'Units': 'voxel'},
'countsigFT2': {'Description': 'Number of significant voxels from the '
'cluster-extent thresholded T2 model '
'F-statistic map for each component.',
'LongName': 'T2 model F-statistic map significant voxel count',
'Units': 'voxel'}}
df = pd.DataFrame.from_dict(data, orient="index")
df = df.fillna("n/a")
display(HTML(df.to_html()))
Description | LongName | Units | Levels | |
---|---|---|---|---|
Component | The unique identifier of each component. This identifier matches column names in the mixing matrix TSV file. | Component identifier | n/a | n/a |
classification_tags | A single tag or a comma separated list of tags to describe why a component received its classification | Component classification tags | n/a | n/a |
countnoise | Number of 'noise' voxels (voxels highly weighted for component, but not from clusters) from each component. | Noise voxel count | voxel | n/a |
countsigFS0 | Number of significant voxels from the cluster-extent thresholded S0 model F-statistic map for each component. | S0 model F-statistic map significant voxel count | voxel | n/a |
countsigFT2 | Number of significant voxels from the cluster-extent thresholded T2 model F-statistic map for each component. | T2 model F-statistic map significant voxel count | voxel | n/a |
d_table_score | Summary score compiled from five metrics, with smaller values (i.e., higher ranks) indicating more BOLD dependence and less noise. | Decision table score | arbitrary | n/a |
dice_FS0 | Dice value of cluster-extent thresholded maps of S0-model betas and F-statistics. | S0 model beta map-F-statistic map Dice similarity index | arbitrary | n/a |
dice_FT2 | Dice value of cluster-extent thresholded maps of T2-model betas and F-statistics. | T2 model beta map-F-statistic map Dice similarity index | arbitrary | n/a |
kappa | A pseudo-F-statistic indicating TE-dependence of the component. This metric is calculated by computing fit to the TE-dependence model at each voxel, and then performing a weighted average based on the voxel-wise weights of the component. | Kappa | arbitrary | n/a |
normalized variance explained | Normalized variance explained in the optimally combined data of each component.On a scale from 0 to 1. | Normalized variance explained | arbitrary | n/a |
optimal sign | Optimal sign determined based on skew direction of component parameter estimates across the brain. In cases where components were left-skewed (-1), the component time series and map weights are flipped prior to metric calculation. This sign applies to the original mixing matrix and map weights. The outputs produced by tedana are already flipped. | Optimal component sign | n/a | {'-1': 'Component is flipped prior to metric calculation.', '1': 'Component is not flipped prior to metric calculation.'} |
rho | A pseudo-F-statistic indicating TE-independence of the component. This metric is calculated by computing fit to the TE-independence model at each voxel, and then performing a weighted average based on the voxel-wise weights of the component. | Rho | arbitrary | n/a |
signal-noise_p | P-value for two-sample t-test of F-statistics from 'signal' voxels (voxels in clusters) against 'noise' voxels (voxels not in clusters) for T2 model. | Signal > noise p-value | arbitrary | n/a |
signal-noise_t | T-statistic for two-sample t-test of F-statistics from 'signal' voxels (voxels in clusters) against 'noise' voxels (voxels not in clusters) for T2 model. | Signal > noise t-statistic | arbitrary | n/a |
variance explained | Variance explained in the optimally combined data of each component. On a scale from 0 to 100. | Variance explained | arbitrary | n/a |
report = os.path.join(out_dir, "tedana_report.html")
with open(report, "r") as fo:
report_data = fo.read()
figures_dir = os.path.relpath(os.path.join(out_dir, "figures"), os.getcwd())
report_data = report_data.replace("./figures", figures_dir)
display(HTML(report_data))
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[9], line 2
1 report = os.path.join(out_dir, "tedana_report.html")
----> 2 with open(report, "r") as fo:
3 report_data = fo.read()
5 figures_dir = os.path.relpath(os.path.join(out_dir, "figures"), os.getcwd())
File /opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/IPython/core/interactiveshell.py:324, in _modified_open(file, *args, **kwargs)
317 if file in {0, 1, 2}:
318 raise ValueError(
319 f"IPython won't let you open fd={file} by default "
320 "as it is likely to crash IPython. If you know what you are doing, "
321 "you can use builtins' open."
322 )
--> 324 return io_open(file, *args, **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/tedana_report.html'