Skip to content

imaginelab/gene_viz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gene_viz

MIC HACK project repo

https://github.com/kwagstyl/matplotlib_surface_plotting/tree/main

Create environment

conda env create -f environment.yml
conda activate gene_viz

Add matplotlib_surface_plotting package

Git clone matplotlib_surface_plotting from mathrip github

git clone https://github.com/mathrip/matplotlib_surface_plotting.git

And install in environment

pip install -e . 

Getting started

Download the gene expression data

Download the data from: https://drive.google.com/file/d/1AGIcfsJ3sjG856I7vDKGcoGOGj8xKTHt/view?usp=sharing After unzipping, please put the "michack_project_data" directory in the location as the "gene_viz" library directory.

Get the cortical and subcortical mesh files

  1. Download the FSLR cortical mesh by running python gene_viz/downloaders/download_cortical_meshes.py. This will generate a folder gene_viz/data, and download the FSLR fs_LR.32k.<hemisphere>.pial.surf.gii mesh files into it.
  2. Generate the regional mesh files for the APARC and ASEG regions in MNI format by running python gene_viz/generate-meshes/create-surface-mesh.py. This will create a single mesh file <region>_meshfile.ply for each region and save them in gene_viz/data.

As a side note: Currently we are using fs LR surface meshes, they are a bit too smooth but they'll do for now. In the future, we would like to generate more tailored MNI152 meshes fit the MNI anatomy better. Further, the APARC and ASEG region meshes have still have some holes, likely due to the thin cortical band of the template we used. Future work should fix this.

Example images

expression_point_density (red is 10 points within 10mm): expression_point_density (red is 10 points within 10mm) SCN2A expression ith alpha based on point density: SCN2A_spatial_expression_alpha_point_density PVALB scatter: scatter_1

Example notebooks

Main notebook to plot gene expression : main_plotting

Notebook to plot the mesh and a plane : plot_plane_surface

About

MIC HACK project repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors