Git Product home page Git Product logo

allen-voxel-network's Introduction

allen-voxel-network

Tools for working with Allen Institute for Brain Science voxel-scale connectivity data.

Requirements:

  • numpy
  • scipy
  • h5py
  • allensdk (tested with 0.13.1, NOT guaranteed to work with later versions)
  • skimage, mayavi (optional, for visualization)

To fit connectomes:

Generating a voxel linear model

  1. Edit run_setup.py. This sets which structures will be included, the values of the regularization parameter, etc.
  2. python create_visual_matrices.py. This will create a hierarchy of directories for model fitting with nested cross-validation.
  3. Run the commands in model_fitting_cmds (located in the project directory) to perform the model fits.
  4. Run python model_select_and_fit.py. In the inner cross-validation loop, evaluate the errors and perform model selection.
  5. Run the commands in model_fitting_after_selection_cmds. This will fit the selected models.
  6. Run python region_model_fits_and_voxel_errors.py. This will both evaluate the errors of the voxel models as well as fit regional models and compare their errors to the voxel models.

Visualizing voxel model

  1. Run python voxel_model_visualizations.py. This performs fake injections into VISp, plotting the results. Also saves volumetric data & region labeled plot.
  2. You can turn the virtual injection pictures into a movie easily: avconv -q 4 -r 7 -b 9600 -i int_virt_inj%d.png movie.mp4
  3. You can visualize the volumetric data in VTK format (.vti files). Use Paraview.

Generating a regional model

First edit the following scripts to set the data and output directories, then run:

 python create_regional_matrices.py
 python run_new_regional_model.py

If you want to compare the output of this model to that from Oh et al. (2014), this can be accomplished with compare_new_old.py.

Flat cortex 2-D connectivity

Run in this order:

get_2d_connectivity.py
create_2d_matrices.py

Note that the streamlines needed to generate top view and flatmap 2-D cortical projections are available from CCF 2017 informatics.

allen-voxel-network's People

Contributors

kamdh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.