/Neuroscience-PipelineAgreement

Analysis Code for Paper "Moving Beyond Processing and Analysis-Related Variation in Neuroscience"

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

Pipeline Agreement

DOI

Resources for the paper: Moving Beyond Processing and Analysis-Related Variation in Neuroscience

Data Running

The config folder contains C-PAC pipeline configuration files

  • minimal: pipeline configuration files for minimal preprocessing

  • fig4: pipeline configuration files for Fig. 4

  • figs3: pipeline configuration file for Fig. S3

To run C-PAC Docker container, use the command below:

docker run \
-v <local data directory>:/bids_dataset \
-v <local output directory>:/outputs \
-v /tmp:/scratch \
fcpindi/c-pac:release-v1.8.1 /bids_dataset /outputs participant \
--pipeline_file <pipeline configuration file> \
--save_working_dir

Replace <local data directory> and <local output directory> to your local directories, and replace <pipeline configuration file> to your pipeline configuration file path such as /outputs/default_pipeline.yml. For more details, please check C-PAC user documentation: https://fcp-indi.github.io/.

The preprocessed Schaefer200/600/1000 functional connectivity datasets can be found at https://osf.io/kgpu2/.

Visualization

The figure folder contains code to plot figures in the paper

Before running:

  1. Update .pipelineharmonizationrc with the applicable paths for your data.

  2. Run source .pipelineharmonizationrc before running any scripts.

  3. Run scripts (and IDEs like RStudio or Jupyter) from a terminal in which you've sourced .pipelineharmonizationrc

Figure 1

  • Update extract_ROI.sh to create soft links for functional timeseries and run 3dROIstats

  • Run run_ICC.sh

    • Results will be saved in the folder All_new_ICC_Schaefer200/600/1000_aggreg
  • Organize folders as below

/root
└── figures
    └── ICC_Schaefer200
        ├── pipeline1_pipeline2.csv
        └── ...
    └── ICC_Schaefer600
    └── ICC_Schaefer1000
└── ROI
    └── ROI_Schaefer200
        ├── pipeline1
        └── pipeline2
        └── ...
    └── ROI_Schaefer600
    └── ROI_Schaefer1000

Figure 2

Figure 3

  • Extract ROI
bash figure/3/extract_ROI.sh
  • Save the data for calculating ICC and I2C2
python3.8 figure/3/run_ICC.py 

Outputs will be saved in a folder called Data_ICC_1000_All_pearson (60x19k matrix)

bash figure/3/run_ICC_I2C2.sh

Outputs will be saved in a folder called ICC_1000_All_pearson (19k matrix)

Figure 4

Notes: The post-processing folder has extra processing scripts for several runs

Figure 5

Supplementary Figure 2

Supplementary Figure 3

Supplementary Figure 4

Supplementary Figure 5

Supplementary Figure 6

Supplementary Figure 7

Supplementary Figure 8

Supplementary Figure 9

Contributors

Contributors: Xinhui Li, Lei Ai, Greg Kiar

Acknowledgements: Thank Jon Clucas for code review and Anibal Sólon for technical support.