OSCR

A clinical neuroimaging platform for rapid, automated lesion detection and personalized post-stroke outcome prediction.

Code ↔ Paper

4 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 4 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Cognitive outcome-prediction model training ↔ run_modeling_gui.m, lines 1–103 · score 0.63 · misclassification cost, hyper parameter, cross validation, MATLAB, multivariate, stratified
  2. [2] § Methods › Cognitive outcome-prediction model training ↔ run_modeling_gui.m, lines 1–100 · score 0.63 · misclassification cost, hyper parameter, cross validation, MATLAB, multivariate, stratified
  3. [3] § Results › Cognitive outcome predictions ↔ plot_cognitive_outcome_models.ipynb, the whole file · a weak match · score 0.52 · fLNM, sLNM, unthresholded, impaired, class, map
  4. [4] § Methods › Cognitive outcome-prediction model evaluation ↔ model_code/ensemble/run_censemble_modeling.m, the whole file · a weak match · score 0.50 · tuned classification, score thresholds, ROC, AUC, optimized, predicted

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 1,699 lines · 86 KB · GPL-3.0 · 1 match

  1. classdef run_modeling_gui < matlab.apps.AppBase
  2. % Properties that correspond to app components
  3. properties (Access = public)
  4. UIFigure matlab.ui.Figure
  5. IdPathFlag matlab.ui.control.CheckBox
  6. RankCorCheckBox matlab.ui.control.CheckBox
  7. RegressLesionVolumefromXandYCheckBox matlab.ui.control.CheckBox
  8. CatYCheckBox matlab.ui.control.CheckBox
  9. NuisanceRegressorCheckBox matlab.ui.control.CheckBox
  10. RegressLesionVolumefromYCheckBox matlab.ui.control.CheckBox
  11. SelectNuisanceRegressorsListBox matlab.ui.control.ListBox
  12. SelectNuisanceRegressorsListBoxLabel matlab.ui.control.Label
  13. SelectOutcomeVariableYListBox matlab.ui.control.ListBox
  14. SelectOutcomeVariableYListBoxLabel matlab.ui.control.Label
  15. MisclassificationCostsPanel matlab.ui.container.Panel
  16. MisClasCostG1 matlab.ui.control.NumericEditField
  17. Group1EditField_3Label matlab.ui.control.Label
  18. MisClasCostG2 matlab.ui.control.NumericEditField
  19. Group1EditField_4Label matlab.ui.control.Label
  20. StatisticalThresholdsPanel matlab.ui.container.Panel
  21. FDRLabel matlab.ui.control.Label
  22. FDRThresh matlab.ui.control.NumericEditField
  23. UncPThresh matlab.ui.control.NumericEditField
  24. UncEditFieldLabel matlab.ui.control.Label
  25. FweThresh matlab.ui.control.NumericEditField
  26. FWEEditFieldLabel matlab.ui.control.Label
  27. PermutationTestingPanel matlab.ui.container.Panel
  28. RegistryFlag matlab.ui.control.CheckBox
  29. OutDirText matlab.ui.control.TextArea
  30. SelectOutputDirectoryButton matlab.ui.control.Button
  31. RunAnalysisButton matlab.ui.control.Button
  32. MultivariateModelingToolAnalysisConfigurationLabel matlab.ui.control.Label
  33. UseParallelProcessingRecommendedCheckBox matlab.ui.control.CheckBox
  34. FitExplanatoryModelCheckBox matlab.ui.control.CheckBox
  35. ResultOptionsPanel matlab.ui.container.Panel
  36. WritePermutationImagesCheckBox matlab.ui.control.CheckBox
  37. WriteBootstrapImagesCheckBox matlab.ui.control.CheckBox
  38. SelectModelDropDown matlab.ui.control.DropDown
  39. SelectModelLabel matlab.ui.control.Label
  40. BrainMaskText matlab.ui.control.TextArea
  41. ImDirText matlab.ui.control.TextArea
  42. CSVTtext matlab.ui.control.TextArea
  43. PredictorTypeButtonGroup matlab.ui.container.ButtonGroup
  44. OtherPredButton matlab.ui.control.RadioButton
  45. LesionButton matlab.ui.control.RadioButton
  46. MinimumDataThresholdsPanel matlab.ui.container.Panel
  47. MinObs matlab.ui.control.NumericEditField
  48. MinimumObservationLabel matlab.ui.control.Label
  49. MinFreq matlab.ui.control.NumericEditField
  50. MinimumFrequencyLabel matlab.ui.control.Label
  51. SelectCSVfileButton matlab.ui.control.Button
  52. SelectDataDirectoryButton matlab.ui.control.Button
  53. HyperParameterTuningPanel matlab.ui.container.Panel
  54. OptimizeHyperparametersCheckBox matlab.ui.control.CheckBox
  55. HpOptRepeats matlab.ui.control.NumericEditField
  56. HpOptFolds matlab.ui.control.NumericEditField
  57. HpOptCvType matlab.ui.control.DropDown
  58. HpOptNumberofRepeatsLabel matlab.ui.control.Label
  59. HpOptNumberofFoldsLabel matlab.ui.control.Label
  60. HpOptCVStrategyLabel matlab.ui.control.Label
  61. SelectBrainMaskButton matlab.ui.control.Button
  62. PredictorModalityButtonGroup matlab.ui.container.ButtonGroup
  63. ArrayButton matlab.ui.control.RadioButton
  64. MatrixButton matlab.ui.control.RadioButton
  65. NIFTIButton matlab.ui.control.RadioButton
  66. CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel matlab.ui.container.Panel
  67. EnableModelStackingCheckBox matlab.ui.control.CheckBox
  68. CVPermIter matlab.ui.control.NumericEditField
  69. PermutationsEditField_2Label matlab.ui.control.Label
  70. CVPermPanel matlab.ui.container.Panel
  71. CVPermCheckBox matlab.ui.control.CheckBox
  72. RunCrossValidationCheckBox matlab.ui.control.CheckBox
  73. CrossValidationSettingsPanel matlab.ui.container.Panel
  74. OuterRepeats matlab.ui.control.NumericEditField
  75. OuterFolds matlab.ui.control.NumericEditField
  76. CVType matlab.ui.control.DropDown
  77. NumberofRepeatsLabel_2 matlab.ui.control.Label
  78. NumberofOuterFoldsLabel matlab.ui.control.Label
  79. CVStrategyLabel_2 matlab.ui.control.Label
  80. GeneralModelingOptionsPanel matlab.ui.container.Panel
  81. BootIter matlab.ui.control.NumericEditField
  82. BootAnalysesPanel matlab.ui.container.Panel
  83. BootstrapLabel matlab.ui.control.Label
  84. PermutationsEditFieldLabel matlab.ui.control.Label
  85. BootCheckBox matlab.ui.control.CheckBox
  86. PermCheckBox matlab.ui.control.CheckBox
  87. StratifyTrainTestSplitsonYCheckBox matlab.ui.control.CheckBox
  88. ConfIntWidth matlab.ui.control.NumericEditField
  89. PermIter matlab.ui.control.NumericEditField
  90. ConfIntLabel matlab.ui.control.Label
  91. BootCIsCheckBox matlab.ui.control.CheckBox
  92. PermVoxPValsCheckBox matlab.ui.control.CheckBox
  93. PermApplycFWECheckBox matlab.ui.control.CheckBox
  94. ApplyDTLVCCheckBox matlab.ui.control.CheckBox
  95. StandardizeXCheckBox matlab.ui.control.CheckBox
  96. StandardizeYCheckBox matlab.ui.control.CheckBox
  97. end
  98. % Callbacks that handle component events
  99. methods (Access = private)
  100. % Code that executes after component creation
  101. function startupFcn(app)
  102. model_dir = fileparts(which('run_modeling_gui.mlapp'));
  103. addpath(model_dir);
  104. end
  105. % Callback function: CSVTtext, SelectCSVfileButton
  106. function SelectCSVfileButtonPushed(app, event)
  107. model_dir = fileparts(which('run_modeling_gui.mlapp'));
  108. if isfile(fullfile(model_dir, 'default_paths.mat'))
  109. load(fullfile(model_dir, 'default_paths.mat'), 'csv_dir');
  110. [csv_file, csv_path] = uigetfile({'*.csv'; '*xls'; '*xlsx'; '*.'},...
  111. 'Select CSV file containing behavioral data', csv_dir);
  112. else
  113. [csv_file, csv_path] = uigetfile({'*.csv'; '*xls'; '*xlsx'; '*.'},...
  114. 'Select CSV file containing behavioral data');
  115. end
  116. if csv_file == 0
  117. error('No file selected; please try again');
  118. else
  119. app.CSVTtext.Value = fullfile(csv_path, csv_file);
  120. end
  121. my_csv = readtable(fullfile(csv_path, csv_file),'NumHeaderLines', 0, 'Delimiter', ',');
  122. my_vars = my_csv.Properties.VariableNames;
  123. my_vars = setdiff(my_vars, "study_id");
  124. app.SelectOutcomeVariableYListBox.Items = my_vars;
  125. if app.NuisanceRegressorCheckBox.Value == 1
  126. app.SelectNuisanceRegressorsListBox.Items = my_vars;
  127. end
  128. end
  129. % Button pushed function: SelectDataDirectoryButton
  130. function SelectDataDirectoryButtonPushed(app, event)
  131. model_dir = fileparts(which('run_modeling_gui.mlapp'));
  132. if isfile(fullfile(model_dir, 'default_paths.mat'))
  133. load(fullfile(model_dir, 'default_paths.mat'), 'data_dir');
  134. cfg.img_dir = uigetdir(data_dir, 'Select directory containing imaging data');
  135. else
  136. cfg.img_dir = uigetdir(pwd, 'Select directory containing imaging data');
  137. end
  138. if cfg.img_dir == 0
  139. error('No directory selected; please try again');
  140. else
  141. app.ImDirText.Value = cfg.img_dir;
  142. end
  143. end
  144. % Button pushed function: SelectBrainMaskButton
  145. function SelectBrainMaskButtonPushed(app, event)
  146. model_dir = fileparts(which('run_modeling_gui.mlapp'));
  147. if app.NIFTIButton.Value == 1
  148. if isfile(fullfile(model_dir, 'default_paths.mat'))
  149. load(fullfile(model_dir, 'default_paths.mat'), 'mask_file');
  150. [mask_file, mask_path] = uigetfile({'*.nii.gz'; '*.nii'; '*.'}, 'Select brain mask file',...
  151. mask_file);
  152. else
  153. [mask_file, mask_path] = uigetfile({'*.nii.gz'; '*.nii'; '*.'}, 'Select brain mask file', pwd);
  154. end
  155. if mask_file == 0
  156. error('No file selected; please try again');
  157. else
  158. app.BrainMaskText.Value = fullfile(mask_path, mask_file);
  159. end
  160. elseif app.MatrixButton.Value == 1
  161. [parcel_file, parcel_path] = uigetfile({'*.mat'}, 'Select parcellation_table',...
  162. pwd);
  163. if parcel_file == 0
  164. error('No file selected; please try again');
  165. else
  166. app.BrainMaskText.Value = fullfile(parcel_path, parcel_file);
  167. end
  168. end
  169. end
  170. % Button pushed function: RunAnalysisButton
  171. function RunAnalysisButtonPushed(app, event)
  172. % Get model directory
  173. model_dir = fileparts(which('run_modeling_gui.mlapp'));
  174. cfg.model_dir = fullfile(model_dir, 'model_code');
  175. % Add core functions to path
  176. addpath(fullfile(cfg.model_dir));
  177. addpath(genpath(fullfile(cfg.model_dir, 'common')));
  178. % Set analysis modality
  179. if app.LesionButton.Value == 1
  180. cfg.modality = 'lesion';
  181. else
  182. cfg.modality = 'other';
  183. end
  184. % Set imaging flag
  185. if app.NIFTIButton.Value == 1
  186. cfg.write_nifti_images = 1;
  187. cfg.mask_path = string(app.BrainMaskText.Value);
  188. elseif app.MatrixButton.Value == 1
  189. cfg.write_nifti_images = 0;
  190. cfg.parcel_table = string(app.BrainMaskText.Value);
  191. elseif app.ArrayButton.Value == 1
  192. cfg.write_nifti_images = 0;
  193. end
  194. % Set up basic cfg file
  195. cfg.model_spec = string(app.SelectModelDropDown.Value);
  196. cfg.fit_explanatory_model = app.FitExplanatoryModelCheckBox.Value;
  197. cfg.bootstrap = app.BootCheckBox.Value;
  198. cfg.jackknife = 0;
  199. cfg.permutation = app.PermCheckBox.Value;
  200. cfg.optimize_hyperparams = app.OptimizeHyperparametersCheckBox.Value;
  201. cfg.cross_validation = app.RunCrossValidationCheckBox.Value;
  202. cfg.out_dir = string(app.OutDirText.Value);
  203. cfg.stacked_model = app.EnableModelStackingCheckBox.Value;
  204. % Get default cfg
  205. cfg = get_default_model_cfg(cfg);
  206. %%%%%% Update defaults with user choices
  207. %%%% General analysis params
  208. % Data thresholds
  209. cfg.min_obs = app.MinObs.Value;
  210. cfg.freq_thresh = app.MinFreq.Value;
  211. % Standardization
  212. if app.StandardizeXCheckBox.Value == 1 && app.StandardizeYCheckBox.Value == 1
  213. cfg.standardize = 3;
  214. elseif app.StandardizeYCheckBox.Value == 1 && app.StandardizeXCheckBox.Value == 0
  215. cfg.standardize = 2;
  216. elseif app.StandardizeXCheckBox.Value == 1 && app.StandardizeYCheckBox.Value == 0
  217. cfg.standardize = 1;
  218. else
  219. cfg.standardize = 0;
  220. end
  221. % DTLVC
  222. cfg.dtlvc = app.ApplyDTLVCCheckBox.Value;
  223. % Hyperparameter optimization
  224. cfg.hp_opt.cv_type = string(app.HpOptCvType.Value);
  225. cfg.hp_opt.folds = app.HpOptFolds.Value;
  226. cfg.hp_opt.repeats = app.HpOptRepeats.Value;
  227. % Statistical testing
  228. cfg.boot.n_boot = app.BootIter.Value;
  229. cfg.perm.n_perm = app.PermIter.Value;
  230. if app.UncPThresh.Value ~= 0
  231. cfg.unc_thresh = app.UncPThresh.Value;
  232. else
  233. cfg.unc_thresh = 0.001;
  234. end
  235. if app.FDRThresh.Value ~= 0
  236. cfg.fdr_thresh = app.FDRThresh.Value;
  237. else
  238. cfg.fdr_thresh = 0.05;
  239. end
  240. if app.FweThresh.Value ~= 0
  241. cfg.fwe_thresh = app.FweThresh.Value;
  242. else
  243. cfg.fwe_thresh = 0.05;
  244. end
  245. cfg.perm.coeff_p = app.PermVoxPValsCheckBox.Value;
  246. if cfg.perm.coeff_p == 1
  247. cfg.perm.coeff_fdr = 1;
  248. cfg.perm.coeff_fwe = 1;
  249. end
  250. cfg.perm.coeff_cfwe = app.PermApplycFWECheckBox.Value;
  251. % Cross-validation
  252. if app.EnableModelStackingCheckBox == 1
  253. cfg.cv.stacked_model = 1;
  254. else
  255. cfg.cv.stacked_model = 0;
  256. end
  257. cfg.cv.cv_type = char(app.CVType.Value);
  258. cfg.cv.folds = app.OuterFolds.Value;
  259. cfg.cv.repeats = app.OuterRepeats.Value;
  260. cfg.cv.permutation = app.CVPermCheckBox.Value;
  261. cfg.cv.n_perm = app.CVPermIter.Value;
  262. % Parallel processing
  263. cfg.parallel = app.UseParallelProcessingRecommendedCheckBox.Value;
  264. % Image output
  265. cfg.perm.write_perm_images = app.WritePermutationImagesCheckBox.Value;
  266. cfg.boot.write_boot_images = app.WriteBootstrapImagesCheckBox.Value;
  267. cfg.jack.write_jack_images = 0;
  268. % Format and load behavioral and image data
  269. beh_csv = readtable(string(app.CSVTtext.Value), 'NumHeaderLines', 0, 'Delimiter', ',');
  270. beh_col = app.SelectOutcomeVariableYListBox.Value;
  271. id_col = "study_id";
  272. % Get data and put into cfg as long as predictors are NIFTI lesions
  273. if app.NIFTIButton.Value == 1
  274. data_dir = app.ImDirText.Value;
  275. if app.LesionButton.Value == 1
  276. if app.IdPathFlag.Value == 0
  277. cfg = get_and_format_lesion_data(beh_csv, id_col, beh_col, app.RegistryFlag.Value, data_dir, cfg);
  278. else
  279. cfg = get_and_format_lesion_data2(beh_csv, id_col, beh_col, cfg);
  280. end
  281. else
  282. if app.IdPathFlag.Value == 0
  283. cfg = get_and_format_nifti_data(beh_csv, id_col, beh_col, app.RegistryFlag.Value, data_dir, cfg);
  284. else
  285. cfg = get_and_format_nifti_data2(beh_csv, id_col, beh_col, cfg);
  286. end
  287. end
  288. elseif app.MatrixButton.Value == 1
  289. data_dir = app.ImDirText.Value;
  290. if app.IdPathFlag.Value == 0
  291. cfg = get_and_format_matrix_data(beh_csv, id_col, beh_col, app.RegistryFlag.Value, data_dir, cfg);
  292. else
  293. cfg = get_and_format_matrix_data2(beh_csv, id_col, beh_col, cfg);
  294. end
  295. elseif app.ArrayButton.Value == 1
  296. data_dir = app.ImDirText.Value;
  297. if app.IdPathFlag.Value == 0
  298. cfg = get_and_format_array_data(beh_csv, id_col, beh_col, app.RegistryFlag.Value, data_dir, cfg);
  299. else
  300. cfg = get_and_format_array_data2(beh_csv, id_col, beh_col, cfg);
  301. end
  302. end
  303. % Set up confounds for nuisance regression if indicated
  304. disp('Nuisance Regressors: ');
  305. cfg.confounds = [];
  306. for i = 1:length(app.SelectNuisanceRegressorsListBox.Value)
  307. disp(app.SelectNuisanceRegressorsListBox.Value{i});
  308. cfg.confounds(:,i) = beh_csv.(app.SelectNuisanceRegressorsListBox.Value{i});
  309. cfg.confound_names{i} = app.SelectNuisanceRegressorsListBox.Value{i};
  310. end
  311. if ~isempty(cfg.confounds)
  312. cfg.confounds = cfg.confounds(cfg.include_inds,:);
  313. if ~isempty(find(isnan(cfg.confounds)))
  314. disp('Checking nuisance regressors...')
  315. disp('Some subjects have missing data for nuisance regressors; removing subjects with missing data...');
  316. [cfg.confounds, cfg.missing_inds] = rmmissing(cfg.confounds, 1);
  317. cfg.X = cfg.X(cfg.missing_inds == 0, :);
  318. cfg.Y = cfg.Y(cfg.missing_inds == 0, :);
  319. if isfield(cfg, 'lvol')
  320. cfg.lvol = cfg.lvol(cfg.missing_inds == 0);
  321. end
  322. disp([num2str(numel(find(cfg.missing_inds==1))) ' subjects were removed due to missing data for nuisance regressors.']);
  323. disp('Removed subjects will have values of 1 in model_results.cfg.missing_inds');
  324. end
  325. end
  326. % Set up lesion volume confound if indicated
  327. if app.LesionButton.Value == 1
  328. if app.RegressLesionVolumefromYCheckBox.Value == 1 || app.RegressLesionVolumefromXandYCheckBox.Value == 1
  329. disp('Lesion volume')
  330. cfg.confounds = [cfg.confounds, zscore(cfg.lvol)];
  331. if app.RegressLesionVolumefromXandYCheckBox.Value == 1
  332. cfg.confound_opt = 'regress_both';
  333. end
  334. end
  335. else
  336. cfg.confounds = cfg.confounds;
  337. end
  338. % Do stratification on outcome if indicated
  339. if app.StratifyTrainTestSplitsonYCheckBox.Value == 1
  340. cfg.strat_var = cfg.Y;
  341. else
  342. cfg.strat_var = [];
  343. end
  344. % Set misclassification costs if relevant
  345. if cfg.cat_Y==1
  346. cfg.cost(1,2) = app.MisClasCostG1.Value;
  347. cfg.cost(2,1) = app.MisClasCostG2.Value;
  348. end
  349. % Set grouping flag for T-test
  350. if strcmp(cfg.model_spec, 'ttest')
  351. if app.CatYCheckBox.Value == 1
  352. cfg.group_var = 'Y';
  353. cfg.cat_Y = 1;
  354. else
  355. cfg.group_var = 'X';
  356. cfg.cat_Y = 0;
  357. end
  358. end
  359. % Train and evaluate model
  360. model_results = fit_and_evaluate_model(cfg);
  361. % Write out images if indicated
  362. if app.NIFTIButton.Value == 1
  363. write_model_weight_maps(model_results);
  364. elseif app.MatrixButton.Value == 1
  365. write_model_weights_connectome(model_results);
  366. end
  367. % Print main results to command window and save to text file
  368. cd(cfg.out_dir);
  369. % Print results for regression models
  370. if ~contains(cfg.model_spec, ["municorr", "bmunz", "ttest", "munilr", "muniolsr", "munimnr", "prop_sub"])
  371. if cfg.fit_explanatory_model == 1 && cfg.cat_Y == 0
  372. % Print model R-squared
  373. diary('explanatory_model_results.txt')
  374. disp('--------Model Result Summary-------');
  375. disp('-----Inferential Model Results-----');
  376. disp('-----------------------------------');
  377. disp('Warning - This R-squared statistic is from the model fit to the full dataset and may reflect overfitting.');
  378. disp('Interpret this result with extreme caution. It is recommended to use cross-validtion statistics for interpreting model performance.');
  379. disp(['Model R-squared: ' num2str(model_results.r2)]);
  380. % Print additional statistics depending on analysis settings
  381. if cfg.bootstrap == 1 && cfg.boot.get_cis == 1
  382. disp([num2str(100-(10*cfg.boot.ci_alpha_thresh_model)) '% Bootstrap CIs on R-squared:']);
  383. disp(['Lower: ' num2str(model_results.boot.r2_ci(1))]);
  384. disp(['Upper: ' num2str(model_results.boot.r2_ci(2))]);
  385. end
  386. if cfg.permutation == 1
  387. disp('----- Permutation Test Results -----')
  388. disp(['Permutation Test: p=' num2str(model_results.perm.model_pval)]);
  389. end
  390. if cfg.cross_validation == 1
  391. load(fullfile(cfg.out_dir, 'cv_results.mat'));
  392. disp('------ Cross-validation Test Results -------');
  393. disp(['Cross-validation Correlation: r=' num2str(cv_results.all.corr) ', p=' num2str(cv_results.all.corr_pval)]);
  394. if isfield(cv_results, 'perm_pval')
  395. disp('-----Predictive Model Results-----');
  396. disp(['Cross-Validation Permutation Test: p= ' num2str(cv_results.perm_pval)]);
  397. disp(['Mean cross-validation R-squared: ' num2str(mean(cv_results.avg.r2_ss(:)))]);
  398. end
  399. end
  400. diary('off');
  401. elseif cfg.fit_explanatory_model == 0 && cfg.cat_Y == 0 && cfg.cross_validation == 1
  402. load(fullfile(cfg.out_dir, 'cv_results.mat'));
  403. if isfield(cv_results, 'perm_pval')
  404. disp('-----Predictive Model Results-----');
  405. disp(['Cross-Validation Permutation Test: p= ' num2str(cv_results.perm_pval)]);
  406. disp(['Mean cross-validation R-squared: ' num2str(mean(cv_results.avg.r2_ss(:)))]);
  407. else
  408. disp('-----Predictive Model Results-----');
  409. disp(['Mean cross-validation R-squared: ' num2str(mean(cv_results.avg.r2_ss(:)))]);
  410. end
  411. end
  412. % Print results for classification models
  413. if cfg.fit_explanatory_model == 1 && cfg.cat_Y == 1
  414. % Print model R-squared
  415. diary('explanatory_model_results.txt')
  416. disp('--------Model Result Summary-------');
  417. disp('-----Inferential Model Results-----');
  418. disp('-----------------------------------');
  419. disp('Warning - These accuracy and ROC statistics are from the model fit to the full dataset and may reflect overfitting.');
  420. disp('Interpret these results with extreme caution. It is recommended to use cross-validtion statistics for interpreting model performance.');
  421. disp(['Model Accuracy (Group -1): ' num2str(model_results.classrate(1))]);
  422. disp(['Model Accuracy (Group 1): ' num2str(model_results.classrate(2))]);
  423. disp(['Model Accuracy (Overall): ' num2str(model_results.classrate(3))]);
  424. disp(['Model Area Under ROC Curve: ' num2str(model_results.roc_auc)]);
  425. % Print additional statistics depending on analysis settings
  426. if cfg.bootstrap == 1 && cfg.boot.get_cis == 1
  427. disp([num2str(100-(10*cfg.boot.ci_alpha_thresh_model)) '% Bootstrap CIs on Group -1 Classification Rate:']);
  428. disp(['Lower: ' num2str(model_results.boot.classrate_ci(1,1))]);
  429. disp(['Upper: ' num2str(model_results.boot.classrate_ci(2,1))]);
  430. disp([num2str(100-(10*cfg.boot.ci_alpha_thresh_model)) '% Bootstrap CIs on Group 1 Classification Rate:']);
  431. disp(['Lower: ' num2str(model_results.boot.classrate_ci(1,2))]);
  432. disp(['Upper: ' num2str(model_results.boot.classrate_ci(2,2))]);
  433. disp([num2str(100-(10*cfg.boot.ci_alpha_thresh_model)) '% Bootstrap CIs on Overall Classification Rate:']);
  434. disp(['Lower: ' num2str(model_results.boot.classrate_ci(1,3))]);
  435. disp(['Upper: ' num2str(model_results.boot.classrate_ci(2,3))]);
  436. disp([num2str(100-(10*cfg.boot.ci_alpha_thresh_model)) '% Bootstrap CIs on ROC Area Under Curve:']);
  437. disp(['Lower: ' num2str(model_results.boot.roc_auc_ci(1,1))]);
  438. disp(['Upper: ' num2str(model_results.boot.roc_auc_ci(2,1))]);
  439. end
  440. if cfg.permutation == 1
  441. disp ('------ Permutation Test Results --------')
  442. disp(['Permutation Test (AUC): p=' num2str(model_results.perm.model_pval)]);
  443. end
  444. if cfg.cross_validation == 1
  445. disp('------ Cross-Validation Test Results -------')
  446. load(fullfile(cfg.out_dir, 'cv_results.mat'));
  447. disp(['Cross-validation Fisher Exact Test: stat=' num2str(cv_results.all.fisher_stat.OddsRatio) ', p=' num2str(cv_results.all.fisher_pval)]);
  448. if isfield(cv_results, 'perm_pval')
  449. disp('-----Predictive Model Results-----');
  450. disp(['Cross-Validation Permutation Test: p= ' num2str(cv_results.perm_pval)]);
  451. disp(['Mean Cross-Validation Area Under ROC Curve: ' num2str(mean(cv_results.avg.roc_auc(:)))]);
  452. else
  453. disp('-----Predictive Model Results-----');
  454. disp(['Mean Cross-Validation Area Under ROC Curve: ' num2str(mean(cv_results.avg.roc_auc(:)))]);
  455. end
  456. end
  457. diary('off');
  458. elseif cfg.fit_explanatory_model == 0 && cfg.cat_Y == 1 && cfg.cross_validation == 1
  459. load(fullfile(cfg.out_dir, 'cv_results.mat'));
  460. if isfield(cv_results, 'perm_pval')
  461. disp('-----Predictive Model Results-----');
  462. disp(['Cross-Validation Permutation Test: p= ' num2str(cv_results.perm_pval)]);
  463. disp(['Mean Cross-Validation Area Under ROC Curve: ' num2str(mean(cv_results.avg.roc_auc(:)))]);
  464. else
  465. disp('-----Predictive Model Results-----');
  466. disp(['Mean Cross-Validation Area Under ROC Curve: ' num2str(mean(cv_results.avg.roc_auc(:)))]);
  467. end
  468. end
  469. end
  470. end
  471. % Button pushed function: SelectOutputDirectoryButton
  472. function SelectOutputDirectoryButtonPushed(app, event)
  473. [out_dir] = uigetdir(pwd, 'Select directory to save results');
  474. if out_dir == 0
  475. error('No directory selected; please try again');
  476. else
  477. app.OutDirText.Value = out_dir;
  478. end
  479. end
  480. % Value changed function: HpOptCvType
  481. function HpOptCvTypeValueChanged(app, event)
  482. value = app.HpOptCvType.Value;
  483. if strcmp(string(value), 'LOOCV')
  484. app.HpOptFolds.Enable = 'off';
  485. app.HpOptFolds.Value = 'N/A';
  486. app.HpOptRepeats.Value = 1;
  487. else
  488. app.HpOptFolds.Enable = 'on';
  489. app.HpOptFolds.Value = 5;
  490. app.HpOptRepeats.Value = 5;
  491. end
  492. end
  493. % Value changed function: StratifyTrainTestSplitsonYCheckBox
  494. function StratifyTrainTestSplitsonYCheckBoxValueChanged(app, event)
  495. end
  496. % Value changed function: PermCheckBox
  497. function PermCheckBoxValueChanged(app, event)
  498. value = app.PermCheckBox.Value;
  499. if value == 0
  500. app.PermIter.Enable = 'off';
  501. app.PermIter.Value = 0;
  502. app.PermApplycFWECheckBox.Enable = 'off';
  503. app.PermApplycFWECheckBox.Value = 0;
  504. app.WritePermutationImagesCheckBox.Enable = 'off';
  505. app.WritePermutationImagesCheckBox.Value = 0;
  506. if app.BootCheckBox.Value == 0
  507. app.FweThresh.Value = 0.05;
  508. app.FweThresh.Enable = 'off';
  509. app.FDRThresh.Value = 0.05;
  510. app.FDRThresh.Enable = 'off';
  511. app.UncPThresh.Value = 0.001;
  512. app.UncPThresh.Enable = 'off';
  513. else
  514. app.FweThresh.Value = 0.05;
  515. app.FweThresh.Enable = 'on';
  516. app.FDRThresh.Value = 0.05;
  517. app.FDRThresh.Enable = 'on';
  518. app.UncPThresh.Value = 0.001;
  519. app.UncPThresh.Enable = 'on';
  520. end
  521. else
  522. app.PermIter.Enable = 'on';
  523. app.PermIter.Value = 1000;
  524. app.PermApplycFWECheckBox.Enable = 'on';
  525. app.PermApplycFWECheckBox.Value = 1;
  526. app.FweThresh.Value = 0.05;
  527. app.FweThresh.Enable = 'on';
  528. app.FDRThresh.Value = 0.05;
  529. app.FDRThresh.Enable = 'on';
  530. app.UncPThresh.Value = 0.001;
  531. app.UncPThresh.Enable = 'on';
  532. app.WritePermutationImagesCheckBox.Enable = 'on';
  533. app.WritePermutationImagesCheckBox.Value = 1;
  534. end
  535. end
  536. % Value changed function: BootCheckBox
  537. function BootCheckBoxValueChanged(app, event)
  538. value = app.BootCheckBox.Value;
  539. if value == 0
  540. app.BootIter.Enable = 'off';
  541. app.BootIter.Value = 0;
  542. app.BootCIsCheckBox.Enable = "off";
  543. app.BootCIsCheckBox.Value = 0;
  544. app.ConfIntWidth.Value = 0;
  545. app.ConfIntWidth.Enable = 'off';
  546. app.WriteBootstrapImagesCheckBox.Value = 0;
  547. app.WriteBootstrapImagesCheckBox.Enable = 0;
  548. if app.PermCheckBox.Value == 0
  549. app.WritePermutationImagesCheckBox.Value = 0;
  550. app.WritePermutationImagesCheckBox.Enable = 0;
  551. app.FweThresh.Value = 0.05;
  552. app.FweThresh.Enable = 'off';
  553. app.FDRThresh.Value = 0.05;
  554. app.FDRThresh.Enable = 'off';
  555. app.UncPThresh.Value = 0.001;
  556. app.UncPThresh.Enable = 'off';
  557. else
  558. app.WritePermutationImagesCheckBox.Value = 1;
  559. app.WritePermutationImagesCheckBox.Enable = 1;
  560. app.FweThresh.Value = 0.05;
  561. app.FweThresh.Enable = 'on';
  562. app.FDRThresh.Value = 0.05;
  563. app.FDRThresh.Enable = 'on';
  564. app.UncPThresh.Value = 0.001;
  565. app.UncPThresh.Enable = 'on';
  566. end
  567. else
  568. app.WriteBootstrapImagesCheckBox.Value = 1;
  569. app.WriteBootstrapImagesCheckBox.Enable = 1;
  570. app.BootIter.Enable = 'on';
  571. app.BootIter.Value = 1000;
  572. app.BootCIsCheckBox.Enable = 'on';
  573. app.BootCIsCheckBox.Value = 1;
  574. app.ConfIntWidth.Value = 95;
  575. app.ConfIntWidth.Enable = 'on';
  576. app.FweThresh.Value = 0.05;
  577. app.FweThresh.Enable = 'on';
  578. app.FDRThresh.Value = 0.05;
  579. app.FDRThresh.Enable = 'on';
  580. app.UncPThresh.Value = 0.001;
  581. app.UncPThresh.Enable = 'on';
  582. end
  583. end
  584. % Selection changed function: PredictorTypeButtonGroup
  585. function PredictorTypeButtonGroupSelectionChanged(app, event)
  586. if app.LesionButton.Value == 1 && ~contains(app.SelectModelDropDown.Value, ["ttest", "bmunz", "municorr", "munilr", "munimnr", "muniolsr", "prop_sub"])
  587. app.ApplyDTLVCCheckBox.Enable = "on";
  588. app.ApplyDTLVCCheckBox.Value = 0;
  589. app.RegressLesionVolumefromYCheckBox.Enable = "on";
  590. app.RegressLesionVolumefromYCheckBox.Value = 0;
  591. app.RegressLesionVolumefromXandYCheckBox.Enable = "on";
  592. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  593. app.MinFreq.Value = 4;
  594. app.MinObs.Value = 1;
  595. elseif app.LesionButton.Value == 1 && contains(app.SelectModelDropDown.Value, ["ttest", "bmunz", "municorr", "munilr", "munimnr", "muniolsr"])
  596. app.ApplyDTLVCCheckBox.Enable = "on";
  597. app.ApplyDTLVCCheckBox.Value = 0;
  598. app.RegressLesionVolumefromYCheckBox.Enable = "on";
  599. app.RegressLesionVolumefromYCheckBox.Value = 1;
  600. app.RegressLesionVolumefromXandYCheckBox.Enable = "off";
  601. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  602. app.MinFreq.Value = 4;
  603. app.MinObs.Value = 1;
  604. else
  605. app.ApplyDTLVCCheckBox.Value = 0;
  606. app.ApplyDTLVCCheckBox.Enable = 'off';
  607. app.RegressLesionVolumefromYCheckBox.Enable = "off";
  608. app.RegressLesionVolumefromYCheckBox.Value = 0;
  609. app.RegressLesionVolumefromXandYCheckBox.Enable = "on";
  610. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  611. app.MinFreq.Value = 1;
  612. app.MinObs.Value = 0;
  613. end
  614. end
  615. % Value changed function: RunCrossValidationCheckBox
  616. function RunCrossValidationCheckBoxValueChanged(app, event)
  617. value = app.RunCrossValidationCheckBox.Value;
  618. if value == 1
  619. app.CVType.Enable = "on";
  620. app.CVType.Value = "KFold";
  621. app.CVPermIter.Enable = "on";
  622. app.CVPermIter.Value = 20;
  623. app.OuterFolds.Enable = "on";
  624. app.OuterFolds.Value = 5;
  625. app.OuterRepeats.Enable = "on";
  626. app.OuterRepeats.Value = 5;
  627. app.CVPermCheckBox.Enable = "on";
  628. app.CVPermIter.Enable = "on";
  629. else
  630. app.CVType.Enable = "off";
  631. app.CVType.Value = "KFold";
  632. app.CVPermIter.Enable = "off";
  633. app.CVPermIter.Value = 0;
  634. app.OuterFolds.Enable = "off";
  635. app.OuterFolds.Value = 0;
  636. app.OuterRepeats.Enable = "off";
  637. app.OuterRepeats.Value = 0;
  638. app.CVPermCheckBox.Enable = "off";
  639. app.CVPermIter.Enable = "off";
  640. end
  641. end
  642. % Value changed function: SelectModelDropDown
  643. function SelectModelDropDownValueChanged(app, event)
  644. value = app.SelectModelDropDown.Value;
  645. if ~contains(value, ["logistic", "pls_da", "svc", "censemble"])
  646. app.MisClasCostG1.Enable = 0;
  647. app.MisClasCostG2.Enable = 0;
  648. else
  649. app.MisClasCostG1.Enable = 1;
  650. app.MisClasCostG2.Enable = 1;
  651. end
  652. if app.LesionButton.Value == 1
  653. if contains(value, ["logistic", "pls_da", "svc", "censemble"])
  654. app.RegressLesionVolumefromYCheckBox.Text = 'Regress Lesion Volume from X';
  655. app.RegressLesionVolumefromXandYCheckBox.Visible = 0;
  656. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  657. app.RegressLesionVolumefromXandYCheckBox.Enable = 0;
  658. elseif contains(value, ["muniolsr", "munilr", "munimnr", "municorr"])
  659. app.RegressLesionVolumefromYCheckBox.Text = 'Include Lesion Volume as Covariate';
  660. app.RegressLesionVolumefromXandYCheckBox.Visible = 0;
  661. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  662. app.RegressLesionVolumefromXandYCheckBox.Enable = 0;
  663. else
  664. app.RegressLesionVolumefromYCheckBox.Text = 'Regress Lesion Volume from Y';
  665. app.RegressLesionVolumefromXandYCheckBox.Visible = 1;
  666. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  667. app.RegressLesionVolumefromXandYCheckBox.Enable = 1;
  668. if ~contains(value, ["ttest", "bmunz", "prop_sub"])
  669. app.RegressLesionVolumefromXandYCheckBox.Text = 'Regress Lesion Volume from X & Y';
  670. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  671. app.RegressLesionVolumefromXandYCheckBox.Enable = 1;
  672. else
  673. app.RegressLesionVolumefromXandYCheckBox.Visible = 0;
  674. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  675. app.RegressLesionVolumefromXandYCheckBox.Enable = 0;
  676. end
  677. end
  678. else
  679. app.RegressLesionVolumefromXandYCheckBox.Visible = 0;
  680. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  681. app.RegressLesionVolumefromXandYCheckBox.Enable = 0;
  682. app.RegressLesionVolumefromYCheckBox.Value = 0;
  683. app.RegressLesionVolumefromYCheckBox.Enable = 0;
  684. app.RegressLesionVolumefromYCheckBox.Visible = 0;
  685. end
  686. if contains(value, ["municorr", "ttest", "bmunz", "munilr", "muniolsr", "munimnr", ...
  687. 'prop_sub'])
  688. % Correlation options
  689. if strcmp(value, 'municorr')
  690. app.RankCorCheckBox.Visible = 1;
  691. app.RankCorCheckBox.Enable = 1;
  692. app.RankCorCheckBox.Value = 0;
  693. else
  694. app.RankCorCheckBox.Visible = 0;
  695. app.RankCorCheckBox.Enable = 0;
  696. app.RankCorCheckBox.Value = 0;
  697. end
  698. % Bootstrap options
  699. app.BootCheckBox.Enable = 0;
  700. app.BootCIsCheckBox.Enable = 0;
  701. app.BootstrapLabel.Enable = 0;
  702. app.BootCIsCheckBox.Enable = 0;
  703. app.BootIter.Enable = 0;
  704. app.BootIter.Value = 0;
  705. app.BootCheckBox.Value = 0;
  706. app.BootCIsCheckBox.Value = 0;
  707. app.ConfIntWidth.Enable = 0;
  708. app.WriteBootstrapImagesCheckBox.Enable = 0;
  709. app.WriteBootstrapImagesCheckBox.Value = 0;
  710. % Hyperparameter optimization options
  711. app.HpOptRepeats.Value = 0;
  712. app.HpOptFolds.Value = 0;
  713. app.OptimizeHyperparametersCheckBox.Value = 0;
  714. app.OptimizeHyperparametersCheckBox.Enable = 0;
  715. app.HpOptCvType.Enable = 0;
  716. app.HpOptFolds.Enable = 0;
  717. app.HpOptRepeats.Enable = 0;
  718. % Permutation testing options
  719. app.PermCheckBox.Value = 1;
  720. app.PermCheckBox.Enable = 1;
  721. app.PermApplycFWECheckBox.Value = 1;
  722. app.PermApplycFWECheckBox.Enable = 1;
  723. app.PermIter.Value = 10000;
  724. app.PermIter.Enable = 1;
  725. app.FweThresh.Value = 0.05;
  726. app.FweThresh.Enable = 1;
  727. app.WritePermutationImagesCheckBox.Value = 1;
  728. app.WritePermutationImagesCheckBox.Enable = 1;
  729. if ~strcmp(value, 'prop_sub')
  730. app.PermVoxPValsCheckBox.Value = 0;
  731. app.PermVoxPValsCheckBox.Enable = 1;
  732. app.StandardizeXCheckBox.Enable = 1;
  733. app.StandardizeXCheckBox.Value = 0;
  734. app.StandardizeYCheckBox.Enable = 1;
  735. app.StandardizeYCheckBox.Value = 0;
  736. app.FDRThresh.Value = 0.05;
  737. app.FDRThresh.Enable = 1;
  738. app.UncPThresh.Value = .001;
  739. app.UncPThresh.Enable = 1;
  740. app.ApplyDTLVCCheckBox.Enable = 1;
  741. app.ApplyDTLVCCheckBox.Value = 0;
  742. app.MinFreq.Value = 10;
  743. app.RegressLesionVolumefromYCheckBox.Enable = 1;
  744. app.RegressLesionVolumefromYCheckBox.Value = 0;
  745. app.SelectNuisanceRegressorsListBox.Enable = 1;
  746. app.NuisanceRegressorCheckBox.Enable = 1;
  747. else
  748. app.PermVoxPValsCheckBox.Value = 0;
  749. app.PermVoxPValsCheckBox.Enable = 0;
  750. app.StandardizeXCheckBox.Enable = 0;
  751. app.StandardizeXCheckBox.Value = 0;
  752. app.StandardizeYCheckBox.Enable = 0;
  753. app.StandardizeYCheckBox.Value = 0;
  754. app.FDRThresh.Value = 0;
  755. app.FDRThresh.Enable = 0;
  756. app.FweThresh.Value = 0;
  757. app.FweThresh.Enable = 0;
  758. app.UncPThresh.Value = 0;
  759. app.UncPThresh.Enable = 0;
  760. app.ApplyDTLVCCheckBox.Enable = 0;
  761. app.ApplyDTLVCCheckBox.Value = 0;
  762. app.MinFreq.Value = 1;
  763. app.RegressLesionVolumefromYCheckBox.Enable = 0;
  764. app.RegressLesionVolumefromYCheckBox.Value = 0;
  765. app.SelectNuisanceRegressorsListBox.Enable = 0;
  766. app.SelectNuisanceRegressorsListBox.Value = {};
  767. app.NuisanceRegressorCheckBox.Value = 0;
  768. app.NuisanceRegressorCheckBox.Enable = 0;
  769. end
  770. % Cross-validation options
  771. app.CVType.Enable = 0;
  772. app.CVPermPanel.Enable = 0;
  773. app.EnableModelStackingCheckBox.Enable = 0;
  774. app.StratifyTrainTestSplitsonYCheckBox.Enable = 0;
  775. app.RunCrossValidationCheckBox.Enable = 0;
  776. app.RunCrossValidationCheckBox.Value = 0;
  777. app.CVPermIter.Value = 0;
  778. app.CVPermIter.Enable = 0;
  779. app.EnableModelStackingCheckBox.Value = 0;
  780. app.OuterFolds.Value = 0;
  781. app.OuterFolds.Enable = 0;
  782. app.OuterRepeats.Value = 0;
  783. app.OuterRepeats.Enable = 0;
  784. % General options
  785. app.ApplyDTLVCCheckBox.Value = 0;
  786. % T-test options
  787. if strcmp(value, 'ttest')
  788. app.CatYCheckBox.Visible = 1;
  789. app.CatYCheckBox.Enable = 1;
  790. app.CatYCheckBox.Value = 1;
  791. else
  792. app.CatYCheckBox.Visible = 0;
  793. app.CatYCheckBox.Enable = 0;
  794. app.CatYCheckBox.Value = 0;
  795. end
  796. else
  797. % Bootstrap options
  798. app.BootCheckBox.Enable = 1;
  799. app.BootCIsCheckBox.Enable = 1;
  800. app.BootstrapLabel.Enable = 1;
  801. app.BootCIsCheckBox.Enable = 1;
  802. app.BootIter.Enable = 1;
  803. app.BootIter.Value = 1000;
  804. app.BootCheckBox.Value = 1;
  805. app.BootCIsCheckBox.Value = 1;
  806. app.ConfIntWidth.Enable = 1;
  807. app.WriteBootstrapImagesCheckBox.Enable = 1;
  808. app.WriteBootstrapImagesCheckBox.Value = 1;
  809. % Hyperparameter optimization options
  810. app.HpOptRepeats.Value = 5;
  811. app.HpOptFolds.Value = 5;
  812. app.OptimizeHyperparametersCheckBox.Value = 1;
  813. app.OptimizeHyperparametersCheckBox.Enable = 1;
  814. app.HpOptCvType.Enable = 1;
  815. app.HpOptFolds.Enable = 1;
  816. app.HpOptRepeats.Enable = 1;
  817. % Permutation testing options
  818. app.PermCheckBox.Value = 0;
  819. app.PermCheckBox.Enable = 1;
  820. app.PermApplycFWECheckBox.Value = 0;
  821. app.PermApplycFWECheckBox.Enable = 1;
  822. app.PermIter.Value = 0;
  823. app.PermIter.Enable = 1;
  824. app.PermVoxPValsCheckBox.Value = 0;
  825. app.PermVoxPValsCheckBox.Enable = 1;
  826. app.WritePermutationImagesCheckBox.Value = 0;
  827. app.WritePermutationImagesCheckBox.Enable = 1;
  828. % Cross-validation options
  829. app.CVType.Enable = 1;
  830. app.CVPermPanel.Enable = 1;
  831. app.EnableModelStackingCheckBox.Enable = 1;
  832. app.StratifyTrainTestSplitsonYCheckBox.Enable = 1;
  833. app.RunCrossValidationCheckBox.Enable = 1;
  834. app.RunCrossValidationCheckBox.Value = 1;
  835. app.CVPermIter.Value = 50;
  836. app.CVPermIter.Enable = 1;
  837. app.OuterFolds.Enable = 1;
  838. app.OuterFolds.Value = 5;
  839. app.OuterRepeats.Enable = 1;
  840. app.OuterRepeats.Value = 5;
  841. app.EnableModelStackingCheckBox.Value = 1;
  842. % T-test options
  843. app.CatYCheckBox.Visible = 0;
  844. app.CatYCheckBox.Enable = 0;
  845. app.CatYCheckBox.Value = 0;
  846. % Other
  847. app.StandardizeXCheckBox.Enable = 1;
  848. app.StandardizeXCheckBox.Value = 0;
  849. app.StandardizeYCheckBox.Enable = 1;
  850. app.StandardizeYCheckBox.Value = 0;
  851. app.FDRThresh.Value = 0.05;
  852. app.FDRThresh.Enable = 1;
  853. app.FweThresh.Value = 0.05;
  854. app.FweThresh.Enable = 1;
  855. app.UncPThresh.Value = .001;
  856. app.UncPThresh.Enable = 1;
  857. app.ApplyDTLVCCheckBox.Enable = 1;
  858. app.ApplyDTLVCCheckBox.Value = 0;
  859. app.MinFreq.Value = 10;
  860. app.RegressLesionVolumefromYCheckBox.Enable = 1;
  861. app.SelectNuisanceRegressorsListBox.Enable = 1;
  862. app.NuisanceRegressorCheckBox.Enable = 1;
  863. app.RankCorCheckBox.Visible = 0;
  864. app.RankCorCheckBox.Enable = 0;
  865. app.RankCorCheckBox.Value = 0;
  866. end
  867. end
  868. % Value changed function: OptimizeHyperparametersCheckBox
  869. function OptimizeHyperparametersCheckBoxValueChanged(app, event)
  870. value = app.OptimizeHyperparametersCheckBox.Value;
  871. if value == 1
  872. app.HpOptCvType.Enable = "on";
  873. app.HpOptFolds.Enable = "on";
  874. app.HpOptRepeats.Enable = "on";
  875. elseif value == 0
  876. app.HpOptCvType.Enable = "off";
  877. app.HpOptFolds.Enable = "off";
  878. app.HpOptRepeats.Enable = "off";
  879. end
  880. end
  881. % Value changed function: EnableModelStackingCheckBox
  882. function EnableModelStackingCheckBoxValueChanged(app, event)
  883. end
  884. % Button down function: PredictorModalityButtonGroup
  885. function PredictorModalityButtonGroupButtonDown(app, event)
  886. end
  887. % Selection changed function: PredictorModalityButtonGroup
  888. function PredictorModalityButtonGroupSelectionChanged(app, event)
  889. if app.MatrixButton.Value == 1
  890. app.BrainMaskText.Enable = 1;
  891. app.BrainMaskText.Editable = 1;
  892. app.BrainMaskText.Placeholder = 'Parcellation table not selected (required to write .node files)';
  893. app.SelectBrainMaskButton.Text = 'Select Parcel Table';
  894. app.SelectBrainMaskButton.Enable = 1;
  895. elseif app.NIFTIButton.Value == 1
  896. app.BrainMaskText.Enable = 1;
  897. app.BrainMaskText.Editable = 1;
  898. app.BrainMaskText.Placeholder = 'No mask selected';
  899. app.SelectBrainMaskButton.Text = 'Select Brain Mask';
  900. app.SelectBrainMaskButton.Enable = 1;
  901. elseif app.ArrayButton.Value == 1
  902. app.BrainMaskText.Enable = 0;
  903. app.BrainMaskText.Editable = 0;
  904. app.BrainMaskText.Placeholder = 'N/A';
  905. app.SelectBrainMaskButton.Text = 'N/A';
  906. app.SelectBrainMaskButton.Enable = 0;
  907. elseif app.TableButton.Value == 1
  908. app.BrainMaskText.Enable = 0;
  909. app.BrainMaskText.Enable = 0;
  910. app.BrainMaskText.Editable = 0;
  911. app.BrainMaskText.Placeholder = 'N/A';
  912. app.SelectBrainMaskButton.Text = 'N/A';
  913. app.SelectBrainMaskButton.Enable = 0;
  914. end
  915. end
  916. % Callback function
  917. function PredictorTypeButtonGroupButtonDown(app, event)
  918. end
  919. % Value changed function: CVPermCheckBox
  920. function CVPermCheckBoxValueChanged(app, event)
  921. value = app.CVPermCheckBox.Value;
  922. if value == 1
  923. app.CVPermIter.Enable = 1;
  924. app.CVPermIter.Value = 50;
  925. else
  926. app.CVPermIter.Enable = 0;
  927. app.CVPermIter.Value = 0;
  928. end
  929. end
  930. % Value changed function: CVType
  931. function CVTypeValueChanged(app, event)
  932. value = app.CVType.Value;
  933. if value == 1
  934. app.OuterFolds.Enable = 1;
  935. app.OuterFolds.Value = 5;
  936. app.HpOptRepeats.Enable = 1;
  937. app.HpOptRepeats.Value = 20;
  938. else
  939. app.OuterFolds.Enable = 0;
  940. app.OuterFolds.Value = 0;
  941. app.HpOptRepeats.Enable = 0;
  942. app.HpOptRepeats.Value = 0;
  943. end
  944. end
  945. % Value changed function: NuisanceRegressorCheckBox
  946. function NuisanceRegressorCheckBoxValueChanged(app, event)
  947. value = app.NuisanceRegressorCheckBox.Value;
  948. if value == 1
  949. app.SelectNuisanceRegressorsListBox.Enable = 1;
  950. app.SelectNuisanceRegressorsListBox.Items = setdiff(app.SelectOutcomeVariableYListBox.Items, app.SelectOutcomeVariableYListBox.Value);
  951. else
  952. app.SelectNuisanceRegressorsListBox.Enable = 0;
  953. app.SelectNuisanceRegressorsListBox.Items = string();
  954. app.SelectNuisanceRegressorsListBox.Value = {};
  955. end
  956. end
  957. % Value changed function: CatYCheckBox
  958. function CatYCheckBoxValueChanged(app, event)
  959. value = app.CatYCheckBox.Value;
  960. if value == 1
  961. app.RegressLesionVolumefromYCheckBox.Text = 'Regress lesion volume from X';
  962. else
  963. app.RegressLesionVolumefromYCheckBox.Text = 'Regress lesion volume from Y';
  964. end
  965. end
  966. % Value changed function: RegressLesionVolumefromYCheckBox
  967. function RegressLesionVolumefromYCheckBoxValueChanged(app, event)
  968. value = app.RegressLesionVolumefromYCheckBox.Value;
  969. if value == 1
  970. app.ApplyDTLVCCheckBox.Value = 0;
  971. app.ApplyDTLVCCheckBox.Enable = 0;
  972. else
  973. app.ApplyDTLVCCheckBox.Enable = 1;
  974. end
  975. end
  976. % Value changed function: RegressLesionVolumefromXandYCheckBox
  977. function RegressLesionVolumefromXandYCheckBoxValueChanged(app, event)
  978. value = app.RegressLesionVolumefromXandYCheckBox.Value;
  979. if value == 1
  980. app.ApplyDTLVCCheckBox.Value = 0;
  981. app.ApplyDTLVCCheckBox.Enable = 0;
  982. else
  983. app.ApplyDTLVCCheckBox.Enable = 1;
  984. end
  985. end
  986. % Value changed function: ApplyDTLVCCheckBox
  987. function ApplyDTLVCCheckBoxValueChanged(app, event)
  988. value = app.ApplyDTLVCCheckBox.Value;
  989. if value == 1
  990. app.RegressLesionVolumefromYCheckBox.Value = 0;
  991. app.RegressLesionVolumefromYCheckBox.Enable = 0;
  992. app.RegressLesionVolumefromXandYCheckBox.Value = 0;
  993. app.RegressLesionVolumefromXandYCheckBox.Enable = 0;
  994. else
  995. app.RegressLesionVolumefromYCheckBox.Enable = 1;
  996. app.RegressLesionVolumefromXandYCheckBox.Enable = 1;
  997. end
  998. end
  999. % Value changed function: IdPathFlag
  1000. function IdPathFlagValueChanged(app, event)
  1001. value = app.IdPathFlag.Value;
  1002. if value == 1
  1003. app.SelectDataDirectoryButton.Enable = 0;
  1004. app.ImDirText.Enable = 0;
  1005. else
  1006. app.SelectDataDirectoryButton.Enable = 1;
  1007. app.ImDirText.Enable = 1;
  1008. end
  1009. end
  1010. end
  1011. % Component initialization
  1012. methods (Access = private)
  1013. % Create UIFigure and components
  1014. function createComponents(app)
  1015. % Create UIFigure and hide until all components are created
  1016. app.UIFigure = uifigure('Visible', 'off');
  1017. app.UIFigure.Position = [100 100 857 886];
  1018. app.UIFigure.Name = 'MATLAB App';
  1019. % Create GeneralModelingOptionsPanel
  1020. app.GeneralModelingOptionsPanel = uipanel(app.UIFigure);
  1021. app.GeneralModelingOptionsPanel.Title = 'General Modeling Options';
  1022. app.GeneralModelingOptionsPanel.BackgroundColor = [0.9412 0.9412 0.9412];
  1023. app.GeneralModelingOptionsPanel.FontWeight = 'bold';
  1024. app.GeneralModelingOptionsPanel.FontSize = 14;
  1025. app.GeneralModelingOptionsPanel.Position = [9 212 833 207];
  1026. % Create StandardizeYCheckBox
  1027. app.StandardizeYCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1028. app.StandardizeYCheckBox.Text = 'Standardize Y';
  1029. app.StandardizeYCheckBox.Position = [6 152 97 22];
  1030. % Create StandardizeXCheckBox
  1031. app.StandardizeXCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1032. app.StandardizeXCheckBox.Text = 'Standardize X';
  1033. app.StandardizeXCheckBox.Position = [108 152 97 22];
  1034. % Create ApplyDTLVCCheckBox
  1035. app.ApplyDTLVCCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1036. app.ApplyDTLVCCheckBox.ValueChangedFcn = createCallbackFcn(app, @ApplyDTLVCCheckBoxValueChanged, true);
  1037. app.ApplyDTLVCCheckBox.Text = 'Apply DTLVC';
  1038. app.ApplyDTLVCCheckBox.Position = [219 152 94 22];
  1039. % Create PermApplycFWECheckBox
  1040. app.PermApplycFWECheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1041. app.PermApplycFWECheckBox.Text = 'Apply cFWE';
  1042. app.PermApplycFWECheckBox.Position = [413 47 88 22];
  1043. % Create PermVoxPValsCheckBox
  1044. app.PermVoxPValsCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1045. app.PermVoxPValsCheckBox.Enable = 'off';
  1046. app.PermVoxPValsCheckBox.Visible = 'off';
  1047. app.PermVoxPValsCheckBox.Text = 'Voxel p-values';
  1048. app.PermVoxPValsCheckBox.Position = [413 19 100 22];
  1049. % Create BootCIsCheckBox
  1050. app.BootCIsCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1051. app.BootCIsCheckBox.Text = 'Bootstrap CIs';
  1052. app.BootCIsCheckBox.Position = [550 47 95 22];
  1053. app.BootCIsCheckBox.Value = true;
  1054. % Create ConfIntLabel
  1055. app.ConfIntLabel = uilabel(app.GeneralModelingOptionsPanel);
  1056. app.ConfIntLabel.HorizontalAlignment = 'right';
  1057. app.ConfIntLabel.Position = [544 22 73 22];
  1058. app.ConfIntLabel.Text = 'CI Width (%)';
  1059. % Create PermIter
  1060. app.PermIter = uieditfield(app.GeneralModelingOptionsPanel, 'numeric');
  1061. app.PermIter.Limits = [0 Inf];
  1062. app.PermIter.Position = [492 71 46 22];
  1063. app.PermIter.Value = 1000;
  1064. % Create ConfIntWidth
  1065. app.ConfIntWidth = uieditfield(app.GeneralModelingOptionsPanel, 'numeric');
  1066. app.ConfIntWidth.Limits = [0 Inf];
  1067. app.ConfIntWidth.Position = [625 22 37 22];
  1068. app.ConfIntWidth.Value = 95;
  1069. % Create StratifyTrainTestSplitsonYCheckBox
  1070. app.StratifyTrainTestSplitsonYCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1071. app.StratifyTrainTestSplitsonYCheckBox.ValueChangedFcn = createCallbackFcn(app, @StratifyTrainTestSplitsonYCheckBoxValueChanged, true);
  1072. app.StratifyTrainTestSplitsonYCheckBox.Text = 'Stratify Train/Test Splits on Y';
  1073. app.StratifyTrainTestSplitsonYCheckBox.Position = [322 152 175 22];
  1074. % Create PermCheckBox
  1075. app.PermCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1076. app.PermCheckBox.ValueChangedFcn = createCallbackFcn(app, @PermCheckBoxValueChanged, true);
  1077. app.PermCheckBox.Text = 'Run Permutations';
  1078. app.PermCheckBox.Position = [414 94 118 22];
  1079. app.PermCheckBox.Value = true;
  1080. % Create BootCheckBox
  1081. app.BootCheckBox = uicheckbox(app.GeneralModelingOptionsPanel);
  1082. app.BootCheckBox.ValueChangedFcn = createCallbackFcn(app, @BootCheckBoxValueChanged, true);
  1083. app.BootCheckBox.Text = 'Run Bootstraps';
  1084. app.BootCheckBox.Position = [550 94 105 22];
  1085. app.BootCheckBox.Value = true;
  1086. % Create PermutationsEditFieldLabel
  1087. app.PermutationsEditFieldLabel = uilabel(app.GeneralModelingOptionsPanel);
  1088. app.PermutationsEditFieldLabel.HorizontalAlignment = 'right';
  1089. app.PermutationsEditFieldLabel.Position = [408 71 76 22];
  1090. app.PermutationsEditFieldLabel.Text = 'Permutations';
  1091. % Create BootstrapLabel
  1092. app.BootstrapLabel = uilabel(app.GeneralModelingOptionsPanel);
  1093. app.BootstrapLabel.HorizontalAlignment = 'right';
  1094. app.BootstrapLabel.Position = [545 71 62 22];
  1095. app.BootstrapLabel.Text = 'Bootstraps';
  1096. % Create BootAnalysesPanel
  1097. app.BootAnalysesPanel = uipanel(app.GeneralModelingOptionsPanel);
  1098. app.BootAnalysesPanel.BorderType = 'none';
  1099. app.BootAnalysesPanel.Title = 'Bootstrap Analyses';
  1100. app.BootAnalysesPanel.FontWeight = 'bold';
  1101. app.BootAnalysesPanel.Position = [548 113 135 30];
  1102. % Create BootIter
  1103. app.BootIter = uieditfield(app.GeneralModelingOptionsPanel, 'numeric');
  1104. app.BootIter.Limits = [0 Inf];
  1105. app.BootIter.Position = [616 71 46 22];
  1106. app.BootIter.Value = 1000;
  1107. % Create CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel
  1108. app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel = uipanel(app.UIFigure);
  1109. app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel.Title = 'Cross-Validation Options (Nested if Hyper-Parameter Tuning Enabled)';
  1110. app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel.FontWeight = 'bold';
  1111. app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel.FontSize = 14;
  1112. app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel.Position = [10 9 544 174];
  1113. % Create CrossValidationSettingsPanel
  1114. app.CrossValidationSettingsPanel = uipanel(app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel);
  1115. app.CrossValidationSettingsPanel.BorderType = 'none';
  1116. app.CrossValidationSettingsPanel.Title = 'Cross-Validation Settings';
  1117. app.CrossValidationSettingsPanel.FontWeight = 'bold';
  1118. app.CrossValidationSettingsPanel.Position = [182 28 205 120];
  1119. % Create CVStrategyLabel_2
  1120. app.CVStrategyLabel_2 = uilabel(app.CrossValidationSettingsPanel);
  1121. app.CVStrategyLabel_2.Position = [11 70 70 22];
  1122. app.CVStrategyLabel_2.Text = 'CV Strategy';
  1123. % Create NumberofOuterFoldsLabel
  1124. app.NumberofOuterFoldsLabel = uilabel(app.CrossValidationSettingsPanel);
  1125. app.NumberofOuterFoldsLabel.Position = [11 41 127 22];
  1126. app.NumberofOuterFoldsLabel.Text = 'Number of Outer Folds';
  1127. % Create NumberofRepeatsLabel_2
  1128. app.NumberofRepeatsLabel_2 = uilabel(app.CrossValidationSettingsPanel);
  1129. app.NumberofRepeatsLabel_2.Position = [11 11 109 22];
  1130. app.NumberofRepeatsLabel_2.Text = 'Number of Repeats';
  1131. % Create CVType
  1132. app.CVType = uidropdown(app.CrossValidationSettingsPanel);
  1133. app.CVType.Items = {'KFold', 'LOOCV'};
  1134. app.CVType.Editable = 'on';
  1135. app.CVType.ValueChangedFcn = createCallbackFcn(app, @CVTypeValueChanged, true);
  1136. app.CVType.BackgroundColor = [1 1 1];
  1137. app.CVType.Position = [131 70 69 22];
  1138. app.CVType.Value = 'KFold';
  1139. % Create OuterFolds
  1140. app.OuterFolds = uieditfield(app.CrossValidationSettingsPanel, 'numeric');
  1141. app.OuterFolds.Position = [167 41 33 22];
  1142. app.OuterFolds.Value = 5;
  1143. % Create OuterRepeats
  1144. app.OuterRepeats = uieditfield(app.CrossValidationSettingsPanel, 'numeric');
  1145. app.OuterRepeats.Position = [167 10 33 22];
  1146. app.OuterRepeats.Value = 5;
  1147. % Create RunCrossValidationCheckBox
  1148. app.RunCrossValidationCheckBox = uicheckbox(app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel);
  1149. app.RunCrossValidationCheckBox.ValueChangedFcn = createCallbackFcn(app, @RunCrossValidationCheckBoxValueChanged, true);
  1150. app.RunCrossValidationCheckBox.Text = 'Run Cross-Validation';
  1151. app.RunCrossValidationCheckBox.Position = [7 124 135 22];
  1152. app.RunCrossValidationCheckBox.Value = true;
  1153. % Create CVPermPanel
  1154. app.CVPermPanel = uipanel(app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel);
  1155. app.CVPermPanel.BorderType = 'none';
  1156. app.CVPermPanel.Title = 'Permutation Testing';
  1157. app.CVPermPanel.FontWeight = 'bold';
  1158. app.CVPermPanel.Position = [395 89 143 59];
  1159. % Create CVPermCheckBox
  1160. app.CVPermCheckBox = uicheckbox(app.CVPermPanel);
  1161. app.CVPermCheckBox.ValueChangedFcn = createCallbackFcn(app, @CVPermCheckBoxValueChanged, true);
  1162. app.CVPermCheckBox.Text = 'Run Permutations';
  1163. app.CVPermCheckBox.Position = [9 9 118 22];
  1164. app.CVPermCheckBox.Value = true;
  1165. % Create PermutationsEditField_2Label
  1166. app.PermutationsEditField_2Label = uilabel(app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel);
  1167. app.PermutationsEditField_2Label.HorizontalAlignment = 'right';
  1168. app.PermutationsEditField_2Label.Position = [397 68 76 22];
  1169. app.PermutationsEditField_2Label.Text = 'Permutations';
  1170. % Create CVPermIter
  1171. app.CVPermIter = uieditfield(app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel, 'numeric');
  1172. app.CVPermIter.Position = [490 68 37 22];
  1173. app.CVPermIter.Value = 50;
  1174. % Create EnableModelStackingCheckBox
  1175. app.EnableModelStackingCheckBox = uicheckbox(app.CrossValidationOptionsNestedifHyperParameterTuningEnabledPanel);
  1176. app.EnableModelStackingCheckBox.ValueChangedFcn = createCallbackFcn(app, @EnableModelStackingCheckBoxValueChanged, true);
  1177. app.EnableModelStackingCheckBox.Text = 'Enable Model Stacking';
  1178. app.EnableModelStackingCheckBox.Position = [7 97 145 22];
  1179. app.EnableModelStackingCheckBox.Value = true;
  1180. % Create PredictorModalityButtonGroup
  1181. app.PredictorModalityButtonGroup = uibuttongroup(app.UIFigure);
  1182. app.PredictorModalityButtonGroup.SelectionChangedFcn = createCallbackFcn(app, @PredictorModalityButtonGroupSelectionChanged, true);
  1183. app.PredictorModalityButtonGroup.TitlePosition = 'centertop';
  1184. app.PredictorModalityButtonGroup.Title = 'Predictor Modality';
  1185. app.PredictorModalityButtonGroup.ButtonDownFcn = createCallbackFcn(app, @PredictorModalityButtonGroupButtonDown, true);
  1186. app.PredictorModalityButtonGroup.FontWeight = 'bold';
  1187. app.PredictorModalityButtonGroup.Position = [10 766 125 69];
  1188. % Create NIFTIButton
  1189. app.NIFTIButton = uiradiobutton(app.PredictorModalityButtonGroup);
  1190. app.NIFTIButton.Text = 'NIFTI';
  1191. app.NIFTIButton.Position = [11 23 52 22];
  1192. app.NIFTIButton.Value = true;
  1193. % Create MatrixButton
  1194. app.MatrixButton = uiradiobutton(app.PredictorModalityButtonGroup);
  1195. app.MatrixButton.Text = 'Matrix';
  1196. app.MatrixButton.Position = [65 22 65 22];
  1197. % Create ArrayButton
  1198. app.ArrayButton = uiradiobutton(app.PredictorModalityButtonGroup);
  1199. app.ArrayButton.Text = 'Array';
  1200. app.ArrayButton.Position = [11 1 65 22];
  1201. % Create SelectBrainMaskButton
  1202. app.SelectBrainMaskButton = uibutton(app.UIFigure, 'push');
  1203. app.SelectBrainMaskButton.ButtonPushedFcn = createCallbackFcn(app, @SelectBrainMaskButtonPushed, true);
  1204. app.SelectBrainMaskButton.BackgroundColor = [0.651 0.651 0.651];
  1205. app.SelectBrainMaskButton.Position = [163 687 135 23];
  1206. app.SelectBrainMaskButton.Text = 'Select Brain Mask';
  1207. % Create HyperParameterTuningPanel
  1208. app.HyperParameterTuningPanel = uipanel(app.UIFigure);
  1209. app.HyperParameterTuningPanel.BorderType = 'none';
  1210. app.HyperParameterTuningPanel.Title = 'Hyper-Parameter Tuning';
  1211. app.HyperParameterTuningPanel.FontWeight = 'bold';
  1212. app.HyperParameterTuningPanel.Position = [199 221 205 134];
  1213. % Create HpOptCVStrategyLabel
  1214. app.HpOptCVStrategyLabel = uilabel(app.HyperParameterTuningPanel);
  1215. app.HpOptCVStrategyLabel.Position = [11 65 70 22];
  1216. app.HpOptCVStrategyLabel.Text = 'CV Strategy';
  1217. % Create HpOptNumberofFoldsLabel
  1218. app.HpOptNumberofFoldsLabel = uilabel(app.HyperParameterTuningPanel);
  1219. app.HpOptNumberofFoldsLabel.Position = [11 36 94 22];
  1220. app.HpOptNumberofFoldsLabel.Text = 'Number of Folds';
  1221. % Create HpOptNumberofRepeatsLabel
  1222. app.HpOptNumberofRepeatsLabel = uilabel(app.HyperParameterTuningPanel);
  1223. app.HpOptNumberofRepeatsLabel.Position = [11 9 109 22];
  1224. app.HpOptNumberofRepeatsLabel.Text = 'Number of Repeats';
  1225. % Create HpOptCvType
  1226. app.HpOptCvType = uidropdown(app.HyperParameterTuningPanel);
  1227. app.HpOptCvType.Items = {'KFold', 'LOOCV'};
  1228. app.HpOptCvType.ValueChangedFcn = createCallbackFcn(app, @HpOptCvTypeValueChanged, true);
  1229. app.HpOptCvType.Position = [131 65 69 22];
  1230. app.HpOptCvType.Value = 'KFold';
  1231. % Create HpOptFolds
  1232. app.HpOptFolds = uieditfield(app.HyperParameterTuningPanel, 'numeric');
  1233. app.HpOptFolds.Position = [160 36 40 22];
  1234. app.HpOptFolds.Value = 5;
  1235. % Create HpOptRepeats
  1236. app.HpOptRepeats = uieditfield(app.HyperParameterTuningPanel, 'numeric');
  1237. app.HpOptRepeats.Position = [160 8 40 22];
  1238. app.HpOptRepeats.Value = 5;
  1239. % Create OptimizeHyperparametersCheckBox
  1240. app.OptimizeHyperparametersCheckBox = uicheckbox(app.HyperParameterTuningPanel);
  1241. app.OptimizeHyperparametersCheckBox.ValueChangedFcn = createCallbackFcn(app, @OptimizeHyperparametersCheckBoxValueChanged, true);
  1242. app.OptimizeHyperparametersCheckBox.Text = 'Optimize Hyper-parameters';
  1243. app.OptimizeHyperparametersCheckBox.Position = [11 89 169 22];
  1244. app.OptimizeHyperparametersCheckBox.Value = true;
  1245. % Create SelectDataDirectoryButton
  1246. app.SelectDataDirectoryButton = uibutton(app.UIFigure, 'push');
  1247. app.SelectDataDirectoryButton.ButtonPushedFcn = createCallbackFcn(app, @SelectDataDirectoryButtonPushed, true);
  1248. app.SelectDataDirectoryButton.BackgroundColor = [0.651 0.651 0.651];
  1249. app.SelectDataDirectoryButton.Position = [163 726 136 24];
  1250. app.SelectDataDirectoryButton.Text = 'Select Data Directory';
  1251. % Create SelectCSVfileButton
  1252. app.SelectCSVfileButton = uibutton(app.UIFigure, 'push');
  1253. app.SelectCSVfileButton.ButtonPushedFcn = createCallbackFcn(app, @SelectCSVfileButtonPushed, true);
  1254. app.SelectCSVfileButton.BackgroundColor = [0.651 0.651 0.651];
  1255. app.SelectCSVfileButton.Position = [164 811 134 23];
  1256. app.SelectCSVfileButton.Text = 'Select CSV file';
  1257. % Create MinimumDataThresholdsPanel
  1258. app.MinimumDataThresholdsPanel = uipanel(app.UIFigure);
  1259. app.MinimumDataThresholdsPanel.BorderType = 'none';
  1260. app.MinimumDataThresholdsPanel.Title = 'Minimum Data Thresholds';
  1261. app.MinimumDataThresholdsPanel.FontWeight = 'bold';
  1262. app.MinimumDataThresholdsPanel.Position = [12 266 180 89];
  1263. % Create MinimumFrequencyLabel
  1264. app.MinimumFrequencyLabel = uilabel(app.MinimumDataThresholdsPanel);
  1265. app.MinimumFrequencyLabel.Position = [10 10 114 22];
  1266. app.MinimumFrequencyLabel.Text = 'Minimum Frequency';
  1267. % Create MinFreq
  1268. app.MinFreq = uieditfield(app.MinimumDataThresholdsPanel, 'numeric');
  1269. app.MinFreq.Position = [142 10 39 22];
  1270. app.MinFreq.Value = 10;
  1271. % Create MinimumObservationLabel
  1272. app.MinimumObservationLabel = uilabel(app.MinimumDataThresholdsPanel);
  1273. app.MinimumObservationLabel.Position = [10 41 122 22];
  1274. app.MinimumObservationLabel.Text = 'Minimum Observation';
  1275. % Create MinObs
  1276. app.MinObs = uieditfield(app.MinimumDataThresholdsPanel, 'numeric');
  1277. app.MinObs.Position = [142 41 39 22];
  1278. app.MinObs.Value = 1;
  1279. % Create PredictorTypeButtonGroup
  1280. app.PredictorTypeButtonGroup = uibuttongroup(app.UIFigure);
  1281. app.PredictorTypeButtonGroup.SelectionChangedFcn = createCallbackFcn(app, @PredictorTypeButtonGroupSelectionChanged, true);
  1282. app.PredictorTypeButtonGroup.TitlePosition = 'centertop';
  1283. app.PredictorTypeButtonGroup.Title = 'Predictor Type';
  1284. app.PredictorTypeButtonGroup.FontWeight = 'bold';
  1285. app.PredictorTypeButtonGroup.Position = [10 704 124 51];
  1286. % Create LesionButton
  1287. app.LesionButton = uiradiobutton(app.PredictorTypeButtonGroup);
  1288. app.LesionButton.Text = 'Lesion';
  1289. app.LesionButton.Position = [11 5 58 22];
  1290. app.LesionButton.Value = true;
  1291. % Create OtherPredButton
  1292. app.OtherPredButton = uiradiobutton(app.PredictorTypeButtonGroup);
  1293. app.OtherPredButton.Text = 'Other';
  1294. app.OtherPredButton.Position = [69 5 65 22];
  1295. % Create CSVTtext
  1296. app.CSVTtext = uitextarea(app.UIFigure);
  1297. app.CSVTtext.ValueChangedFcn = createCallbackFcn(app, @SelectCSVfileButtonPushed, true);
  1298. app.CSVTtext.Placeholder = 'No file selected';
  1299. app.CSVTtext.Position = [308 811 533 24];
  1300. % Create ImDirText
  1301. app.ImDirText = uitextarea(app.UIFigure);
  1302. app.ImDirText.Placeholder = 'No directory selected';
  1303. app.ImDirText.Position = [308 726 533 24];
  1304. % Create BrainMaskText
  1305. app.BrainMaskText = uitextarea(app.UIFigure);
  1306. app.BrainMaskText.Placeholder = 'No mask selected (NIFTI Modality Only)';
  1307. app.BrainMaskText.Position = [308 686 533 25];
  1308. % Create SelectModelLabel
  1309. app.SelectModelLabel = uilabel(app.UIFigure);
  1310. app.SelectModelLabel.BackgroundColor = [0.9412 0.9412 0.9412];
  1311. app.SelectModelLabel.HorizontalAlignment = 'right';
  1312. app.SelectModelLabel.FontSize = 14;
  1313. app.SelectModelLabel.Position = [9 446 90 22];
  1314. app.SelectModelLabel.Text = 'Select Model:';
  1315. % Create SelectModelDropDown
  1316. app.SelectModelDropDown = uidropdown(app.UIFigure);
  1317. app.SelectModelDropDown.Items = {'plsr', 'pls_da', 'ridge', 'logistic_ridge', 'linsvr', 'linsvc', 'kernsvr', 'kernsvc', 'rensemble', 'censemble', 'municorr', 'ttest', 'bmunz', 'munilr', 'munimnr', 'muniolsr', 'prop_sub'};
  1318. app.SelectModelDropDown.ValueChangedFcn = createCallbackFcn(app, @SelectModelDropDownValueChanged, true);
  1319. app.SelectModelDropDown.FontSize = 14;
  1320. app.SelectModelDropDown.BackgroundColor = [0.651 0.651 0.651];
  1321. app.SelectModelDropDown.Position = [103 442 100 30];
  1322. app.SelectModelDropDown.Value = 'plsr';
  1323. % Create ResultOptionsPanel
  1324. app.ResultOptionsPanel = uipanel(app.UIFigure);
  1325. app.ResultOptionsPanel.Title = 'Result Options';
  1326. app.ResultOptionsPanel.FontWeight = 'bold';
  1327. app.ResultOptionsPanel.FontSize = 14;
  1328. app.ResultOptionsPanel.Position = [595 80 204 77];
  1329. % Create WriteBootstrapImagesCheckBox
  1330. app.WriteBootstrapImagesCheckBox = uicheckbox(app.ResultOptionsPanel);
  1331. app.WriteBootstrapImagesCheckBox.Text = 'Write Bootstrap Images';
  1332. app.WriteBootstrapImagesCheckBox.Position = [6 3 147 22];
  1333. app.WriteBootstrapImagesCheckBox.Value = true;
  1334. % Create WritePermutationImagesCheckBox
  1335. app.WritePermutationImagesCheckBox = uicheckbox(app.ResultOptionsPanel);
  1336. app.WritePermutationImagesCheckBox.Text = 'Write Permutation Images';
  1337. app.WritePermutationImagesCheckBox.Position = [6 27 161 22];
  1338. app.WritePermutationImagesCheckBox.Value = true;
  1339. % Create FitExplanatoryModelCheckBox
  1340. app.FitExplanatoryModelCheckBox = uicheckbox(app.UIFigure);
  1341. app.FitExplanatoryModelCheckBox.Text = 'Fit Explanatory Model';
  1342. app.FitExplanatoryModelCheckBox.FontSize = 14;
  1343. app.FitExplanatoryModelCheckBox.Position = [218 444 157 22];
  1344. app.FitExplanatoryModelCheckBox.Value = true;
  1345. % Create UseParallelProcessingRecommendedCheckBox
  1346. app.UseParallelProcessingRecommendedCheckBox = uicheckbox(app.UIFigure);
  1347. app.UseParallelProcessingRecommendedCheckBox.Text = 'Use Parallel Processing (Recommended)';
  1348. app.UseParallelProcessingRecommendedCheckBox.FontSize = 14;
  1349. app.UseParallelProcessingRecommendedCheckBox.Position = [386 444 282 22];
  1350. app.UseParallelProcessingRecommendedCheckBox.Value = true;
  1351. % Create MultivariateModelingToolAnalysisConfigurationLabel
  1352. app.MultivariateModelingToolAnalysisConfigurationLabel = uilabel(app.UIFigure);
  1353. app.MultivariateModelingToolAnalysisConfigurationLabel.FontSize = 16;
  1354. app.MultivariateModelingToolAnalysisConfigurationLabel.FontWeight = 'bold';
  1355. app.MultivariateModelingToolAnalysisConfigurationLabel.Position = [11 860 503 22];
  1356. app.MultivariateModelingToolAnalysisConfigurationLabel.Text = 'Multivariate Modeling Tool Analysis Configuration ';
  1357. % Create RunAnalysisButton
  1358. app.RunAnalysisButton = uibutton(app.UIFigure, 'push');
  1359. app.RunAnalysisButton.ButtonPushedFcn = createCallbackFcn(app, @RunAnalysisButtonPushed, true);
  1360. app.RunAnalysisButton.BackgroundColor = [0.651 0.651 0.651];
  1361. app.RunAnalysisButton.FontSize = 18;
  1362. app.RunAnalysisButton.FontWeight = 'bold';
  1363. app.RunAnalysisButton.Position = [588 10 224 48];
  1364. app.RunAnalysisButton.Text = 'Run Analysis';
  1365. % Create SelectOutputDirectoryButton
  1366. app.SelectOutputDirectoryButton = uibutton(app.UIFigure, 'push');
  1367. app.SelectOutputDirectoryButton.ButtonPushedFcn = createCallbackFcn(app, @SelectOutputDirectoryButtonPushed, true);
  1368. app.SelectOutputDirectoryButton.BackgroundColor = [0.651 0.651 0.651];
  1369. app.SelectOutputDirectoryButton.Position = [163 643 135 24];
  1370. app.SelectOutputDirectoryButton.Text = 'Select Output Directory';
  1371. % Create OutDirText
  1372. app.OutDirText = uitextarea(app.UIFigure);
  1373. app.OutDirText.Placeholder = 'No directory selected';
  1374. app.OutDirText.Position = [308 644 533 23];
  1375. % Create RegistryFlag
  1376. app.RegistryFlag = uicheckbox(app.UIFigure);
  1377. app.RegistryFlag.Text = 'Registry Patients (select if subject IDs are provided as 4-digit numeric codes in CSV file)';
  1378. app.RegistryFlag.FontSize = 14;
  1379. app.RegistryFlag.Position = [167 782 580 22];
  1380. % Create PermutationTestingPanel
  1381. app.PermutationTestingPanel = uipanel(app.UIFigure);
  1382. app.PermutationTestingPanel.BorderType = 'none';
  1383. app.PermutationTestingPanel.Title = 'Permutation Testing';
  1384. app.PermutationTestingPanel.FontWeight = 'bold';
  1385. app.PermutationTestingPanel.Position = [413 325 135 30];
  1386. % Create StatisticalThresholdsPanel
  1387. app.StatisticalThresholdsPanel = uipanel(app.UIFigure);
  1388. app.StatisticalThresholdsPanel.BorderType = 'none';
  1389. app.StatisticalThresholdsPanel.Title = 'Statistical Thresholds';
  1390. app.StatisticalThresholdsPanel.FontWeight = 'bold';
  1391. app.StatisticalThresholdsPanel.Position = [699 231 135 124];
  1392. % Create FWEEditFieldLabel
  1393. app.FWEEditFieldLabel = uilabel(app.StatisticalThresholdsPanel);
  1394. app.FWEEditFieldLabel.HorizontalAlignment = 'right';
  1395. app.FWEEditFieldLabel.Position = [1 39 32 22];
  1396. app.FWEEditFieldLabel.Text = 'FWE';
  1397. % Create FweThresh
  1398. app.FweThresh = uieditfield(app.StatisticalThresholdsPanel, 'numeric');
  1399. app.FweThresh.Limits = [0 1];
  1400. app.FweThresh.Position = [39 39 44 22];
  1401. app.FweThresh.Value = 0.05;
  1402. % Create UncEditFieldLabel
  1403. app.UncEditFieldLabel = uilabel(app.StatisticalThresholdsPanel);
  1404. app.UncEditFieldLabel.HorizontalAlignment = 'right';
  1405. app.UncEditFieldLabel.Position = [3 74 30 22];
  1406. app.UncEditFieldLabel.Text = 'Unc.';
  1407. % Create UncPThresh
  1408. app.UncPThresh = uieditfield(app.StatisticalThresholdsPanel, 'numeric');
  1409. app.UncPThresh.Limits = [0 1];
  1410. app.UncPThresh.Position = [39 74 44 22];
  1411. app.UncPThresh.Value = 0.001;
  1412. % Create FDRThresh
  1413. app.FDRThresh = uieditfield(app.StatisticalThresholdsPanel, 'numeric');
  1414. app.FDRThresh.Limits = [0 1];
  1415. app.FDRThresh.Position = [39 6 44 22];
  1416. app.FDRThresh.Value = 0.05;
  1417. % Create FDRLabel
  1418. app.FDRLabel = uilabel(app.StatisticalThresholdsPanel);
  1419. app.FDRLabel.HorizontalAlignment = 'right';
  1420. app.FDRLabel.Position = [1 8 30 22];
  1421. app.FDRLabel.Text = 'FDR';
  1422. % Create MisclassificationCostsPanel
  1423. app.MisclassificationCostsPanel = uipanel(app.UIFigure);
  1424. app.MisclassificationCostsPanel.BorderType = 'none';
  1425. app.MisclassificationCostsPanel.Title = 'Misclassification Costs';
  1426. app.MisclassificationCostsPanel.FontWeight = 'bold';
  1427. app.MisclassificationCostsPanel.Position = [15 10 168 90];
  1428. % Create Group1EditField_4Label
  1429. app.Group1EditField_4Label = uilabel(app.MisclassificationCostsPanel);
  1430. app.Group1EditField_4Label.HorizontalAlignment = 'right';
  1431. app.Group1EditField_4Label.Position = [15 13 52 22];
  1432. app.Group1EditField_4Label.Text = 'Group -1';
  1433. % Create MisClasCostG2
  1434. app.MisClasCostG2 = uieditfield(app.MisclassificationCostsPanel, 'numeric');
  1435. app.MisClasCostG2.Limits = [0 100];
  1436. app.MisClasCostG2.Enable = 'off';
  1437. app.MisClasCostG2.Position = [74 13 22 22];
  1438. app.MisClasCostG2.Value = 1;
  1439. % Create Group1EditField_3Label
  1440. app.Group1EditField_3Label = uilabel(app.MisclassificationCostsPanel);
  1441. app.Group1EditField_3Label.HorizontalAlignment = 'right';
  1442. app.Group1EditField_3Label.Position = [13 40 55 22];
  1443. app.Group1EditField_3Label.Text = 'Group +1';
  1444. % Create MisClasCostG1
  1445. app.MisClasCostG1 = uieditfield(app.MisclassificationCostsPanel, 'numeric');
  1446. app.MisClasCostG1.Limits = [0 1000];
  1447. app.MisClasCostG1.Enable = 'off';
  1448. app.MisClasCostG1.Position = [74 40 22 22];
  1449. app.MisClasCostG1.Value = 1;
  1450. % Create SelectOutcomeVariableYListBoxLabel
  1451. app.SelectOutcomeVariableYListBoxLabel = uilabel(app.UIFigure);
  1452. app.SelectOutcomeVariableYListBoxLabel.HorizontalAlignment = 'right';
  1453. app.SelectOutcomeVariableYListBoxLabel.Position = [50 590 156 22];
  1454. app.SelectOutcomeVariableYListBoxLabel.Text = 'Select Outcome Variable (Y)';
  1455. % Create SelectOutcomeVariableYListBox
  1456. app.SelectOutcomeVariableYListBox = uilistbox(app.UIFigure);
  1457. app.SelectOutcomeVariableYListBox.Items = {};
  1458. app.SelectOutcomeVariableYListBox.Position = [221 572 620 56];
  1459. app.SelectOutcomeVariableYListBox.Value = {};
  1460. % Create SelectNuisanceRegressorsListBoxLabel
  1461. app.SelectNuisanceRegressorsListBoxLabel = uilabel(app.UIFigure);
  1462. app.SelectNuisanceRegressorsListBoxLabel.HorizontalAlignment = 'right';
  1463. app.SelectNuisanceRegressorsListBoxLabel.Position = [34 520 156 22];
  1464. app.SelectNuisanceRegressorsListBoxLabel.Text = 'Select Nuisance Regressors';
  1465. % Create SelectNuisanceRegressorsListBox
  1466. app.SelectNuisanceRegressorsListBox = uilistbox(app.UIFigure);
  1467. app.SelectNuisanceRegressorsListBox.Items = {};
  1468. app.SelectNuisanceRegressorsListBox.Multiselect = 'on';
  1469. app.SelectNuisanceRegressorsListBox.Position = [221 501 620 56];
  1470. app.SelectNuisanceRegressorsListBox.Value = {};
  1471. % Create RegressLesionVolumefromYCheckBox
  1472. app.RegressLesionVolumefromYCheckBox = uicheckbox(app.UIFigure);
  1473. app.RegressLesionVolumefromYCheckBox.ValueChangedFcn = createCallbackFcn(app, @RegressLesionVolumefromYCheckBoxValueChanged, true);
  1474. app.RegressLesionVolumefromYCheckBox.Text = 'Regress Lesion Volume from Y';
  1475. app.RegressLesionVolumefromYCheckBox.Position = [221 476 243 22];
  1476. % Create NuisanceRegressorCheckBox
  1477. app.NuisanceRegressorCheckBox = uicheckbox(app.UIFigure);
  1478. app.NuisanceRegressorCheckBox.ValueChangedFcn = createCallbackFcn(app, @NuisanceRegressorCheckBoxValueChanged, true);
  1479. app.NuisanceRegressorCheckBox.Text = '';
  1480. app.NuisanceRegressorCheckBox.Position = [196 519 25 22];
  1481. % Create CatYCheckBox
  1482. app.CatYCheckBox = uicheckbox(app.UIFigure);
  1483. app.CatYCheckBox.ValueChangedFcn = createCallbackFcn(app, @CatYCheckBoxValueChanged, true);
  1484. app.CatYCheckBox.Enable = 'off';
  1485. app.CatYCheckBox.Visible = 'off';
  1486. app.CatYCheckBox.Text = 'Y is Grouping Variable';
  1487. app.CatYCheckBox.Position = [217 421 141 22];
  1488. % Create RegressLesionVolumefromXandYCheckBox
  1489. app.RegressLesionVolumefromXandYCheckBox = uicheckbox(app.UIFigure);
  1490. app.RegressLesionVolumefromXandYCheckBox.ValueChangedFcn = createCallbackFcn(app, @RegressLesionVolumefromXandYCheckBoxValueChanged, true);
  1491. app.RegressLesionVolumefromXandYCheckBox.Text = 'Regress Lesion Volume from X and Y';
  1492. app.RegressLesionVolumefromXandYCheckBox.Position = [466 477 301 22];
  1493. % Create RankCorCheckBox
  1494. app.RankCorCheckBox = uicheckbox(app.UIFigure);
  1495. app.RankCorCheckBox.Enable = 'off';
  1496. app.RankCorCheckBox.Visible = 'off';
  1497. app.RankCorCheckBox.Text = 'Spearman Rank Correlation';
  1498. app.RankCorCheckBox.Position = [217 421 228 22];
  1499. % Create IdPathFlag
  1500. app.IdPathFlag = uicheckbox(app.UIFigure);
  1501. app.IdPathFlag.ValueChangedFcn = createCallbackFcn(app, @IdPathFlagValueChanged, true);
  1502. app.IdPathFlag.Text = 'Subject IDs are full filepaths to imaging data';
  1503. app.IdPathFlag.FontSize = 14;
  1504. app.IdPathFlag.Position = [167 759 299 22];
  1505. % Show the figure after all components are created
  1506. app.UIFigure.Visible = 'on';
  1507. end
  1508. end
  1509. % App creation and deletion
  1510. methods (Access = public)
  1511. % Construct app
  1512. function app = run_modeling_gui
  1513. % Create UIFigure and components
  1514. createComponents(app)
  1515. % Register the app with App Designer
  1516. registerApp(app, app.UIFigure)
  1517. % Execute the startup function
  1518. runStartupFcn(app, @startupFcn)
  1519. if nargout == 0
  1520. clear app
  1521. end
  1522. end
  1523. % Code that executes before app deletion
  1524. function delete(app)
  1525. % Delete UIFigure when app is deleted
  1526. delete(app.UIFigure)
  1527. end
  1528. end
  1529. end

