Giter Site home page Giter Site logo

neurodata / mcc Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 2.0 29.57 MB

Reproducible code for "Multiscale Comparative Connectomics"

Home Page: https://arxiv.org/abs/2011.14990

License: MIT License

Jupyter Notebook 99.27% Python 0.72% Shell 0.01%
connectomics graph-statistics

mcc's Introduction

Multiscale Comparative Connectomics

arXiv CodeOcean License: MIT

Reproducible code for the results shown in our manuscript Multiscale Comparative Connectomics (MCC).

Vivek Gopalakrishnan, Jaewon Chung, Eric Bridgeford, Benjamin D. Pedigo, Jesús Arroyo, Lucy Upchurch, G. Allan Johnson, Nian Wang, Youngser Park, Carey E. Priebe, and Joshua T. Vogelstein. “Multiscale Comparative Connectomics”. arXiv:2011.14990 (Nov. 2020).

Table of Figures and Tables

Click any link for individual instructions on how to generate that specific figure. Alternatively, execute the file code/run to generate all figures at once.

System Requirements

MCC uses both Python 3.8 and R 3.6.1. The analyses above depend on the following packages:

# Conda Python packages
jupyter==1.0.0
rpy2==3.3.6
statsmodels==0.12.1

# Pip install the latest version of graspologic
graspologic @ git+git://github.com/microsoft/graspologic@dev

# Conda R packages
r-base==3.6.1
bioconductor-complexheatmap==2.2.0
r-cairo==1.5_10
r-circlize==0.4.12
r-data.table==1.12.2
r-essentials==3.6.0
r-future==1.21.0
r-future.apply==1.7.0
r-ggplot2==3.1.1
r-globaloptions==0.1.2
r-igraph==1.2.4.1
r-mltools==0.3.5
r-tidyverse==1.2.1

# CRAN R packages
cdcsis==2.0.3

These analyses have been tested on macOS x64 and Linux x64.

Installation Instructions

We created a computational environment with these packages using a dedicated Miniconda kernel (should take about 5 mins to setup):

conda env create --file environment.yml --name mcc

To get rpy2 running on an M1 Mac, it's currently necessary to install it in API mode: RPY2_CFFI_MODE=API pip install rpy2. Also, it might be easier to install the R packages directly through the scripting interface instead of through conda since many compatibility conflicts haven't been resolved for new arm64 versions.

Reproducing Figures

Scripts to reproduce the figures in MCC are organized below.

Figure 1

  • Run code/1_statistical_framework_graphs.ipynb (expected runtime: 5 seconds)
  • This script uses igraph to generate the sample connectomes and graph models seen above Fig1

Figure 2

  • Run code/2_plot_adjacency_matrices.ipynb (expected runtime: 5 seconds)
  • This script uses ComplexHeatmap to generate average connectomes for each mouse strain Fig2

Figure 3

  • Run code/3_cc_emedding.ipynb (expected runtime: 5 seconds)
  • This script uses graspologic to embed the corpus callosum brain region of every mouse in a low-dimensional space Fig3

Figure 4

  • Run code/4a_identifying_signal_components.ipynb (expected runtime: 2 min)
  • This script uses graspologic and various k-sample hypothesis testing packages to identify the strongest signal edges, vertices, and communities Fig4

Tables 1-4

  • Run code/4b_format_signal_components_tables.ipynb (expected runtime: 30 seconds)
  • This script uses pandas to nicely format the results generated for Figure 4 into publication-ready tables
  • Tables are found in the Supplement of the MCC manuscript

Figure 5

  • Run code/5_whole_brain_emedding.ipynb (expected runtime: 5 seconds)
  • This script uses classical multidimensional scaling (cMDS) to embed the results of the omnibus embedding in a low-dimensional space Fig5

Figure 6

  • Run code/6_conditional_independence_anatomy.ipynb (expected runtime: 5 hours on a 48 core machine, probably much longer on a normal laptop)
  • This script uses cdcsis to compute a bunch of conditional independence tests
  • The purpose of this test is to determine if our methods recover information about network topology not encoded in neuroanatomy Fig6

mcc's People

Contributors

eigenvivek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

vpudi1 antecede

mcc's Issues

Update vertex-level simulation

The old simulation compared OMNI to {MASE, vertex-level network statistics}

Screen Shot 2021-04-05 at 12 02 40 PM

Proposed changes

Modify the algorithms being compared:

  • Add MDMR, DBS
  • Rename vertex-level network statistics -> exponential random graph model
  • Remove MASE

Performance metrics:

  • Replace the three separate plots per row with an ROC curve

Update edge-level simulation

The old simulation compared DCorr to {T-test and Mann-Whitney}

Screen Shot 2021-04-05 at 12 29 45 PM

Proposed changes

Modify the algorithms being compared:

  • Add NBS, TF-NBS, UminP

Performance metrics:

  • Replace the three separate plots per row with a covariate-adjusted ROC

Also include different p-value correction methods:

  • Compare Bonferroni, Bonf-Holm, Benj-Hoch, Benj-Yeku

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.