All Projects → MouseLand → stringer-pachitariu-et-al-2018a

MouseLand / stringer-pachitariu-et-al-2018a

Licence: other
Recordings of 10k neurons during spontaneous behaviors

Programming Languages

matlab
3953 projects
M
324 projects

Projects that are alternatives of or similar to stringer-pachitariu-et-al-2018a

Eegrunt
A Collection Python EEG (+ ECG) Analysis Utilities for OpenBCI and Muse
Stars: ✭ 171 (+297.67%)
Mutual labels:  neuroscience
Neurotech Course
CS198-96: Intro to Neurotechnology @ UC Berkeley
Stars: ✭ 202 (+369.77%)
Mutual labels:  neuroscience
Pyphi
A toolbox for integrated information theory.
Stars: ✭ 246 (+472.09%)
Mutual labels:  neuroscience
Opensesame
Graphical experiment builder for the social sciences
Stars: ✭ 173 (+302.33%)
Mutual labels:  neuroscience
Neurolib
Easy whole-brain modeling for computational neuroscientists 🧠💻👩🏿‍🔬
Stars: ✭ 188 (+337.21%)
Mutual labels:  neuroscience
Awesome Computational Neuroscience
A list of schools and researchers in computational neuroscience
Stars: ✭ 230 (+434.88%)
Mutual labels:  neuroscience
Erplab
ERPLAB Toolbox is a free, open-source Matlab package for analyzing ERP data. It is tightly integrated with EEGLAB Toolbox, extending EEGLAB’s capabilities to provide robust, industrial-strength tools for ERP processing, visualization, and analysis. A graphical user interface makes it easy for beginners to learn, and Matlab scripting provides enormous power for intermediate and advanced users.
Stars: ✭ 166 (+286.05%)
Mutual labels:  neuroscience
nengo-dl
Deep learning integration for Nengo
Stars: ✭ 76 (+76.74%)
Mutual labels:  neuroscience
Neurodocker
Generate custom Docker and Singularity images, and minimize existing containers
Stars: ✭ 198 (+360.47%)
Mutual labels:  neuroscience
Open Computational Neuroscience Resources
A publicly-editable collection of open computational neuroscience resources
Stars: ✭ 234 (+444.19%)
Mutual labels:  neuroscience
Dvid
Distributed, Versioned, Image-oriented Dataservice
Stars: ✭ 174 (+304.65%)
Mutual labels:  neuroscience
Brainrender
a python based software for visualization of neuroanatomical and morphological data.
Stars: ✭ 183 (+325.58%)
Mutual labels:  neuroscience
Brayns
Visualizer for large-scale and interactive ray-tracing of neurons
Stars: ✭ 232 (+439.53%)
Mutual labels:  neuroscience
Visbrain
A multi-purpose GPU-accelerated open-source suite for brain data visualization
Stars: ✭ 172 (+300%)
Mutual labels:  neuroscience
twpca
🕝 Time-warped principal components analysis (twPCA)
Stars: ✭ 118 (+174.42%)
Mutual labels:  neuroscience
Brainflow
BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
Stars: ✭ 170 (+295.35%)
Mutual labels:  neuroscience
Moabb
Mother of All BCI Benchmarks
Stars: ✭ 214 (+397.67%)
Mutual labels:  neuroscience
cyclops
Precision current source, with optional optical feedback, for driving LEDs and laser diodes
Stars: ✭ 38 (-11.63%)
Mutual labels:  neuroscience
artificial-neural-variability-for-deep-learning
The PyTorch Implementation of Variable Optimizers/ Neural Variable Risk Minimization proposed in our Neural Computation paper: Artificial Neural Variability for Deep Learning: On overfitting, Noise Memorization, and Catastrophic Forgetting.
Stars: ✭ 34 (-20.93%)
Mutual labels:  neuroscience
Brainiak
Brain Imaging Analysis Kit
Stars: ✭ 232 (+439.53%)
Mutual labels:  neuroscience

stringer-pachitariu-et-al-2018a

DOI

This code produces the figures from Stringer, Pachitariu et al, 2018a:

Carsen Stringer, Marius Pachitariu, Nicholas Steinmetz, Charu Bai Reddy, Matteo Carandini, Kenneth D. Harris Spontaneous behaviors drive multidimensional, brain-wide population activity https://www.biorxiv.org/content/10.1101/306019v2

It relies on data deposited on figshare at:

Carsen Stringer, Marius Pachitariu, Charu Bai Reddy, Matteo Carandini, Kenneth D. Harris Recordings of ten thousand neurons in visual cortex during spontaneous behaviors. (link)

and

Nicholas Steinmetz, Marius Pachitariu, Carsen Stringer, Matteo Carandini, Kenneth D. Harris Eight probe neuropixels recordings during spontaneous behaviors. (link)

Here's the two-photon data description. Please cite the paper and the figshare if you use the data.

The script 'processData.m' processes all the data. Set useGPU=0 if you do not have a GPU. The script 'mainFigs.m' calls all figure-producing scripts.

While this is useful for reproducing the paper, it does not easily allow building on the main analysis we do, or running these analyses on different data. Therefore, we will add separate scripts to run analyses one at at time, with the data clearly loaded at the top of the script, so you can swap yours in.

One such function that is easy to use is 'SVCA.m' which computes the cross-validated reliable variance of latent dimensions in the population activity.

How to load the 2P data into python

import scipy.io as sio
import numpy as np
mt = sio.loadmat('spont_M150824_MP019_2016-04-05.mat')
spks = mt[‘Fsp’]                   # neurons by timepoints
med = mt[‘med’]                 # cell centers (X Y Z)

### behavioral measures
runSpeed = mt[‘beh’][‘runSpeed’]    # running speed
# get motion SVDs (time x components)
motionSVD=np.array(mt['beh'][0]['face'][0]['motionSVD'][0][0])  
# get motion masks (pixelY x pixelX x components)
motionMask=np.array(mt['beh'][0]['face'][0]['motionMask’][0][0])     
# pupil area and com
pupilArea =np.array(mt['beh'][0]['pupil'][0][‘area'][0][0])  
pupilCOM =np.array(mt['beh'][0]['pupil'][0][‘com'][0][0])  

# cell statistics
mt[‘stat’][0]     # first cell’s stats
mt[‘stat’][0][‘npix’]       # one example field, tells you how pixels make up the cell

How to load the ephys data into python

from scipy import io

probeLoc = io.loadmat('/home/carsen/dm11/data/Spikes/eightprobes/probeLocations.mat')
probeBorders = io.loadmat('/home/carsen/dm11/data/Spikes/eightprobes/probeBorders.mat', squeeze_me=True)

mouse_names = ['Krebs','Waksman','Robbins']
# start of spontaneous activity in each mouse (in seconds)
tstart = [3811 3633 3323];

imouse = 0

spks = io.loadmat('/home/carsen/dm11/data/Spikes/eightprobes/spks/spks%s_Feb18.mat'%mouse_names[imouse], squeeze_me=True)
faces = io.loadmat('/home/carsen/dm11/data/Spikes/eightprobes/faces/%s_face_proc.mat'%mouse_names[imouse], squeeze_me=True)

# probe k
k = 0
# spike times (in seconds)
st = spks['spks'][k][0]
# clusters
clu = spks['spks'][k][1]
# cluster heights (in microns)
# (see siteCoords to convert to site location)
Wh = spks['spks'][k][2]

# processed faces
motSVD = faces['motionSVD']
video_timestamps = faces['times']

# where is the probe in the brain (consolidated labels)
# borders are in microns
# use Wh to determine which clusters are in which brain region
borders = probeBorders['probeBorders'][imouse]['borders'][k]
for j in range(len(borders)):
   b = borders[j]
   print('upper border %d, lower border %d, area %s'%(b[0],b[1],b[2]))
   wneurons = np.logical_and(Wh>=b[1], Wh<b[0])
   nn = wneurons.sum()
   print('%d neurons in %s'%(nn,b[-1]))
   
# where is the probe in the brain (in microns)
ccfCoords = probeLoc['probeLocations'][0][imouse]['probe'][k][0]['ccfCoords']
# name of area in Allen ontology by site on electrode
ccfNames = probeLoc['probeLocations'][0][imouse]['probe'][k][0]['ccfOntology']
# coordinates of each site on the electrode
siteCoords = probeLoc['probeLocations'][0][imouse]['probe'][k][0]['siteCoords']
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].