Giter Club home page Giter Club logo

ca-fmri's Introduction

Welcome!

This repository contains code for reproducing results in the paper "Multimodal measures of spontaneous brain activity reveal both common and divergent patterns of cortical functional organization" (DOI: 10.21203/rs.3.rs-2823802/v1). If you have any questions, feel free to open an issue here or shoot me an email.

Introdution

This code base uses SVINET [1], a publicly available open-source software, to perform overlapping network analysis applied to a simultaneous dataset of cortex-wide Ca2+ imaging combined with fMRI in mice [2]. This algorithm was introduced in 2013 and has since been thoroughly tested and validated in various types of networks, including human fMRI networks, by our team [3] as well as others [4]. Additionally, we make extensive use of Python-based scientific computing libraries such as Numpy and SciPy for basic operations such as computing Pearson correlation, cosine similarity, averaging, etc.

Quick start guide

The following object classes were used in the main analysis. Full documentation to follow.

  • Network class (analysis/network.py) to generate adjacency matrices and save binarized graphs. Corresponding script: scripts/run_network.sh
  • SVINET class (analysis/svinet.py) to load overlapping communities (output from the main algorithm) and align them across random seeds for each individual run. Corresponding script: scripts/run_svinet.sh
  • Group class (analysis/group.py) to perform group analysis. Combines all runs by aligning and averaging them which yields the group results. Corresponding script: scripts/run_group.sh
  • Bootstrap class (analysis/bootstrap.py) to perform various statistical analysis on the data. Corresponding script: scripts/run_bootstrap.sh
  • LFR analysis (analysis/lfr.py) to perform community analysis on synthetic LFR graphs with known ground truths [5]. Corresponding script: scripts/run_lfr.sh

Please see scripts/examples.txt for a demonstration of how to execute these scripts.

Additional modules

  • Allen class (register/atlas.py) is a wrapper around the Allen SDK package. Used to extract brain masks, templates, and other type of information available within the CCFv3 common space [6].
  • Parcellation class (register/parcellation.py) creates a spatially homogeneous parcellation of the mouse cortex within CCFv3. Please refer to Methods section in ROI definition.
  • Register class (register/register.py) is used to co-register individual mouse brains to the CCFv3 common space, bring the ROIs to each individual's anatomical space, and extract functional data per ROI. Corresponding script: scripts/run_register.sh

Installation guide

The present codebase is built as a wrapper around SVINET and uses standard Python libraries. It has been tested on Ubuntu 22.04.2 LTS. For installation guide, please refer to the original sources:

Typical installing time for these packages is in the order of several minutes.

Documentation

Coming soon 🚧

References:

  1. Gopalan, Prem K., and David M. Blei. "Efficient discovery of overlapping communities in massive networks." PNAS 110, no. 36 (2013): 14534-14539.
  2. Lake, Evelyn MR, et al. "Simultaneous cortex-wide fluorescence Ca2+ imaging and whole-brain fMRI." Nature methods 17.12 (2020): 1262-1271.
  3. Najafi, Mahshid, et al. "Overlapping communities reveal rich structure in large-scale brain networks during rest and task conditions." Neuroimage 135 (2016): 92-106.
  4. Cookson, Savannah L., and Mark D’Esposito. "Evaluating the reliability, validity, and utility of overlapping networks: Implications for network theories of cognition." Human Brain Mapping 44.3 (2023): 1030-1045.
  5. Lancichinetti, A. and Fortunato, S., 2009. "Benchmarks for testing community detection algorithms on directed and weighted graphs with overlapping communities". Physical Review E, 80(1), p.016118.
  6. Wang, Q., et al. "The Allen mouse brain common coordinate framework: a 3D reference atlas." Cell 181.4 (2020): 936-953.

ca-fmri's People

Stargazers

 avatar

Watchers

Hadi Vafaii avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.