Amplitude of Low Frequency Fluctuations(ALFF) and fractional ALFF

NodeBlockFunction: alff_falff

CPAC.alff.alff.alff_falff(wf, cfg, strat_pool, pipe_num, opt=None)[source]
Parameters:
Returns:

NodeBlockFunction: alff_falff_space_template

CPAC.alff.alff.alff_falff_space_template(wf, cfg, strat_pool, pipe_num, opt=None)[source]
Parameters:
Returns:

CPAC.alff.alff.create_alff(wf_name='alff_workflow')[source]

Calculate Amplitude of low frequency oscillations (ALFF) and fractional ALFF maps

Parameters:

wf_name (string) – Workflow name

Returns:

alff_workflow – ALFF workflow

Return type:

workflow object

Notes

Source

Workflow Inputs:

hp_input.hp : list of float
    high pass frequencies

lp_input.lp : list of float
    low pass frequencies

inputspec.rest_res : string
    Path to existing Nifti file. Nuisance signal regressed functional image.

inputspec.rest_mask : string
    Path to existing Nifti file. A mask volume(derived by dilating the motion corrected functional volume) in native space

Workflow Outputs:

outputspec.alff_img : string
    Path to Nifti file. Image containing the sum of the amplitudes in the low frequency band

outputspec.falff_img : string
    Path to Nifti file. Image containing the sum of the amplitudes in the low frequency band divided by the amplitude of the total frequency

outputspec.alff_Z_img : string
    Path to Nifti file. Image containing Normalized ALFF Z scores across full brain in native space

outputspec.falff_Z_img : string
    Path to Nifti file. Image containing Normalized fALFF Z scores across full brain in native space

Order of Commands:

  • Filter the input file rest file( slice-time, motion corrected and nuisance regressed) ::
    3dBandpass -prefix residual_filtered.nii.gz

    0.009 0.08 residual.nii.gz

  • Calculate ALFF by taking the standard deviation of the filtered file ::
    3dTstat -stdev

    -mask rest_mask.nii.gz -prefix residual_filtered_3dT.nii.gz residual_filtered.nii.gz

  • Calculate the standard deviation of the unfiltered file ::
    3dTstat -stdev

    -mask rest_mask.nii.gz -prefix residual_3dT.nii.gz residual.nii.gz

  • Calculate fALFF ::
    3dcalc -a rest_mask.nii.gz

    -b residual_filtered_3dT.nii.gz -c residual_3dT.nii.gz -expr ‘(1.0*bool(a))*((1.0*b)/(1.0*c))’ -float

  • Normalize ALFF/fALFF to Z-score across full brain

    fslstats
    ALFF.nii.gz
    -k rest_mask.nii.gz
    -m > mean_ALFF.txt ; mean=$( cat mean_ALFF.txt )
    
    fslstats
    ALFF.nii.gz
    -k rest_mask.nii.gz
    -s > std_ALFF.txt ; std=$( cat std_ALFF.txt )
    
    fslmaths
    ALFF.nii.gz
    -sub ${mean}
    -div ${std}
    -mas rest_mask.nii.gz ALFF_Z.nii.gz
    
    fslstats
    fALFF.nii.gz
    -k rest_mask.nii.gz
    -m > mean_fALFF.txt ; mean=$( cat mean_fALFF.txt )
    
    fslstats
    fALFF.nii.gz
    -k rest_mask.nii.gz
    -s > std_fALFF.txt
    std=$( cat std_fALFF.txt )
    
    fslmaths
    fALFF.nii.gz
    -sub ${mean}
    -div ${std}
    -mas rest_mask.nii.gz
    fALFF_Z.nii.gz
    

High Level Workflow Graph:

images/generated/alff.png

Detailed Workflow Graph:

images/generated/alff_detailed.png

References

Examples

>>> alff_w = create_alff()
>>> alff_w.inputs.hp_input.hp = [0.01]
>>> alff_w.inputs.lp_input.lp = [0.1]
>>> alff_w.get_node('hp_input').iterables = ('hp', [0.01])
>>> alff_w.get_node('lp_input').iterables = ('lp', [0.1])
>>> alff_w.inputs.inputspec.rest_res = '/home/data/subject/func/rest_bandpassed.nii.gz'
>>> alff_w.inputs.inputspec.rest_mask= '/home/data/subject/func/rest_mask.nii.gz'
>>> alff_w.run() 
CPAC.alff.utils.get_opt_string(mask)[source]

Method to return option string for 3dTstat

Parameters:

mask (string) – Path to mask file

Returns:

opt_str – Command args

Return type:

string