FNGS Demo

Hi guys, my name is Eric and I am going to walk you through the Functional Neurodata Graphs Service, a simple and easy to use processing pipeline and deployment strategy for functional MRI analysis.

To begin, please navigate yourself to the FNGS website, our website.

The FNGS pipeline is designed for cloud usage. In this demo, we provide 4 subjects worth of spatially and temporally downsampled MRI data from the DC1 dataset (part of the CoRR release) in the BIDs neuroimaging spec. Users should follow the markdown tutorial specifically listed at the top of the page to give it a go (that demo tutorial can also be found here). Of note, the demo will cost you approximately $.40 (the demo only needs the instances for 4 minutes, but AWS charges per hour) and will require some simple user configuration setup, in addition to a small tutorial required by AWS to use their batch software. Users will have to also have an S3 bucket named "fngs-test".

Once you have setup your AWS user, configured batch to run on your AWS account, and created a S3 bucket, simply navigate to the website demo tab, give your job a unique name, and selected the "functional" modality.

After launching our demo jobs, we can see that when we navigate back to the batch colsole window, we will have an environment and a queue:

Automatically created for us if one did not exist already. You can also navigate to the "Jobs" tab at the left of the image, and check out your newly created jobs. They should be in the runnable, starting, or running tab within a few seconds to a minute.

What we have just done is initiated the AWS Batch deployment for the FNGS pipeline:

Figure 1 The deployment workflow for the FNGS pipeline. Users provide a directory according to the BIDs spec to the FNGS cloud controller locally via the docker container at (1). The data is uploaded directly to AWS S3 cloud drives. The controller then initiates the Batch deployment procedure at (2.a), which interfaces between S3 and EC2 cloud computers to provide the MRI scans to EC2 instances pre-loaded with the FNGS pipeline for analysis. After the scans are finished being analyzed on the EC2 instances at (2.b), the results are then re-uploaded back to the S3 cloud drive at (2.c). The user can then navigate to the S3 cloud drive for downstream analyses.

Delving a little bit deeper into the pipeline itself, while waiting for our jobs to finish we can check out the "about" tab, which links us to an interactive overview of the methods employed by the FNGS pipeline. Note that the image headers are fully interactive, and contain some useful information about the algorithms employed by FNGS. This page is under active development as we further document and refine the algorithms we are using.

Step Tool(s) leveraged
Preprocessing mcflirt (FSL), slicetimer (FSL)
Registration FLIRT (FSL), FLIRT-bbr (FSL), FNIRT (FSL), MNI 152 Template (MNI)
Nuisance Neurodata Code (Neurodata)
Timeseries Extraction/Connectome Estimation Parcellation Atlases

Table 1: the code and dependencies leveraged at each stage of the FNGS pipeline.

To run the FNGS pipeline locally, feel free to try out our local demo.

Now that it's been about 5 minutes, we can see by checking out S3 that our scans have indeed finished processing. Peering into S3, we can see that we have the demo data uploaded, and our results from the FNGS pipeline right along side it.

Due to this being heavily downsampled data for time and spatial constraints, many of the resulting outputs are not of ideal quality, however, they will certainly give you a feel for the organization and layout of the pipeline and its derivatives:

Figure 2: Registration Quality. Despite our brain being heavily downsampled, we can see that we are able to accurately register our functional brain to the template MNI152 atlas. The epi sequence is shown in green, overlaid in the MNI152 skull. This file can be found at 'ndmg_0_0_49/qa/sub-0025864_ses-2_bold/reg/func/align/preproc/template/fnirt_score_705/sub-0025864_ses-2_bold_aligned.png' after you have run the demo.

Figure 3: Nuisance Correction retains contrast. In our above image, we can see the voxelwise contrast-to-noise, defined as the standard deviation of the given voxel (the "contrast") divided by the average standard deviation of the background (the "noise"). Despite our image being nuisance corrected, including mean-centered, we can see that the brain regions retain a high contrast relative the background. This file can be found at 'ndmg_0_0_49/qa/sub-0025864_ses-2_bold/ts_voxel/sub-0025864_ses-2_bold_nuis_cnr.png' after you have run the demo. Note that most of the high contrast voxels are concentrated in the gray matter areas. With higher resolution data, this observation is even more pronounced.

As the data is only 10 timesteps total (trimmed to 8 timesteps by the end since we remove the first 2 timepoints from analysis) the roi timeseries outputs are not very insightful, but feel free to play around with your own data locally following our local tutorial, or follow our full submission tutorial if you are comfortable with how to configure your AWS account.

I appreciate your time, and feel free to reach out to me at ericwb95@gmail.com if you have any questions or feedback for improvement!


In [ ]:


In [ ]: