Package: autohrf 1.1.3

autohrf: Automated Generation of Data-Informed GLM Models in Task-Based fMRI Data Analysis

Analysis of task-related functional magnetic resonance imaging (fMRI) activity at the level of individual participants is commonly based on general linear modelling (GLM) that allows us to estimate to what extent the blood oxygenation level dependent (BOLD) signal can be explained by task response predictors specified in the GLM model. The predictors are constructed by convolving the hypothesised timecourse of neural activity with an assumed hemodynamic response function (HRF). To get valid and precise estimates of task response, it is important to construct a model of neural activity that best matches actual neuronal activity. The construction of models is most often driven by predefined assumptions on the components of brain activity and their duration based on the task design and specific aims of the study. However, our assumptions about the onset and duration of component processes might be wrong and can also differ across brain regions. This can result in inappropriate or suboptimal models, bad fitting of the model to the actual data and invalid estimations of brain activity. Here we present an approach in which theoretically driven models of task response are used to define constraints based on which the final model is derived computationally using the actual data. Specifically, we developed 'autohrf' — a package for the 'R' programming language that allows for data-driven estimation of HRF models. The package uses genetic algorithms to efficiently search for models that fit the underlying data well. The package uses automated parameter search to find the onset and duration of task predictors which result in the highest fitness of the resulting GLM based on the fMRI signal under predefined restrictions. We evaluate the usefulness of the 'autohrf' package on publicly available datasets of task-related fMRI activity. Our results suggest that by using 'autohrf' users can find better task related brain activity models in a quick and efficient manner.

Authors:Jure Demšar [cre, aut], Nina Purg [aut], Grega Repovš [aut]

autohrf_1.1.3.tar.gz
autohrf_1.1.3.zip(r-4.5)autohrf_1.1.3.zip(r-4.4)autohrf_1.1.3.zip(r-4.3)
autohrf_1.1.3.tgz(r-4.4-any)autohrf_1.1.3.tgz(r-4.3-any)
autohrf_1.1.3.tar.gz(r-4.5-noble)autohrf_1.1.3.tar.gz(r-4.4-noble)
autohrf_1.1.3.tgz(r-4.4-emscripten)autohrf_1.1.3.tgz(r-4.3-emscripten)
autohrf.pdf |autohrf.html
autohrf/json (API)
NEWS

# Install 'autohrf' in R:
install.packages('autohrf', repos = c('https://demsarjure.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/demsarjure/autohrf/issues

Datasets:
  • flanker - Datasets for autohrf examples Example datasets for use in 'autohrf' examples and vignettes. The datasets were extracted from the internal Mind and Brain Lab's (MBLab, <http://www.mblab.si> repository. MBLab is a research lab at the Faculty of Arts, Department of Psychology, University of Ljubljana, Slovenia.
  • flanker_autofit - Datasets for autohrf examples Example datasets for use in 'autohrf' examples and vignettes. The datasets were extracted from the internal Mind and Brain Lab's (MBLab, <http://www.mblab.si> repository. MBLab is a research lab at the Faculty of Arts, Department of Psychology, University of Ljubljana, Slovenia.
  • swm - Datasets for autohrf examples Example datasets for use in 'autohrf' examples and vignettes. The datasets were extracted from the internal Mind and Brain Lab's (MBLab, <http://www.mblab.si> repository. MBLab is a research lab at the Faculty of Arts, Department of Psychology, University of Ljubljana, Slovenia.
  • swm_autofit - Datasets for autohrf examples Example datasets for use in 'autohrf' examples and vignettes. The datasets were extracted from the internal Mind and Brain Lab's (MBLab, <http://www.mblab.si> repository. MBLab is a research lab at the Faculty of Arts, Department of Psychology, University of Ljubljana, Slovenia.
  • swm_autofit1 - Datasets for autohrf examples Example datasets for use in 'autohrf' examples and vignettes. The datasets were extracted from the internal Mind and Brain Lab's (MBLab, <http://www.mblab.si> repository. MBLab is a research lab at the Faculty of Arts, Department of Psychology, University of Ljubljana, Slovenia.
  • swm_autofit2 - Datasets for autohrf examples Example datasets for use in 'autohrf' examples and vignettes. The datasets were extracted from the internal Mind and Brain Lab's (MBLab, <http://www.mblab.si> repository. MBLab is a research lab at the Faculty of Arts, Department of Psychology, University of Ljubljana, Slovenia.

On CRAN:

4.41 score 1 stars 13 scripts 307 downloads 18 exports 40 dependencies

Last updated 10 months agofrom:b115769ff8. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 17 2024
R-4.5-winOKNov 17 2024
R-4.5-linuxOKNov 17 2024
R-4.4-winOKNov 17 2024
R-4.4-macOKNov 17 2024
R-4.3-winOKNov 17 2024
R-4.3-macOKNov 17 2024

Exports:autohrfconvolve_eventsconvolve_hrfcreate_boynton_hrfcreate_childcreate_first_generationcreate_new_generationcreate_spm_hrfdownsampleevaluate_modelfit_to_constraintsget_best_modelsget_parentsplot_best_modelsplot_eventsplot_fitnessplot_modelrun_model

Dependencies:clicodetoolscolorspacecowplotcpp11doParalleldplyrfansifarverforeachgenericsggplot2gluegtablegtoolsisobanditeratorslabelinglatticelifecyclelubridatemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigR6RColorBrewerrlangscalestibbletidyselecttimechangeutf8vctrsviridisLitewithr

An example on how to evaluate manually constructed event models

Rendered frommanual_evaluation.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2023-02-15
Started: 2022-07-13

An example on how to use automated model parameter search

Rendered fromautomated_search.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2023-02-15
Started: 2022-07-13

Analysis steps used in the flanker study

Rendered fromflanker_analysis.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2023-02-15
Started: 2023-02-15

Analysis steps used in the spatial working memory study

Rendered fromswm_analysis.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2023-02-15
Started: 2023-02-15