项目介绍

MouseLand/stringer-pachitariu-et-al-2018a 是一个托管在 GitHub 上的开源项目,主要使用 MATLAB 编写,目前获得 55 个 Star、16 次 Fork。

仓库全名
MouseLand/stringer-pachitariu-et-al-2018a
Star 数
55
Fork 数
16
未关闭 Issue
2

README 摘要

stringer-pachitariu-et-al-2018a 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,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

stringer-pachitariu-et-al-2018a 用什么语言开发?

主要使用 MATLAB 编写,目前有 55 个 Star。

如何获取 stringer-pachitariu-et-al-2018a 的源码?

可以直接克隆仓库:git clone https://github.com/MouseLand/stringer-pachitariu-et-al-2018a.git,默认分支为 master;安装与运行步骤见仓库 README。

stringer-pachitariu-et-al-2018a 最近还在维护吗?

仓库最近一次更新为 8月13日,当前有 2 个未关闭 Issue;Star 数为 55,可作为社区活跃度的参考。

关于

Recordings of 10k neurons during spontaneous behaviors

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
99
价值分
38
活跃状态
活跃

README

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

评论

暂无评论