Revisiting Amplitude of Low-Frequency Fluctuations (ALFF) in Resting-State fMRI: Clarifications and Improvements.
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 123 lines · 3.5 KB · no license
- library(RNifti)
- library(fslr)
- library(Matrix)
- library(signal)
- library(pbmcapply)
- # function of calculating amALFF and amfALFF
- calc_amALFF <- function(func, mask, TR, Fl, Fh, Fc, cores=30) {
- func.mat <- matrix(func, nrow=dim(func)[4], byrow=T)
- func.mat <- func.mat[,which(mask>=1)]
- rm(func)
- N <- nrow(func.mat)
- fNq <- 1/(2*TR)
- freqs <- seq(0, fNq, length.out=N/2+1)
- kFl <- which.min(abs(freqs - Fl)) # index of Fl
- kFh <- which.min(abs(freqs - Fh)) # index of Fh
- kFc <- which.min(abs(freqs - Fc)) # index of Fc
- # calculating amALFF and amfALFF
- am.out <- pbmclapply(1:ncol(func.mat), function(i) {
- sn <- func.mat[,i]
- sn.demean <- sn - mean(sn) # demean
- Sk <- abs(fft(sn.demean)) # Compute amplitude spectrum without normalization
- amALFF.ind <- sum(2*Sk[kFl:kFh]/N)/(kFh - kFl + 1) # Eq. (1)
- amfALFF.ind <- sum(Sk[kFl:kFh])/sum(Sk[1:kFc]) # Eq. (2)
- am.out <- c(amALFF.ind, amfALFF.ind)
- }, mc.cores = cores)
- am.out <- do.call(rbind, am.out)
- amALFF <- am.out[,1]
- amALFFnorm <- amALFF/mean(amALFF, na.rm=T) # Eq. (7)
- amfALFF <- am.out[,2]
- list(amALFFnorm, amfALFF)
- }
- # function of calculating column's root mean squared
- colRMS <- function(A, cores = 0) {
- N <- nrow(A)
- if(cores > 0) {
- ms <- Rfast::colVars(A, parallel = T, cores = cores) * (N-1) / N
- } else {
- ms <- Rfast::colVars(A) * (N-1) / N
- }
- return(sqrt(ms))
- }
- # function of calculating qmALFF and qmfALFF
- calc_qmALFF <- function(func, mask, TR, Fl, Fh, Fc, cores=30) {
- func.mat <- matrix(func, nrow=dim(func)[4], byrow=T)
- func.mat <- func.mat[,which(mask>=1)]
- func.mat.demean <- func.mat - mean(func.mat)
- rm(func)
- N <- nrow(func.mat)
- fNq <- 1/(2*TR)
- freqs <- seq(0, fNq, length.out=N/2+1)
- kFl <- which.min(abs(freqs - Fl)) # index of Fl
- kFh <- which.min(abs(freqs - Fh)) # index of Fh
- kFc <- which.min(abs(freqs - Fc)) # index of Fc
- bw <- butter(4, c(Fl,Fh)*TR*2)
- func.filt <- pbmclapply(1:ncol(func.mat), function(i) {
- sn <- func.mat[,i]
- sn.demean <- sn - mean(sn) # demean
- filtered <- filtfilt(bw, sn.demean)
- return(filtered)
- }, mc.cores = cores)
- func.filt <- do.call(cbind, func.filt)
- qmALFF <- 2*sqrt(N/(kFh - kFl + 1))*colRMS(func.filt) # Eq. (3)
- qmALFFnorm <- qmALFF/mean(qmALFF, na.rm=T) # Eq. (8)
- qmfALFF <- colRMS(func.filt) / colRMS(func.mat.demean) # Eq. (4)
- list(qmALFFnorm, qmfALFF)
- }
- arrayTo4D <- function(arr, mask) {
- tmp <- lapply(arr, function(x) {
- cur <- mask
- cur[which(mask>=1)] <- x
- return(cur)
- })
- do.call(abind::abind, c(tmp, along = 4))
- }
- # funct_dir <- "./sub-100307REST1LR_9pDummy.nii.gz"
- # mask_dir <- "./Schaefer2018_100Parcels_2mm.nii"
- # out_path <- "./"
- # Main function starting from here
- args <- commandArgs(trailingOnly = TRUE)
- funct_dir <- args[1]
- mask_dir <- args[2]
- out_path <- args[3]
- # read in functional and mask images
- func <- readNifti(funct_dir)
- mask <- readNifti(mask_dir)
- TR <- attr(func, "pixdim")[4]
- Fl <- 0.01 # low freq of bandpass filter
- Fh <- 0.08 # high freq of bandpass filter
- Fc <- 0.2 # cut-off freq
- #function to calculate amALFF and amfALFF
- amALFF.out <- calc_amALFF(func, mask, TR, Fl, Fh, Fc)
- #function to calculate qmALFF and qmfALFF
- qmALFF.out <- calc_qmALFF(func, mask, TR, Fl, Fh, Fc)
- # output results
- setwd(out_path)
- writeNifti(arrayTo4D(amALFF.out[1], mask), "amALFFnorm.nii.gz", template = mask)
- writeNifti(arrayTo4D(amALFF.out[2], mask), "amfALFF.nii.gz", template = mask)
- writeNifti(arrayTo4D(qmALFF.out[1], mask), "qmALFFnorm.nii.gz", template = mask)
- writeNifti(arrayTo4D(qmALFF.out[2], mask), "qmfALFF.nii.gz", template = mask)
ALFF_08072025.R at commit c208630, no license · at the source
Overview
- Department of Neuroscience, Feinberg School of Medicine, Northwestern University, Chicago, Illinois, USA
- Center for Translational Pain Research, Feinberg School of Medicine, Northwestern University, Chicago, Illinois, USA
- Departments of Biomedical Engineering and Statistics and Data Science, Northwestern University, Evanston, Illinois, USA
- Department of Anesthesiology, Feinberg School of Medicine, Northwestern University, Chicago, Illinois, USA
- Department of Physical Medicine and Rehabilitation, Northwestern University, Chicago, Illinois, USA
- Shirley Ryan AbilityLab, Chicago, Illinois, USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above.
lejianhuang/ALFF
c208630f71e527399fe58c584124f994dbf47deb, 8 August 2025Availability: 2 checks, the latest on 6 November 2026: the link answers
- 6 November 2026: the link answers
- 28 September 2026: the link answers
1 file
- ALFF_08072025.R, R, 123 lines
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:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- 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.
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- no repository, dataset or request procedure was recognized in it
Read it in the paper: doi.org/10.1002/hbm.70506.
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, 6 authors, 6 keywords, 10 MeSH terms, 3 funders, 44 references.
Cite
This paper
Huang, L., Jabakhanji, R., Vigotsky, A. D., Branco, P., Baliki, M. N., & Apkarian, A. V. (2026). Revisiting Amplitude of Low-Frequency Fluctuations (ALFF) in Resting-State fMRI: Clarifications and Improvements. Human brain mapping, 47(5), e70506. https://
BibTeX
@article{huang2026revisi
author = {Huang, Lejian and Jabakhanji, Rami and Vigotsky, Andrew D and Branco, Paulo and Baliki, Marwan N and Apkarian, A Vania},
title = {{Revisiting Amplitude of Low-Frequency Fluctuations (ALFF) in Resting-State fMRI: Clarifications and Improvements}},
journal = {Human brain mapping},
year = {2026},
month = apr,
volume = {47},
number = {5},
pages = {e70506},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/
url = {https://
pmid = {41867070},
pmcid = {PMC13081689}
}
RIS
TY - JOUR
AU - Huang, Lejian
AU - Jabakhanji, Rami
AU - Vigotsky, Andrew D
AU - Branco, Paulo
AU - Baliki, Marwan N
AU - Apkarian, A Vania
TI - Revisiting Amplitude of Low-Frequency Fluctuations (ALFF) in Resting-State fMRI: Clarifications and Improvements
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/
VL - 47
IS - 5
SP - e70506
SN - 1065-9471
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "Revisiting Amplitude of Low-Frequency Fluctuations (ALFF) in Resting-State fMRI: Clarifications and Improvements",
"container-title": "Human brain mapping",
"author": [
{
"family": "Huang",
"given": "Lejian"
},
{
"family": "Jabakhanji",
"given": "Rami"
},
{
"family": "Vigotsky",
"given": "Andrew D"
},
{
"family": "Branco",
"given": "Paulo"
},
{
"family": "Baliki",
"given": "Marwan N"
},
{
"family": "Apkarian",
"given": "A Vania"
}
],
"container-title-short":
"volume": "47",
"issue": "5",
"page": "e70506",
"DOI": "10.1002/
"PMID": "41867070",
"PMCID": "PMC13081689",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
1
]
]
}
}
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.1111/ejn.70276 [code]
- Resting-State Functional MRI Analyses for Brain Activity Characterization: A Narrative Review of Features and Methods.Journal: The European journal of neuroscienceIn common: fMRI, 12 references
- [2] doi:10.1038/s41597-025-06442-2 [code]
- An open fMRI resource for studying human brain function and covert consciousness under anesthesia.Journal: Scientific dataIn common: fMRI, 14 references
- [3] doi:10.1162/imag_a_00257 [code]
- XCP-D: A robust pipeline for the post-processing of fMRI data.Journal: Imaging neuroscience (Cambridge, Mass.)In common: methods / tools, fMRI, 12 references
- [4] doi:10.1016/j.neuroimage.2021.118843 [code]
- Functional brain network community structure in childhood: Unfinished territories and fuzzy boundaries.Journal: NeuroImageIn common: RNifti, 11 references
- [5] doi:10.7554/elife.88652 [code]
- Multi-study fMRI outlooks on subcortical BOLD responses in the stop-signal paradigm.Journal: eLifeIn common: methods / tools, fMRI, 11 references
- [6] doi:10.1002/hbm.70590
- Diurnal Variations and Test-Retest Reliability of Resting-State Functional MRI Metrics.Journal: Human brain mappingIn common: methods / tools, fMRI, 9 references
- [7] doi:10.1002/mrm.70110 [code]
- Advancing whole-brain BOLD functional MRI in humans at 10.5 T with motion-robust 3D echo-planar imaging, parallel transmission, and high-density radiofrequency receive coils.Journal: Magnetic resonance in medicineIn common: methods / tools, fMRI, 10 references
- [8] doi:10.1162/netn.a.547 [code]
- An evaluation of the efficacy of single-echo and multi-echo fMRI denoising strategies.Journal: Network neuroscience (Cambridge, Mass.)In common: fMRI, 10 references
- [9] doi:10.1002/hbm.70080 [code]
- Multi-Metric Approach for the Comparison of Denoising Techniques for Resting-State fMRI.Journal: Human brain mappingIn common: methods / tools, fMRI, 8 references
- [10] doi:10.1016/j.neuroimage.2023.119972 [code]
- Less is more: balancing noise reduction and data retention in fMRI with data-driven scrubbing.Journal: NeuroImageIn common: RNifti, methods / tools, fMRI, 6 references
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 1 script, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:5b9ae8d582d14700…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1002/hbm.70506)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1002/hbm.70506.svg
:target: https://openscicode.org/badge/doi/10.1002/hbm.70506
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1002/hbm.70506"><img src="https://openscicode.org/badge/doi/10.1002/hbm.70506.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
