Analysis code for replication and extension of results linking longitudinal white matter and reading development reported in Development of the Arcuate Fasciculus is Linked to Learning Gains in Reading (Roy et al. 2025).
To run this this code as is, you will need a valid FreeSurfer license, as well as access to a system with a Slurm job scheduler with Singularity installed. The Docker images used for preprocessing can be found here and the image used for reconstruction can be found here. These pipelines require that your data are organized in BIDS format.
We would like to note that we cannot share the raw data or derivatives used in these analyses but this repository does contain all the scripts used to generate the results reported in the manuscript.
The pipelines used to preprocess and process the data with pyAFQ can be found in the bash folder. To run both of these, you
will also need a subjects.txt file that lists each subject on a separate line. You will also need to update the various paths
to reflect the location of your FreeSurfer license and raw MRI data. To recreate the analysis pipeline, you will need to first run
submit_qsiprep.sh and once that finishes you will run submit_qsirecon.sh to generate pyAFQ outputs. The parameters used to run pyAFQ can be found in pyafq_tractometry.json.
We have also included two Jupyter Notebooks in the python directory to combine and harmonize the tract profile data generated by pyAFQ. You can recreate the conda environment used to run these notebooks using the environment.yml file. The notebook generate_combined_tract_profiles.ipynb includes code to combine the individual tract_profiles.csv files generated by pyAFQ.. You will have to update the pyafq_output_path variable to point to your qsirecon output directory. You will also have to indicate where to save the resulting combined_tract_profiles.csv. After running this notebook, you will have to run the code included in harmonize_data.ipynb to harmonize the tract profile data.
The code to recreate the results and figures presented in the manuscript are available in the files included in the R directory. You will first have to run run_mlvar_boot.R to generate bootstrapped estimates of the mlVAR path coefficients. You will then run the chunks in long_wm_results.Rmd to generate the various results, tables, and figures found in the manuscript. To run both of these files, you will have to update the paths to point to your harmonized tract profile and behavioral data.