run_modeling_gui.m at commit 389ea3e, under GPL-3.0 · at the source

Overview

Authors: Michal Brzus1,2, Joseph Griffis2, Cavan J Riley1, Joel Bruss2,3, Carrie Shea2, Hans J Johnson1,4, Aaron D Boes2,3,4,5,6
ORCID iDs: Hans J Johnson
  1. Department of Electrical and Computer Engineering, The University of Iowa, Iowa City, IA USA
  2. Department of Pediatrics, Carver College of Medicine, The University of Iowa, Iowa City, IA USA
  3. Department of Neurology, Carver College of Medicine, The University of Iowa, Iowa City, IA USA
  4. Department of Biomedical Engineering, The University of Iowa, Iowa City, IA USA
  5. Department of Psychiatry, Carver College of Medicine, The University of Iowa, Iowa City, IA USA
  6. Iowa Neuroscience Institute, The University of Iowa, Iowa City, IA USA
Institutions: University of Iowa (United States)
Journal: NPJ digital medicine, volume 9, issue 1, article 646
Dates: received 25 September 2025; accepted 18 May 2026; published online 27 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41746-026-02803-2 · PMID 42204350 · PMCID PMC13493867 · OpenAlex W4410275398
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), stroke (population), clinical / translational (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, fMRI & imaging
Keywords: Computational biology and bioinformatics, Medical research, Neurology, Neuroscience
Topic: Acute Ischemic Stroke Management (Epidemiology, Medicine), according to OpenAlex
Funding: Roy J. Carver Charitable Trust; NINDS NIH HHS (1 R01 NS114405-02, R01 NS114405, R01 NS142391); National Institute of Neurological Disorders and Stroke (1 R01 NS114405-02); NIH HHS (S10 OD025025)
Citations: not cited yet (Europe PMC); 75 references in the paper

Abstract

Accurately predicting long-term outcomes after stroke remains a key challenge in personalized medicine. Here, we present a neuroimaging platform that forecasts individualized cognitive outcomes in patients with ischemic stroke using deep learning-based lesion segmentation and location-/network-based features. This novel, fully automated system is capable of processing raw DICOM MRI data from heterogeneous scanners and generating text-based, personalized outcome information. To demonstrate this pipeline, we trained cognitive outcome-prediction models using a large lesion cohort (N = 604) and applied them to an independent stroke cohort (N = 153). Multiple cognitive outcome predictions achieved reasonable accuracy, with 96% concordance with manual methods. A report generated by a large language model provides interpretable, patient-specific prognoses within ~3 min. This demonstrates the potential for imaging-informed prognostication to inform stroke care and guide rehabilitation strategies.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.

Zenodo 15626633

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Languages: MATLAB (3), Jupyter (1)
Size: 4 files, 4 scripts
Software Heritage: not checked
Found in: “Data availability”
Holds: 4 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NiBabel (1 file), Nilearn (1 file), NumPy (1 file), pandas (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
4 files

Zenodo 15610144

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
171 files

jcgriffis/ibb_toolkit

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 389ea3e672a115ecc0532a212208ccdee0ad7ade, 31 August 2026
Languages: MATLAB (181)
Size: 193 files, 181 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README, license file, 31 notebooks
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
184 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 353 scripts, each with its path and the digest of its content;
  • 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

The software used for lesion modeling can be downloaded at the provided URL. Deidentified data from this study may be made available upon reasonable request to the corresponding author, subject to a data use agreement ensuring compliance with human subjects ethical standards. Trained machine learning models for outcome prediction may be shared, subject to a proper software use agreement protecting intellectual property rights. The IBB toolkit version used for training and evaluating the cognitive outcome-prediction models is archived along with the notebooks used for generating the outcome-prediction figures here: https://zenodo.org/records/15626633. https://zenodo.org/records/15610144. The dcm-classifier package used for DICOM modality classification is available as PIP package at https://pypi.org/project/dcm-classifier/.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 4 keywords, 4 funders, 71 references.

Cite

This paper

Brzus, M., Griffis, J., Riley, C. J., Bruss, J., Shea, C., Johnson, H. J., & Boes, A. D. (2026). A clinical neuroimaging platform for rapid, automated lesion detection and personalized post-stroke outcome prediction. NPJ digital medicine, 9(1), 646. https://doi.org/10.1038/s41746-026-02803-2

BibTeX

@article{brzus2026clinical,
author = {Brzus, Michal and Griffis, Joseph and Riley, Cavan J and Bruss, Joel and Shea, Carrie and Johnson, Hans J and Boes, Aaron D},
title = {{A clinical neuroimaging platform for rapid, automated lesion detection and personalized post-stroke outcome prediction}},
journal = {NPJ digital medicine},
year = {2026},
month = may,
volume = {9},
number = {1},
pages = {646},
publisher = {Nature Publishing Group},
issn = {2398-6352},
doi = {10.1038/s41746-026-02803-2},
url = {https://doi.org/10.1038/s41746-026-02803-2},
pmid = {42204350},
pmcid = {PMC13493867}
}

RIS

TY - JOUR
AU - Brzus, Michal
AU - Griffis, Joseph
AU - Riley, Cavan J
AU - Bruss, Joel
AU - Shea, Carrie
AU - Johnson, Hans J
AU - Boes, Aaron D
TI - A clinical neuroimaging platform for rapid, automated lesion detection and personalized post-stroke outcome prediction
T2 - NPJ digital medicine
J2 - NPJ Digit Med
PY - 2026
DA - 2026/05/27
VL - 9
IS - 1
SP - 646
SN - 2398-6352
PB - Nature Publishing Group
DO - 10.1038/s41746-026-02803-2
UR - https://doi.org/10.1038/s41746-026-02803-2
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41746-026-02803-2",
"type": "article-journal",
"title": "A clinical neuroimaging platform for rapid, automated lesion detection and personalized post-stroke outcome prediction",
"container-title": "NPJ digital medicine",
"author": [
{
"family": "Brzus",
"given": "Michal"
},
{
"family": "Griffis",
"given": "Joseph"
},
{
"family": "Riley",
"given": "Cavan J"
},
{
"family": "Bruss",
"given": "Joel"
},
{
"family": "Shea",
"given": "Carrie"
},
{
"family": "Johnson",
"given": "Hans J"
},
{
"family": "Boes",
"given": "Aaron D"
}
],
"container-title-short": "NPJ Digit Med",
"volume": "9",
"issue": "1",
"page": "646",
"DOI": "10.1038/s41746-026-02803-2",
"PMID": "42204350",
"PMCID": "PMC13493867",
"ISSN": "2398-6352",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41746-026-02803-2",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
27
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41586-026-10631-3 [code]
A prognostic human brain network for diffuse midline glioma.
Journal: Nature
In common: Tools for NIfTI and ANALYZE image (MATLAB), Nilearn, Image Processing Toolbox, 4 other tools, clinical / translational, 4 references
[2] doi:10.1002/cns.71114 [code]
Dynamic Functional Connectivity Changes in Cortical and Cortico-Striatal Strokes in Mice.
Journal: CNS neuroscience & therapeutics
In common: Tools for NIfTI and ANALYZE image (MATLAB), NiBabel, pandas, 1 other tool, stroke, 5 references
[3] doi:10.64898/2026.05.12.26353056 [code]
Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes
Journal: medRxiv (preprint)
In common: stroke, clinical / translational, 6 references
[4] doi:10.1016/j.nicl.2026.104052 [code]
Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks.
Journal: NeuroImage. Clinical
In common: pandas, NumPy, clinical / translational, 5 references
[5] doi:10.1002/hbm.70602 [code]
Neuroimaging Correlates of Post-Stroke Pain After Ischemic Stroke: Secondary Analysis of the INSPiRE-TMS Trial.
Journal: Human brain mapping
In common: Tools for NIfTI and ANALYZE image (MATLAB), Image Processing Toolbox, NiBabel, 3 other tools, stroke, clinical / translational, 1 reference
[6] doi:10.1016/j.xcrm.2026.102943 [code]
Parent-of-origin effects in Alzheimer's liability dissociate neurocognitive and cardiovascular traits in at-risk individuals.
Journal: Cell reports. Medicine
In common: Tools for NIfTI and ANALYZE image (MATLAB), Nilearn, Image Processing Toolbox, 4 other tools, clinical / translational
[7] doi:10.1371/journal.pbio.3003856 [code]
Aging and metabolism contribute separately to brain-body health.
Journal: PLoS biology
In common: Tools for NIfTI and ANALYZE image (MATLAB), Nilearn, Image Processing Toolbox, 4 other tools, clinical / translational
[8] doi:10.1002/ana.78206 [code]
Multimodal Image Guidance in Subthalamic Deep Brain Stimulation for Parkinson's Disease.
Journal: Annals of neurology
In common: Tools for NIfTI and ANALYZE image (MATLAB), Image Processing Toolbox, NiBabel, 3 other tools, clinical / translational, 1 reference
[9] doi:10.1038/s41467-026-76452-0 [code]
Music evokes shared neural representations of imagined narratives across sensory modalities.
Journal: Nature communications
In common: Tools for NIfTI and ANALYZE image (MATLAB), Nilearn, Image Processing Toolbox, 4 other tools
[10] doi:10.1016/j.isci.2026.116900 [code]
Dog brain representations of human facial expressions: Encoding happiness and differentiating specific negative expressions.
Journal: iScience
In common: Tools for NIfTI and ANALYZE image (MATLAB), Nilearn, Image Processing Toolbox, 4 other tools

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.