Developing an R package to analyze freesurfer data

There are some existing software/packages to analyze freesurfer data, however these software/packages require the use of the freesurfer home/subject directories. Making it difficult to take the analyses out of the server/HPC (where the data was preprocessed).

So i plan to develop a new R package, that takes .mgh (or converted into .rds) files as inputs (after recon-all and mris_preproc), instead of the entire freesurfer subject directory. For an N~200 subject dataset, this .mgh/.rds files would be around 19mb (for fsaverage5-spaced data), making it feasible to run the analyses on your own computers and in a classroom environment.

This approach also makes it easy to work with the freesurfer data from HCP dataset— you do not have download the full freesurfer subject directory, but only a few files per subjects

there is already a python toolbox (BrainStat : A toolbox for statistical analysis of neuroimaging data — BrainStat 0.4.2 documentation) that allows you to analyze freesurfer data without the needing a freesurfer subject directory. I’m planning to build on this, simplify the workflow, add additional features—i have currently managed to implement TFCE cluster-wise thresholding, and image decoding (using a curated neurosynth database)

So i would like to run this idea by everyone. Let me know if you have any suggestions or feedback