Whole-brain, all-optical interrogation of neuronal dynamics underlying gut and vascular interoception in zebrafish.
The 5 matches
- [1] § Methods › Segmentation and time series extraction ↔ src/voluseg/_steps/step4d.py, lines 18–139 · score 0.77 · temporal footprints, matrix factorization, spatial footprints, copy, squares, voxels
- [2] § Methods › Gut-responsive cell selection ↔ gutBrainCode/gutBrainPipeline.py, lines 442–530 · score 0.69 · gut pulses, parts model, full model, rank, lag, regression
- [3] § Methods › Estimation of imaging resolution ↔ ijplugin/src/ImageDecorrelationAnalysis_.java, lines 314–396 · score 0.67 · ImageJ, ImageDecorrelationAnalysis, plugin, Ng, Nr, resolution
- [4] § Results ↔ gutBrain_cellSelection_example.ipynb, lines 54–69 · score 0.57 · motor activity, visual stimulation, UV stimulation, cells, gut, brain
- [5] § Methods › Regression analysis ↔ gutBrainCode/gutBrainPipeline.py, lines 622–637 · score 0.52 · ridge regularization strength, vector, matrix, Regression
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 788 lines · 30 KB · MIT · 2 matches
- # -*- coding: utf-8 -*-
- """
- Main Code for the gut-brain analysis pipeline
- """
- import h5py
- import numpy as np
- import scipy
- from scipy.optimize import curve_fit
- import matplotlib.pyplot as plt
- def windowed_variance(signal, kern_mean=None, kern_var=None, fs=6000):
- """
- Estimate smoothed sliding variance of the input signal
- signal : numpy array
- kern_mean : numpy array
- kernel to use for estimating baseline
- kern_var : numpy array
- kernel to use for estimating variance
- fs : int
- sampling rate of the data
- """
- from scipy.signal import gaussian, fftconvolve
- # set the width of the kernels to use for smoothing
- kw = int(0.04 * fs)
- if kern_mean is None:
- kern_mean = gaussian(kw, kw // 10)
- kern_mean /= kern_mean.sum()
- if kern_var is None:
- kern_var = gaussian(kw, kw // 10)
- kern_var /= kern_var.sum()
- mean_estimate = fftconvolve(signal, kern_mean, "same")
- var_estimate = (signal - mean_estimate) ** 2
- fltch = fftconvolve(var_estimate, kern_var, "same")
- return fltch, var_estimate, mean_estimate
- def load(in_file, num_channels=10, memmap=False):
- """Load multichannel binary data from disk, return as a [channels,samples] sized numpy array
- """
- from numpy import fromfile, float32
- if memmap:
- from numpy import memmap
- data = memmap(in_file, dtype=float32)
- else:
- with open(in_file, "rb") as fd:
- data = fromfile(file=fd, dtype=float32)
- trim = data.size % num_channels
- # transpose to make dimensions [channels, time]
- data = data[: (data.size - trim)].reshape(data.size // num_channels, num_channels).T
- if trim > 0:
- print("Data needed to be truncated!")
- return data
- def loadGutBrainData(baseDir:str):
- """
- Loads gut brain data from a defined path baseDir
- INPUTS:
- baseDir : path to data
- OUTPUTS:
- dffTrace, brainMap, VMask, V,W,X,Y,Z,nT
- """
- #Gather some naming stuff
- cellPath = baseDir + "/mika/cells0_clean.hdf5"
- metaPath = baseDir +"/ephys/channel_meta.npy"
- vName = baseDir + "/mika/volume0.hdf5"
- ephysPath = baseDir+'/ephys/eP.26chFlt-v10'
- # Load cell time series and ephys data
- f = h5py.File(cellPath,'r')
- a = h5py.File(vName,'r')
- ephysFile = load(ephysPath,26)
- ep = np.load(metaPath, allow_pickle = True).item()
- #Read data components
- F=f['cell_timeseries']
- base_f=f['cell_baseline']
- X=f['cell_x']
- Y=f['cell_y']
- Z=f['cell_z']
- brainMap=a['volume_mean'][:,:,:].T
- VMask=a['volume_mask'][:,:,:].T
- V=f['volume_weight']
- W=f['cell_weights'][()]
- # Pull out some basic aspects of the data
- nCells = X.shape[0]
- nT = F.shape[1]
- # Compute df/f using response time series and baseline
- dffTrace=(F[:,:]-base_f[:,:])/(base_f[:,:]-100) #100 is camera backgroud in spim2
- return dffTrace, ep, ephysFile,brainMap, VMask, V,W,X,Y,Z,nT,nCells,F
- def pullTimes(ephysFile, lsChannel, uvChannel,galvoChannel,thresh):
- """Pulls the timing of imaging frames, uv pulses, and galvo positions. Also finds which stacks occur concurrently with the UV
- INPUTS:
- ephysFile : ch janelia form ephys file
- lsChannel : lightsheet channel in ephys file
- uvChannel : uv chennel in ephys file
- galvoChannel : galvo channel in ephys file
- thresh : thresh for detecting changes
- OUTPUTS:
- stackTimes : stackTimes (in ephys freq)
- uvTimes : uv times
- badStacks : which stacks occur with uv
- endGalvo: where the galvo ended up during the imaging stack"""
- lsAbove = np.where(np.append(ephysFile[lsChannel],[thresh+1])>thresh)[0]
- stackTimes = lsAbove[np.where(np.diff(lsAbove)>1)[0]]
- uvAbove = np.where(np.append(ephysFile[uvChannel],[thresh+1])>thresh)[0]
- uvTimes = uvAbove[np.where(np.diff(uvAbove)>1)[0]]
- galvoVals = ephysFile[galvoChannel][uvTimes]
- whichStack = np.zeros(len(uvTimes))
- galvoPos = np.zeros(len(uvTimes))
- #if (np.sum(galvoPos)==0):## issue with alignment of uv and lightsheet
- # galvoPoses = np.where(ephysFile[galvoChannel]>0)[0]
- # galvoVals2 = ephysFile[galvoChannel][galvoPoses]
- # for i in range(0,len(uvTimes)):
- # galvoVals[i] = galvoVals2[np.where(galvoPoses<uvTimes[i])][-1]
- for i in range(0,len(uvTimes)):
- if uvTimes[i] < stackTimes[-1]:
- whichStack[i] = np.where(stackTimes>uvTimes[i])[0][0]-1
- galvoPos[i] = galvoVals[i]
- #whichStack[i] = np.where((stacktimes > 2) & (A < 8))
- [badStacks, idx] = np.unique(whichStack,return_index=True)
- badStacks = badStacks.astype(int)
- endGalvo = galvoPos[idx]
- return stackTimes, uvTimes, badStacks,endGalvo
- def getTrainsTwoTypes(ephysFile,ep,lsChannel,uvChannel,thresh,gutPos,ctrlPos,tailPos,nT):
- """Pulls the stim times of useable trials for gut and ctrl
- INPUTS:
- ephysFile : ch janelia form ephys file
- ep : ephys meta file
- lsChannel : lightsheet channel in ephys file
- uvChannel : uv chennel in ephys file
- thresh : threshold for detecting ls imaging frames
- gutPos : which integer UV position corresponds to gut pulses
- ctrlPos : same as above, but for ctrl
- nT : length of time series data
- OUTPUTS:
- uvOnGut:times of uv gut pulses
- uvOffGut: times of uv ctrl pulses
- onTrain: times series (nT vector) of uv gut pulses
- offTrain: time series (nT vector) of ctrl pulses
- sp: swim power
- visClosed: closed loop vis
- visOpen: open loop vis
- visISI: stationary grating
- visOpenGut: gut vis
- visISIGut: gut isi
- visOpenCtrl: ctrl vis
- visISICtrl: ctrl isi
- """
- stackTimes, uvTimes,badStacks,galvo = pullTimes(ephysFile,lsChannel,uvChannel,ep['ch_gpos'],thresh)
- uvStackTimes = badStacks[np.where(np.diff(badStacks)>1)[0]]
- galvoPos = galvo[np.where(np.diff(badStacks)>1)[0]]
- uvOnGut = uvStackTimes[np.where(galvoPos==gutPos)[0]]
- uvOffGut = uvStackTimes[np.where(galvoPos==ctrlPos)[0]]
- uvOnTail= uvStackTimes[np.where(galvoPos==tailPos)[0]]
- if uvOnGut[-1]+50<nT:
- uvOnGut=uvOnGut[:-1]
- onTrain = np.zeros(nT)
- offTrain = np.zeros(nT)
- tailTrain = np.zeros(nT)
- for i in range(0,len(uvOnGut)):
- onTrain[uvOnGut[i]] = 1
- for i in range(0,len(uvOffGut)):
- offTrain[uvOffGut[i]]=1
- for i in range(0,len(uvOnTail)):
- tailTrain[uvOnTail[i]]=1
- swim1 = ephysFile[0]
- swim2 = ephysFile[1]
- swimPower1 = windowed_variance(swim1)[0]
- swimPower2 = windowed_variance(swim2)[0]
- sp = (swimPower1[stackTimes]+swimPower2[stackTimes])/2
- vsG = ephysFile[15]
- vsV = ephysFile[13]
- visISI = np.zeros(len(vsV))
- visOpen = np.zeros(len(vsV))
- visClosed = np.zeros(len(vsV))
- visClosed[np.where((vsG>0) &(vsV>0))[0]]=1 # Closed Loop
- visOpen[np.where((vsG==0) &(vsV>0))[0]]=1 # Open Loop
- visISI[np.where(vsV==0)[0]]=1 # ISI
- visOpen = visOpen[stackTimes]
- visClosed = visClosed[stackTimes]
- visISI = visISI[stackTimes]
- visOpenGut =visClosed.copy()
- visISIGut = visISI.copy()
- visOpenCtrl = visClosed.copy()
- visISICtrl = visISI.copy()
- startGutInd = np.where(onTrain>0)[0][0]
- endGutInd = np.where(onTrain>0)[0][-1]
- visOpenCtrl[startGutInd:endGutInd+1] = 0
- visISIGut[:startGutInd-1] = 0
- visISIGut[endGutInd+1:] = 0
- visOpenGut[:startGutInd-1] = 0
- visOpenGut[endGutInd+1:] = 0
- visISICtrl[startGutInd:endGutInd+1]=0
- isGutPeriod = np.zeros(len(visOpen))
- isCtrlPeriod = np.zeros(len(visOpen))
- if uvOffGut[0]<uvOnGut[0]:
- onFirst = 0
- isCtrlPeriod[:uvOnGut[0]]=1
- isGutPeriod[uvOnGut[0]:]=1
- visGut = visOpen.copy()
- visGut*=isGutPeriod
- visISIGut = visISI.copy()
- visISIGut *=isGutPeriod
- visISICtrl = visISI.copy()*isCtrlPeriod
- visCtrl = visOpen.copy()*isCtrlPeriod
- return uvOnGut,uvOffGut,uvOnTail, onTrain, offTrain,tailTrain,sp,visClosed, visISI,visGut,visISIGut,visISICtrl,visCtrl,visOpen
- def getTrains(ephysFile,ep,lsChannel,uvChannel,thresh,gutPos,ctrlPos,nT):
- """Pulls the stim times of useable trials for gut and ctrl
- INPUTS:
- ephysFile : ch janelia form ephys file
- ep : ephys meta file
- lsChannel : lightsheet channel in ephys file
- uvChannel : uv chennel in ephys file
- thresh : threshold for detecting ls imaging frames
- gutPos : which integer UV position corresponds to gut pulses
- ctrlPos : same as above, but for ctrl
- nT : length of time series data
- OUTPUTS:
- uvOnGut:times of uv gut pulses
- uvOffGut: times of uv ctrl pulses
- onTrain: times series (nT vector) of uv gut pulses
- offTrain: time series (nT vector) of ctrl pulses
- sp: swim power
- visClosed: closed loop vis
- visOpen: open loop vis
- visISI: stationary grating
- visOpenGut: gut vis
- visISIGut: gut isi
- visOpenCtrl: ctrl vis
- visISICtrl: ctrl isi
- """
- stackTimes, uvTimes,badStacks,galvo = pullTimes(ephysFile,lsChannel,uvChannel,ep['ch_gpos'],thresh)
- uvStackTimes = badStacks[np.where(np.diff(badStacks)>1)[0]]
- galvoPos = galvo[np.where(np.diff(badStacks)>1)[0]]
- uvOnGut = uvStackTimes[np.where(galvoPos!=ctrlPos)[0]]
- uvOffGut = uvStackTimes[np.where(galvoPos==ctrlPos)[0]]
- if uvOnGut[-1]-50>nT:
- uvOnGut=uvOnGut[:-1]
- onTrain = np.zeros(nT)
- offTrain = np.zeros(nT)
- for i in range(0,len(uvOnGut)):
- onTrain[uvOnGut[i]] = 1
- for i in range(0,len(uvOffGut)):
- offTrain[uvOffGut[i]]=1
- swim1 = ephysFile[0]
- swim2 = ephysFile[1]
- swimPower1 = windowed_variance(swim1)[0]
- swimPower2 = windowed_variance(swim2)[0]
- sp = (swimPower1[stackTimes]+swimPower2[stackTimes])/2
- vsG = ephysFile[15]
- vsV = ephysFile[13]
- visISI = np.zeros(len(vsV))
- visOpen = np.zeros(len(vsV))
- visClosed = np.zeros(len(vsV))
- visClosed[np.where((vsG>0) &(vsV>0))[0]]=1 # Closed Loop
- visOpen[np.where((vsG==0) &(vsV>0))[0]]=1 # Open Loop
- visISI[np.where(vsV==0)[0]]=1 # ISI
- visOpen = visOpen[stackTimes]
- visClosed = visClosed[stackTimes]
- visISI = visISI[stackTimes]
- visOpenGut =visClosed.copy()
- visISIGut = visISI.copy()
- visOpenCtrl = visClosed.copy()
- visISICtrl = visISI.copy()
- startGutInd = np.where(onTrain>0)[0][0]
- endGutInd = np.where(onTrain>0)[0][-1]
- visOpenCtrl[startGutInd:endGutInd+1] = 0
- visISIGut[:startGutInd-1] = 0
- visISIGut[endGutInd+1:] = 0
- visOpenGut[:startGutInd-1] = 0
- visOpenGut[endGutInd+1:] = 0
- visISICtrl[startGutInd:endGutInd+1]=0
- isGutPeriod = np.zeros(len(visOpen))
- isCtrlPeriod = np.zeros(len(visOpen))
- visGut = visOpen.copy()
- visGut*=isGutPeriod
- visISIGut = visISI.copy()
- visISIGut *=isGutPeriod
- visISICtrl = visISI.copy()*isCtrlPeriod
- visCtrl = visOpen.copy()*isCtrlPeriod
- return uvOnGut,uvOffGut, onTrain, offTrain,sp,visClosed, visISI,visGut,visISIGut,visISICtrl,visCtrl,visOpen
- def shift(xs, n):
- """Helper fucntion to construct shifted time series. pads with zeros.
- Inputs:
- xs : time series
- n : shift degree
- Outputs:
- e: shifted time series"""
- e = np.empty_like(xs)
- if n >= 0:
- e[:n] = 0
- e[n:] = xs[:-n]
- else:
- e[n:] = 0
- e[:n] = xs[-n:]
- return e
- class fusedLoocv:
- """Runs 'Fused' regression with LOOCV.
- INPUTS (init):
- order : length of longest lag period (for gut and ctrl UV)
- lambdaRidge : ridge penalty
- lambdaSmooth : smoothing penalty
- INPUTS (running models):
- cellData: nCell x nT matrix of cell data
- fullReg: nT x nDim matrix of regression data for the full model
- fullType: nDim vector of lag orders for the full model
- partReg: nT x nDim matrix of regression data for the part model
- partType: nDim vector of lag orders for the part model
- trialTimes: gut pulse times"""
- def __init__(self,order,lambdaRidge,lambdaSmooth):
- "Init"
- self.order = order
- self.lambdaRidge = lambdaRidge
- self.lambdaSmooth = lambdaSmooth
- def constructLag(self,toReg,n):
- """Constructs lag matrix for regression for a single dimension
- INPUTS:
- toReg : vector of data to shift
- n : shift order
- OTUPUTS:
- xMat : lag matrix for a single dimension"""
- xMat = np.zeros((len(toReg),n))
- xMat[:,0] = toReg
- for i in range(1,n):
- xMat[:,i] = shift(toReg,i)
- return xMat
- def makeInputMats(self,testReg,trainReg,typeVec):
- """Constructs the lag regression matrix from individual regression vectors
- INPUTS:
- testReg : regression matrix for testing
- trainReg : regression matrix for training
- typeVec : vector of lag orders for testReg and trainReg
- OUTPUTS:
- trainXMat : final regression matrix for training of size (nT x sum(typeVec)+1)
- testXMat : same as above for testing"""
- trainXMat = []
- testXMat = []
- if trainReg.ndim>1:
- for i in range(0,len(trainReg)):
- if typeVec[i]>1:
- trainXMat.append(self.constructLag(trainReg[i,:],typeVec[i]))
- testXMat.append(self.constructLag(testReg[i,:],typeVec[i]))
- else:
- temp = np.zeros((trainReg.shape[1],1))
- temp2 = np.zeros((testReg.shape[1],1))
- temp[:,0] = trainReg[i,:]
- temp2[:,0] = testReg[i,:]
- trainXMat.append(temp)
- testXMat.append(temp2)
- else:
- trainXMat.append(self.constructLag(trainReg,typeVec[0]))
- testXMat.append(self.constructLag(testReg,typeVec[0]))
- trainXMat = np.hstack(trainXMat)
- testXMat = np.hstack(testXMat)
- return trainXMat, testXMat
- def makePsiMats(self,fullType,partType):
- """Construct Psi matrices (difference matrices + ridge matrices)
- INPUTS:
- fullType: vector of lag orders for the full model
- partType : vector of lag orders for the part model"""
- fullD = np.zeros((np.sum(fullType),np.sum(fullType)))
- partD = np.zeros((np.sum(partType),np.sum(partType)))
- testD = np.zeros((self.order,self.order))
- for i in range(1,self.order-1):
- testD[i,i] = 2
- testD[i-1,i]=-1
- testD[i+1,i] = -1
- testD[0,0] = 1
- testD[1,0] = -1
- testD[self.order-1,self.order-1]=1
- testD[self.order-2,self.order-1]=-1
- fullD[:self.order,:self.order] = testD
- fullD[self.order:2*self.order,self.order:2*self.order] = testD
- partD[:self.order,:self.order] = testD
- fullD = np.dot(fullD.T,fullD)*self.lambdaSmooth+ np.eye(np.sum(fullType))*self.lambdaRidge
- partD=np.dot(partD.T,partD)*self.lambdaSmooth + np.eye(np.sum(partType))*self.lambdaRidge
- return fullD,partD
- def runBothModels(self,cellData,fullReg,fullType,partReg,partType,trialTimes):
- """Run the model
- INPUTS:
- cellData : nCell x nT matrix of cell data
- fullReg : raw regression data for the full model (nT x nDim)
- partReg : same, but for the part model
- fullType: vector of lag orders for hte full model
- partType: same, but for part model
- trialTimes : times for UV gut pulses for LOOCV
- OUTPUTS:
- betaHats : full coefficient matrix of model for full model (nDim x nTrials x nCell)
- betaHats2 : same as above, but for the part model
- yHats: yHat data for full model (nT x nTrials x nCells)
- yHats2 : same as above for part model
- allY : true data (nT x nTrials x nCells)
- rmse : rmse matrix for model 1
- rmse2 : rmse for model2
- corr : corr for model 1
- corr2 : corr for model2
- data : data used in regression
- reg1 : reg mat for 1
- reg2 :
- type1 : lag orders for 1
- type2 : lag order for 2
- """
- self.reg1 = fullReg
- self.reg2 = partReg
- self.typ1 = fullType
- self.type2 = partType
- self.trialTimes= trialTimes
- nCells = len(cellData)
- fullRMSE = np.zeros((len(trialTimes),len(cellData)))
- partRMSE = np.zeros((len(trialTimes),len(cellData)))
- fullCorr = np.zeros((len(trialTimes),len(cellData)))
- partCorr = np.zeros((len(trialTimes),len(cellData)))
- allFullBetaHats = np.zeros((np.sum(fullType),len(trialTimes),nCells))
- allPartBetaHats = np.zeros((np.sum(partType),len(trialTimes),nCells))
- allFullYHats = np.zeros((self.order+10,len(trialTimes),nCells))
- allPartYHats = np.zeros((self.order+10,len(trialTimes),nCells))
- allY = np.zeros((self.order+10,len(trialTimes),nCells))
- ## Get Psi
- fullPsi, partPsi = self.makePsiMats(fullType,partType)
- for i in range(0,len(trialTimes)): # Loop over trials
- print('Running trial '+ str(i+1) +' of '+ str(len(trialTimes)+1))
- toDel = np.arange(trialTimes[i]-10,trialTimes[i]+self.order,1)
- trainData = np.delete(cellData.copy(),toDel,axis=1)
- testData = cellData[:,trialTimes[i]-10:trialTimes[i]+self.order]
- fullTrainReg = np.delete(fullReg.copy(),toDel,axis=1)
- fullTestReg = fullReg[:,trialTimes[i]-10:trialTimes[i]+self.order]
- toDelPart = np.arange(trialTimes[i]-10,trialTimes[i]+self.order,1)
- trainDataPart = np.delete(cellData.copy(),toDelPart,axis=1)
- if partReg.ndim >1:
- partTrainReg = np.delete(partReg.copy(),toDelPart,axis=1)
- partTestReg = partReg[:,trialTimes[i]-10:trialTimes[i]+self.order]
- else:
- partTrainReg =np.delete(partReg.copy(),toDelPart)
- partTestReg = partReg[trialTimes[i]-10:trialTimes[i]+self.order]
- fullTrainX, fullTestX = self.makeInputMats(fullTestReg,fullTrainReg,fullType)
- partTrainX, partTestX = self.makeInputMats(partTestReg,partTrainReg,partType)
- fullBetaHat = np.dot(np.linalg.inv(np.dot(fullTrainX.T,fullTrainX)+fullPsi),np.dot(fullTrainX.T,trainData.T))
- partBetaHat = np.dot(np.linalg.inv(np.dot(partTrainX.T,partTrainX)+partPsi),np.dot(partTrainX.T,trainDataPart.T))
- fullYHat = np.dot(fullTestX,fullBetaHat)
- partYHat = np.dot(partTestX,partBetaHat)
- allFullBetaHats[:,i,:] = fullBetaHat
- allPartBetaHats[:,i,:] = partBetaHat
- allFullYHats[:,i,:] = fullYHat
- allPartYHats[:,i,:] = partYHat
- allY[:,i,:] = testData.T
- fullRMSE[i,:] = np.mean(np.sqrt((fullYHat-testData.T)**2),axis=0)
- partRMSE[i,:] = np.mean(np.sqrt((partYHat-testData.T)**2),axis=0)
- fullCorr[i,:] = corr(fullYHat,testData.T)#c(rankY, rankFull)
- partCorr[i,:] = corr(partYHat,testData.T)#c(rankY,rankPart)
- self.betaHats = allFullBetaHats
- self.betaHats2 = allPartBetaHats
- self.yHats = allFullYHats
- self.yHats2 = allPartYHats
- self.allY = allY
- self.rmse = fullRMSE
- self.rmse2 = partRMSE
- self.corr = fullCorr
- self.corr2 = partCorr
- self.data = cellData
- def corr(a,b):
- """Fast row-wise correlation between two matrices of same size"""
- p1 = a-np.mean(a,axis=0)
- p2 = b-np.mean(b,axis=0)
- num = np.mean(p1*p2,axis=0)
- p3 = np.std(a,axis=0)
- p4 = np.std(b,axis=0)
- den = p3*p4
- c = num/den
- return c
- def pullCells(mod,thresh:float,pThresh: float,prePulseInds: int, postPulseInds: int,uvOnGut,uvOffGut):
- """Pulls gut-related cells
- INPUTS:
- mod : the regression class
- thresh : correlation threshold (full) for pulling cells
- pThresh : alpha value for comparing parts and full models
- OUTPUTS:
- firstPass : cells with corr > thresh
- secondPass : firstPass AND better corr for full model than parts
- thridPass : secondPass AND better rmse for full model than parts"""
- # Pull cells with mean corr > thresh
- mnCorr = np.mean(mod.corr,axis=0)
- firstPass = np.where(mnCorr>thresh)[0]
- #Pull cells with statistically better corr to full than parts
- secondPassP = np.zeros(len(firstPass))
- firstPassFull = mod.corr[:,firstPass]
- firstPassParts = mod.corr2[:,firstPass]
- for i in range(0,len(firstPass)):
- d= firstPassFull[:,i]-firstPassParts[:,i]
- secondPassP[i] = scipy.stats.wilcoxon(d,alternative = 'greater')[1]
- secondPass = firstPass[np.where(secondPassP<pThresh)[0]]
- pValues = secondPassP[np.where(secondPassP<pThresh)[0]]
- testDFF = mod.data[secondPass,:]
- onPulseResponse = np.zeros((postPulseInds+prePulseInds,len(secondPass),len(uvOnGut)))
- offPulseResponse = np.zeros((postPulseInds+prePulseInds,len(secondPass),len(uvOffGut)))
- for i in range(0,len(uvOnGut)):
- onPulseResponse[:,:,i] = testDFF[:,uvOnGut[i]-prePulseInds:uvOnGut[i]+postPulseInds].T
- for i in range(0,len(uvOffGut)):
- offPulseResponse[:,:,i] = testDFF[:,uvOffGut[i]-prePulseInds:uvOffGut[i]+postPulseInds].T
- rankP = np.zeros(len(secondPass))
- for i in range(0,len(secondPass)):
- rankP[i] = scipy.stats.ranksums(np.max(onPulseResponse[:18,i,:],axis=0),np.max(offPulseResponse[:18,i,:],axis=0))[1]
- thirdPass = secondPass[np.where(rankP<pThresh)[0]]
- rankP = rankP[np.where(rankP<pThresh)[0]]
- return firstPass, secondPass,thirdPass, pValues, rankP
- def pullCellMasks(W,V,X,Y,Z,whichCells):
- """Pulls masks for making brain maps
- INPUTS:
- W,V,W,Y,Z : outputs from Mika's pipeline
- whichCells : which cells to mask (gut-sensitive)
- OUTPUTS:
- maskAll : masks for brain map"""
- maskW = np.zeros(V.shape)
- ww = W[whichCells]
- for i in (range(0,len(whichCells))):
- ww = W[whichCells[i]]
- xx,yy,zz = X[whichCells[i]],Y[whichCells[i]],Z[whichCells[i]]
- maskW[xx,yy,zz] = np.maximum(maskW[xx,yy,zz],ww)
- maskW =np.ma.masked_where((maskW ==0), maskW)
- return maskW
- def makeBrainMap(brainMap,maskAll):
- """Makes a quick brain map from selected cells
- INPUTS:
- brainMap : map from Mika's pipeline
- maskAll : selected cell Mask
- OUTPUTS:
- NA"""
- plt.figure(figsize=(10, 10))
- fig, axs = plt.subplots(nrows=1, ncols=2, sharex='col',figsize=(18, 10 ))
- ax_im1 = axs[0]
- ax_im2 = axs[1]
- im1_m=ax_im1.imshow(brainMap[:,:,:-1].max(axis=2).T, vmin=100,vmax=np.percentile(brainMap[:].squeeze(), 99.98),cmap='gray')
- im1_0 = ax_im1.imshow(maskAll[:,:,:-1].max(axis=2).T, cmap='magma',alpha=0.5,vmin=0,vmax=0.0025)
- im2_m=ax_im2.imshow(np.flip(brainMap[:,:,:-1].max(axis=1).T,axis=0), cmap='gray',vmin =100, vmax=np.percentile(brainMap[:].squeeze(), 99.98),aspect=6,interpolation='nearest')
- im2=ax_im2.imshow(np.flip(maskAll[:,:,:-1].max(axis=1).T,axis=0), vmin = 0,vmax=0.005,cmap='magma',alpha=0.5,aspect=6,interpolation='nearest')
- def fusedRidge(y,toReg,orderVec,lambdaRidge,lambdaSmooth):
- """Runs the fused ridge regression
- INPUTS:
- y : matrix (nCells x nT) of neural data
- toReg : matrix (nRegressors x nT) of regressor data
- orderVec : vector (of size nRegressors) of lag orders
- lambdaRidge : ridge regularization strength
- lambdaSmooth : smooth regularization strength
- OUTPUTS:
- betaHat : matrix (sum(orderVec) x nCells)
- yHat : matrix (nT x nCells) of predicted data"""
- psiMat = makePsiMat(orderVec,2,10) # construct psi matrix
- xMat = makeInputMat(toReg,orderVec) #
- betaHat = np.dot(np.linalg.inv(np.dot(xMat.T,xMat)+psiMat),np.dot(xMat.T,y.T))
- yHat = np.dot(xMat,betaHat)
- return betaHat, yHat,xMat
- ############################ Fused Ridge Helper Functions #################
- def constructLag(toReg,n):
- """Constructs lag matrix for regression for a single dimension
- INPUTS:
- toReg : vector of data to shift
- n : shift order
- OTUPUTS:
- xMat : lag matrix for a single dimension"""
- xMat = np.zeros((len(toReg),n))
- xMat[:,0] = toReg
- for i in range(1,n):
- xMat[:,i] = shift(toReg,i)
- return xMat
- def makePsiMat(orderVec,lambdaRidge,lambdaSmooth):
- """ Constructs Psi Matrix (difference matrix + ridge matrix)
- INPUTS:
- orderVec : vector of lag orders
- OUTPUTS:
- psiMat : psi matrix"""
- psiMat = np.zeros((np.sum(orderVec),np.sum(orderVec)))
- psiMat[:orderVec[0],:orderVec[0]] = makeSinglePsiMat(orderVec[0])
- if len(orderVec)>1:
- for i in range(1,len(orderVec)-1):
- psiMat[np.sum(orderVec[:i]):np.sum(orderVec[:i+1]),np.sum(orderVec[:i]):np.sum(orderVec[:i+1])]= makeSinglePsiMat(orderVec[i])
- psiMat[np.sum(orderVec[:-1]):np.sum(orderVec),np.sum(orderVec[:-1]):np.sum(orderVec)]= makeSinglePsiMat(orderVec[-1])
- psiMat = psiMat * lambdaSmooth + np.eye(np.sum(orderVec))*lambdaRidge
- return psiMat
- def makeSinglePsiMat(orderScal):
- """Constructs a single D difference matrix
- INPUTS:
- orderScal : scalar of the lag order
- OUTPUTS:
- partPsi : single D matrix"""
- partPsi = np.zeros((orderScal,orderScal))
- for i in range(1,orderScal-1):
- partPsi[i,i] = 2
- partPsi[i-1,i] = -1
- partPsi[i+1,i] = -1
- partPsi[0,0] = 1
- partPsi[1,0] = -1
- partPsi[orderScal-1][orderScal-1]=1
- partPsi[orderScal-2][orderScal-1]=-1
- return partPsi
- def makeInputMat(toReg,orderVec):
- """Constructs the lag regression matrix from individual regression vectors
- INPUTS:
- toReg : regression matrix for training
- orderVec : vector of lag orders for testReg and trainReg
- OUTPUTS:
- xMat : final regression matrix for training of size (nT x sum(typeVec)+1)"""
- xMat =[]
- if toReg.ndim>1: #there are more than one regression time series
- for i in range(0,len(toReg)):
- if orderVec[i]>1:
- xMat.append(constructLag(toReg[i,:],orderVec[i]))
- else:
- temp = np.zeros((len(toReg[i,:]),1))
- temp[:,0] = toReg[i,:]
- xMat.append(temp)
- else:
- xMat.append(constructLag(toReg,orderVec[0]))
- return np.hstack(xMat)
- ############################ Fused Ridge Output Analysis Functions #################
- def gaus(x,a,x0,sigma):
- """Normal distribution function, used for curve fitting"""
- return a*np.exp(-(x-x0)**2/(2*sigma**2))
- def halfGaus(x,x0,sigma):
- """Normal distribution function, used for curve fitting"""
- return np.sqrt(2)/(np.sqrt(np.pi)*sigma)* np.exp(-(x-x0)**2/(2*sigma**2))
- def fitLeftGetThresh(corrs,stdThresh):
- """Estimates a correlation threshold for significantly correlated data. Relies upon
- fitting the left hand side of a normal distribution (relative to mode) for an estimate
- of noise variance
- INPUTS:
- corrs : vector of corr coefs
- stdThresh : threshold on STD for estimate (probabilities related to z-score"""
- counts, bins,bars= plt.hist(corrs,density=True,bins=100,alpha = .6,label = "Full")
- mode = bins[np.where(counts==np.max(counts))]+ (bins[1]-bins[0])/2
- leftDat = corrs[np.where(corrs<mode)[0]]
- countsL,binsL,barsL = plt.hist(leftDat,density=True,bins=100,alpha = .6,label = "Full")
- popt,pcov = curve_fit(halfGaus,binsL[:-1],countsL,p0=None, sigma=None)
- plt.plot(bins,halfGaus(bins,popt[0],popt[1]))
- thresh = popt[0]+(np.abs(popt[1])*stdThresh)
- plt.plot([thresh,thresh],[0,1])
- return thresh, popt[0],popt[1]
- def pullAverages(dffTrace,uvOnGut,uvOffGut,preTime,postTime):
- """Pulls average and se gut and ctrl pulses"""
- gutResponses = np.zeros((len(dffTrace),postTime+preTime,len(uvOnGut)))
- ctrlResponses = np.zeros((len(dffTrace),postTime+preTime,len(uvOffGut)))
- for i in range(0,len(uvOnGut)):
- gutResponses[:,:,i] = dffTrace[:,int(uvOnGut[i]-preTime):int(uvOnGut[i]+postTime)]
- for i in range(0,len(uvOffGut)):
- ctrlResponses[:,:,i] = dffTrace[:,int(uvOffGut[i]-preTime):int(uvOffGut[i]+postTime)]
- aveGutResponse = np.mean(gutResponses,axis=2)
- seGutResponse = np.std(gutResponses,axis=2)/np.sqrt(len(uvOnGut))
- aveCtrlResponse = np.mean(ctrlResponses,axis=2)
- seCtrlResponse = np.std(ctrlResponses,axis=2)/np.sqrt(len(uvOffGut))
- return aveGutResponse, seGutResponse,aveCtrlResponse,seCtrlResponse
- def meanAndSE(mat,trigs,preTime,postTime):
- trialResponses = np.zeros((len(mat),postTime+preTime,len(trigs)))
- for i in range(0,len(trigs)):
- trialResponses[:,:,i] = mat[:,trigs[i]-preTime:trigs[i]+postTime]
- trialMeans = np.mean(trialResponses,axis=2)
- trialSEs = np.std(trialResponses,axis=2)/np.sqrt(len(trigs))
- return trialResponses, trialMeans, trialSEs
- def pullCenters(X,Y,Z):
- """Pulls the mean X, Y, and Z coordinates for a set of cells
- INPUTS:
- X,Y,Z : mats of loc data
- outPuts:
- cellCenters : mean X,Y, and Z locations for each cell in X,Y,Z"""
- cellCenters = np.zeros((len(X),3))
- for i in range(0,len(X)):
- cellCenters[i,:] = pullLocs(X[i],Y[i],Z[i])
- return cellCenters
- def pullLocs(X,Y,Z):
- """Computes mean locs from data
- INPUTS:
- X,Y,Z : mats of loc data
- outPuts:
- xG,yG,zG : mean locs of cells
- """
- xx = X
- yy = Y
- zz = Z
- xG = np.mean(xx[np.where(xx>=0)[0]])
- yG = np.mean(yy[np.where(yy>=0)[0]])
- zG = np.mean(zz[np.where(zz>=0)[0]])
- return xG, yG,zG
gutBrainPipeline.py at commit 4c62612, under MIT · at the source
Overview
- Janelia Research Campus, Howard Hughes Medical Institute,Ashburn, VA USA
- Department of Neurobiology, Northwestern University,Evanston, IL USA
- Gatsby Computational Neuroscience Unit, University College London,London, UK
- Department of Biomedical Engineering, Vanderbilt, Nashville, TN USA
- Harvard Stem Cell Institute, Harvard University,Cambridge, MA USA
- Department of Molecular and Cellular Biology, Harvard University,Cambridge, MA USA
- NSF-Simons National Institute for Theory and Mathematics in Biology, Chicago, IL USA
Abstract
To select behaviors appropriate to their circumstances and needs, animals integrate information about the external environment with information about the state of their bodies, derived from sensing and processing internal signals (interoception). However, the brain-wide circuit activity underlying interoception and its integration with sensorimotor processing remains unclear, partly because of technical barriers to accessing whole-brain activity at the cellular level during physiological perturbations. We developed an all-optical system for whole-brain neuronal imaging in behaving larval zebrafish during optical uncaging of gut- or bloodstream-targeted nutrients and visuo-motor stimulation. Widespread neural activity throughout the brain encoded nutrient delivery, unfolding on multiple timescales across many peripheral and central regions. Evoked activity depended on delivery location and occurred in response to both amino acids and D-glucose, but not L-glucose. Many gut responsive neurons also responded to swimming and visual stimuli, with brainstem areas primarily integrating gut and motor signals and midbrain regions integrating jointly gut, visual, and motor signals. This platform links body-brain communication studies to brain-wide neural computation in awake, behaving vertebrates.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
benJames1212/gutBrainPipeline
4c62612ecd540ec786c43fe9ce67cc78259a6ec1, 27 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
7 files
- gutBrainCode/
eclass.py , Python, 645 lines - gutBrainCode/
ephys.py , Python, 212 lines - gutBrainCode/
filesys.py , Python, 65 lines - gutBrainCode/
gutBrainPipeline.py , Python, 788 lines, 2 matches - gutBrain_cellSelection_e
xample.ipynb , Jupyter, 183 lines, 1 match - LICENSE, License, 21 lines
- README.md, Text, 66 lines
mikarubi/voluseg
55c619d7de0f56f303ae0f64e9eaa11cdd6819c9, 3 September 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
45 files
- app/
__init__.py , Python, 1 line - app/
app.py , Python, 120 lines - docs/
voluseg-docs-app/ , JavaScript, 3 linesbabel.config.js - docs/
voluseg-docs-app/ , JavaScript, 136 linesdocusaurus.config.js - docs/
voluseg-docs-app/ , JavaScript, 22 linessidebars.js - docs/
voluseg-docs-app/ , JavaScript, 61 linessrc/ components/ HomepageFeatures/ index.js - docs/
voluseg-docs-app/ , JavaScript, 43 linessrc/ pages/ index.js - iac/
aws_batch/ , Python, 23 linesapp.py - iac/
aws_batch/ , Python, 1 lineaws_batch/ __init__.py - iac/
aws_batch/ , Python, 270 linesaws_batch/ aws_batch_stack.py - src/
voluseg/ , Python, 19 lines__init__.py - src/
voluseg/ , Python, 1 line_steps/ __init__.py - src/
voluseg/ , Python, 211 lines_steps/ step0.py - src/
voluseg/ , Python, 168 lines_steps/ step1.py - src/
voluseg/ , Python, 162 lines_steps/ step2.py - src/
voluseg/ , Python, 251 lines_steps/ step3.py - src/
voluseg/ , Python, 247 lines_steps/ step4.py - src/
voluseg/ , Python, 97 lines_steps/ step4a.py - src/
voluseg/ , Python, 133 lines_steps/ step4b.py - src/
voluseg/ , Python, 128 lines_steps/ step4c.py - src/
voluseg/ , Python, 139 lines, 1 match_steps/ step4d.py - src/
voluseg/ , Python, 103 lines_steps/ step4e.py - src/
voluseg/ , Python, 192 lines_steps/ step5.py - src/
voluseg/ , Python, 1 line_tools/ __init__.py - src/
voluseg/ , Python, 69 lines_tools/ ants_registration.py - src/
voluseg/ , Python, 46 lines_tools/ ants_transformation.py - src/
voluseg/ , Python, 135 lines_tools/ aws.py - src/
voluseg/ , Python, 38 lines_tools/ ball.py - src/
voluseg/ , Python, 92 lines_tools/ clean_signal.py - src/
voluseg/ , Python, 5 lines_tools/ constants.py - src/
voluseg/ , Python, 20 lines_tools/ evenly_parallelize.py - src/
voluseg/ , Python, 31 lines_tools/ get_volume_name.py - src/
voluseg/ , Python, 39 lines_tools/ load_volume.py - src/
voluseg/ , Python, 255 lines_tools/ nwb.py - src/
voluseg/ , Python, 62 lines_tools/ parameters.py - src/
voluseg/ , Python, 88 lines_tools/ parameters_models.py - src/
voluseg/ , Python, 124 lines_tools/ sample_data.py - src/
voluseg/ , Python, 49 lines_tools/ save_volume.py - src/
voluseg/ , Python, 26 lines_tools/ sparseness.py - src/
voluseg/ , Python, 78 lines_tools/ sparseness_projection.py - src/
voluseg/ , Python, 403 linesdask_config.py - tests/
test_dask_config.py , Python, 247 lines - tests/
test_voluseg.py , Python, 470 lines - LICENSE, License, 21 lines
- README.md, Text, 143 lines
ades91/imdecorr
db536a36d12db95f5e4ea6c8644144a10cc42646, 23 April 2021Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
22 files
- funcs/
apodImRect.m , MATLAB, 64 lines - funcs/
clamp.m , MATLAB, 55 lines - funcs/
getCorrcoef.m , MATLAB, 47 lines - funcs/
getDcorr.m , MATLAB, 241 lines - funcs/
getDcorr1D.m , MATLAB, 204 lines - funcs/
getDcorrLocalMax.m , MATLAB, 67 lines - funcs/
getDcorrMax.m , MATLAB, 61 lines - funcs/
getDcorrSect.m , MATLAB, 263 lines - funcs/
getLocalDcorr.m , MATLAB, 73 lines - funcs/
getRadAvg.m , MATLAB, 47 lines - funcs/
im2pol.m , MATLAB, 62 lines - funcs/
linmap.m , MATLAB, 63 lines - funcs/
loadData.m , MATLAB, 60 lines - funcs/
smlmHist.m , MATLAB, 62 lines - ijplugin/
src/ , Java, 597 linesImageDecorrelationAnalys is.java - ijplugin/
src/ , Java, 396 lines, 1 matchImageDecorrelationAnalys is_.java - ijplugin/
src/ , Java, 214 linesoutput.java - ijplugin/
src/ , Java, 181 linesutils.java - main_imageDecorr.m, MATLAB, 45 lines
- main_smlm.m, MATLAB, 61 lines
- LICENSE, License, 674 lines
- README.txt, Text, 82 lines
JaneliaSciComp/bigstream
3dd1d66cfda0529669d416f20fed676f183fcaa5, 13 July 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
60 files
- bigstream/
__init__.py , Python, 1 line - bigstream/
align.py , Python, 1,744 lines - bigstream/
application_pipelines.py , Python, 251 lines - bigstream/
configure_bigstream.py , Python, 98 lines - bigstream/
configure_dask.py , Python, 39 lines - bigstream/
configure_irm.py , Python, 254 lines - bigstream/
distributed_align.py , Python, 593 lines - bigstream/
distributed_io_utility.p , Python, 181 linesy - bigstream/
distributed_transform.py , Python, 693 lines - bigstream/
features.py , Python, 227 lines - bigstream/
image_data.py , Python, 196 lines - bigstream/
io_utility.py , Python, 872 lines - bigstream/
level_set.py , Python, 205 lines - bigstream/
metrics.py , Python, 620 lines - bigstream/
motion_correct.py , Python, 833 lines - bigstream/
piecewise_align.py , Python, 643 lines - bigstream/
piecewise_transform.py , Python, 697 lines - bigstream/
stitch.py , Python, 441 lines - bigstream/
transform.py , Python, 1,245 lines - bigstream/
utility.py , Python, 206 lines - launchers/
__init__.py , Python, 1 line - launchers/
cli.py , Python, 322 lines - launchers/
main_apply_local_transfo , Python, 292 linesrm.py - launchers/
main_apply_transform_coo , Python, 200 linesrds.py - launchers/
main_compute_local_inver , Python, 241 linesse.py - launchers/
main_global_align_pipeli , Python, 277 linesne.py - launchers/
main_local_align_pipelin , Python, 539 linese.py - notebooks/
local_register_only.ipyn , Jupyter, 185 linesb - notebooks/
register_round_to_round. , Jupyter, 357 linesipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 182 linesc_elegan_pair0.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 183 linesc_elegan_pair1.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 147 linesc_elegan_pair2.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 146 linesc_elegan_pair3.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 178 linesc_elegan_pair4.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 187 linesc_elegan_pair5.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 188 linesc_elegan_pair6.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 190 linesc_elegan_pair7.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 184 linesmouse_pair0.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 184 linesmouse_pair1.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 184 linesmouse_pair2.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 184 linesmouse_pair3.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 174 linesmouse_pair4.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 88 linesmouse_pair5.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 88 linesmouse_pair6.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 88 linesmouse_pair7.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 78 linessample_pair.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 78 lineszebrafish_pair0.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 78 lineszebrafish_pair1.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 90 lineszebrafish_pair2.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 90 lineszebrafish_pair3.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 110 lineszebrafish_pair4.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 92 lineszebrafish_pair5.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 92 lineszebrafish_pair6.ipynb - notebooks/
rnr-exm_notebooks/ , Jupyter, 92 lineszebrafish_pair7.ipynb - notebooks/
test_transform.ipynb , Jupyter, 53 lines - notebooks/
tutorials_out_of_date_bu , Jupyter, 100 linest_still_maybe_helpful/ bigstream_easifish_pipel ine_example.ipynb - notebooks/
tutorials_out_of_date_bu , Jupyter, 256 linest_still_maybe_helpful/ bigstream_intro_tutorial .ipynb - setup.py, Python, 31 lines
- LICENSE.md, License, 28 lines
- README.md, Text, 192 lines
Code availability
All original code has been deposited at GitHub and is publicly available: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 126 scripts, each with its path and the digest of its content;
- 5 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
All datasets are deposited to Figshare: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 16 authors, 4 keywords, 10 MeSH terms, 3 funders, 95 references.
Cite
This paper
Chen, W., James, B., Ruetten, V. M. S., Banala, S., Wei, Z., Yang, X., Fleishman, G., Siwanowicz, I., Rubinov, M., Delahanty, J., Fishman, M. C., Engert, F., Sahani, M., Lavis, L. D., Fitzgerald, J. E., & Ahrens, M. B. (2026). Whole-brain, all-optical interrogation of neuronal dynamics underlying gut and vascular interoception in zebrafish. Nature communications, 17(1), 9881. https://
BibTeX
@article{chen2026whole,
author = {Chen, Weiyu and James, Ben and Ruetten, Virginie M. S. and Banala, Sambashiva and Wei, Ziqiang and Yang, Xueying and Fleishman, Greg and Siwanowicz, Igor and Rubinov, Mikail and Delahanty, Jeremy and Fishman, Mark C. and Engert, Florian and Sahani, Maneesh and Lavis, Luke D. and Fitzgerald, James E. and Ahrens, Misha B.},
title = {{Whole-brain, all-optical interrogation of neuronal dynamics underlying gut and vascular interoception in zebrafish}},
journal = {Nature communications},
year = {2026},
month = aug,
volume = {17},
number = {1},
pages = {9881},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42749707},
pmcid = {PMC13583002}
}
RIS
TY - JOUR
AU - Chen, Weiyu
AU - James, Ben
AU - Ruetten, Virginie M. S.
AU - Banala, Sambashiva
AU - Wei, Ziqiang
AU - Yang, Xueying
AU - Fleishman, Greg
AU - Siwanowicz, Igor
AU - Rubinov, Mikail
AU - Delahanty, Jeremy
AU - Fishman, Mark C.
AU - Engert, Florian
AU - Sahani, Maneesh
AU - Lavis, Luke D.
AU - Fitzgerald, James E.
AU - Ahrens, Misha B.
TI - Whole-brain, all-optical interrogation of neuronal dynamics underlying gut and vascular interoception in zebrafish
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 9881
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Whole-brain, all-optical interrogation of neuronal dynamics underlying gut and vascular interoception in zebrafish",
"container-title": "Nature communications",
"author": [
{
"family": "Chen",
"given": "Weiyu"
},
{
"family": "James",
"given": "Ben"
},
{
"family": "Ruetten",
"given": "Virginie M. S."
},
{
"family": "Banala",
"given": "Sambashiva"
},
{
"family": "Wei",
"given": "Ziqiang"
},
{
"family": "Yang",
"given": "Xueying"
},
{
"family": "Fleishman",
"given": "Greg"
},
{
"family": "Siwanowicz",
"given": "Igor"
},
{
"family": "Rubinov",
"given": "Mikail"
},
{
"family": "Delahanty",
"given": "Jeremy"
},
{
"family": "Fishman",
"given": "Mark C."
},
{
"family": "Engert",
"given": "Florian"
},
{
"family": "Sahani",
"given": "Maneesh"
},
{
"family": "Lavis",
"given": "Luke D."
},
{
"family": "Fitzgerald",
"given": "James E."
},
{
"family": "Ahrens",
"given": "Misha B."
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "9881",
"DOI": "10.1038/
"PMID": "42749707",
"PMCID": "PMC13583002",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
27
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.isci.2026.116206 [code]
- Gut distension evokes rapid neural dynamics in vagal and hindbrain populations of larval zebrafish.Journal: iScienceIn common: SimpleITK, tifffile, NetworkX, 7 other tools, zebrafish, systems, 14 references
- [2] doi:10.7554/elife.100880 [code]
- An applicable and efficient retrograde monosynaptic circuit mapping tool for larval zebrafish.Journal: eLifeIn common: tifffile, NetworkX, OpenCV, 8 other tools, zebrafish, systems, 2 references
- [3] doi:10.3389/fnsys.2026.1822122 [code]
- Convergence-divergence circuits for multimodal integration of innate and learned opponent valences.Journal: Frontiers in systems neuroscienceIn common: tifffile, NetworkX, scikit-image, 7 other tools, systems, 3 references
- [4] doi:10.1038/s41467-026-71458-0 [code]
- Early differential impact of MeCP2 mutations on functional networks in Rett syndrome patient-derived human cortical organoids.Journal: Nature communicationsIn common: Neurodata Without Borders (PyNWB, MatNWB), tifffile, Parallel Computing Toolbox, 8 other tools
- [5] doi:10.1038/s41593-026-02232-0 [code]
- Entorhinal cortex represents task-relevant remote locations independently of CA1.Journal: Nature neuroscienceIn common: Neurodata Without Borders (PyNWB, MatNWB), NetworkX, OpenCV, 8 other tools, systems
- [6] doi:10.1038/s41592-026-03179-7 [code]
- Voltage imaging of neurons distributed across entire brains of larval zebrafish.Journal: Nature methodsIn common: OpenCV, scikit-image, h5py, 3 other tools, zebrafish, systems, 4 references
- [7] doi:10.1038/s41467-026-69633-4 [code]
- Visuomotor decision-making through multifeature convergence in the larval zebrafish hindbrain.Journal: Nature communicationsIn common: h5py, scikit-learn, pandas, 3 other tools, zebrafish, 5 references
- [8] doi:10.1126/sciadv.adv3770 [code]
- Evolution of a central dopamine circuit underlies adaptation of a light-evoked sensorimotor response in the blind cavefish.Journal: Science advancesIn common: tifffile, OpenCV, scikit-image, 6 other tools, systems, 2 references
- [9] doi:10.1038/s41467-026-73373-w [code]
- Mapping neuro-vascular unit communications reveals distinct angiogenic programs across developing mouse brain regions.Journal: Nature communicationsIn common: SimpleITK, tifffile, OpenCV, 8 other tools
- [10] doi:10.7554/elife.109717 [code]
- Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.Journal: eLifeIn common: Neurodata Without Borders (PyNWB, MatNWB), tifffile, OpenCV, 7 other tools, systems
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 4 repositories of the authors' code, each at its verified commit and with its license, 126 scripts, and 5 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:8b1e258f496d467b…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
