Search
Topics:
Fluorescent calcium imaging is a neuroimaging technique in animal research which involves using a calcium-sensitive fluorophore as a proxy for neuronal activation. In this dataset we are using genetically encoded GCaMP6s, which is based on the fluorophore GFP (green fluorescent protein). The modification for GCaMP6s is that the fluorophore is weakly fluorescent in the absence of Ca2+ ions, but changes configuration when it binds to Ca2+ ions and fluoresces much more strongly. Since Ca2+ ions flood into the neuronal cell body when it fires action potentials, this fluorescent marker of Ca2+ concentration gives a readout of neuronal activity levels.
The data you will work from in this tutorial comes from larval zebrafish, which are particularly well suited to the calcium imaging technique as they are optically transparent and have relatively small brains. We can therefore capture functional neuronal activity at single-neuron resolution throughout the brain, which is not possible in any other vertebrate. The imaging was performed on a custom light-sheet microscope which moves the excitation plane through the z-dimension of the brain while adjusting the acquisition focal plane with an electrically tuneable lens. By scanning through the brain like this, we acquire volumetric functional imaging of neural activity. We can also present stimuli to the fish to see the neural responses, in the data you will work with today they heard a sequence of white noise bursts.
Optional further reading for your interest:
Custom light-sheet microscope
Suite2p for segmentation
Auditory responses in larval zebrafish: Poulsen et al. , Wilde et al.
Data for this tutorial can be found here. If the image files are to large to download, the data without images can be found here.
Download the FIJI ImageJ application (open source). Open the calcium_imaging_raw.tif file in FIJI (you can use click and drag).
At the bottom of the window you can scroll through the frames of the acquisition. Re-shape the stack using Image→Hyperstacks→Stack to Hyperstack and use the below settings. Now you can scroll through depth and time independently.
Now we will look at the activity of some neurons that have been segmented and pre-processed for you using suite2p. This tool identifies regions of interest (ROIs) that represent individual neurons. It then calculates the average pixel value (fluorescence brightness) within that neuron at each time step to produce a raw activity trace of fluorescence. It also outputs the dimensions and some other statistics of each ROI.
In Matlab, load in the ‘fish_data.mat’ file. This contains: a mean image of one z-plane (‘mean_img’), statistics about the ROIs that are the segmented neurons (‘roi_stats’), the raw fluorescence traces (‘raw_fluor’: neurons x timepoints), the ΔF/F fluorescent traces (‘DeltaF’: neurons x timepoints), a theoretical trace of auditory responses to use as a regressor (‘aud_regressor’), and a smoothed motion-correction output to use as a motor regressor (‘motor_regressor’). The acquisition rate at a given z-plane is 2 frames per second.
The pre-processing involves taking the ΔF/F, which smooths and baseline-subtracts the fluorescent activity to account for bleaching over the course of the recording and differences in baseline fluorescent intensity between neurons. In this task, we will identify which of the segmented neurons respond to the auditory stimuli that were presented during the recording.
% Plot the mean image from this z-plane figure; hold on imagesc(mean_img); h=gca; h.YDir='normal'; colormap('gray'); % Now add the locations of the identified ROIs (neurons) for i=1:length(roi_stats) plot(roi_stats{1,i}.xpix,roi_stats{1,i}.ypix); end
% plot the mean of raw fluorescence across all neurons figure; plot(mean(raw_fluor,1)) xticks(0:120:size(DeltaF,2)) xticklabels((0:120:size(DeltaF,2))/2) xlabel('Time (seconds)') ylabel('Mean raw fluorescence') % plot raw fluorescence from some example neurons ex_neurons=[1,2,3]; % choose a different 3 (or more) neurons amongst the 1216 available figure; hold on legend_labels={}; for i =1:length(ex_neurons) plot(raw_fluor(ex_neurons(i),:)) legend_labels{i}=sprintf('neuron %g',ex_neurons(i)); end xticks(0:120:size(DeltaF,2)) xticklabels((0:120:size(DeltaF,2))/2) xlabel('Time (seconds)') ylabel('Raw fluorescence') legend(legend_labels)
% create a rasterplot of all the neurons in this plane figure; colormap('hot') % you may change the colourmap if you like low_lim=; % adjust the value for the lower limit up_lim=; % adjust the value for the upper limit imagesc(DeltaF,[low_lim,up_lim]) colorbar() ylabel('Neurons') xticks(0:120:size(DeltaF,2)) xticklabels((0:120:size(DeltaF,2))/2) xlabel('Time (seconds)') title(sprintf('lower limit %g, upper limit %g',low_lim,up_lim))
% run a linear regression to the theoretical trace on each neuron r2=[]; for i=1:size(DeltaF,1) mdl=fitlm(DeltaF(i,:),aud_regressor); r2(i)=mdl.Rsquared.Adjusted; end % now plot the distribution of r-squared values and choose a threshold thresh=0; % set the threshold for auditory classification figure; hold on histogram(r2) xline(thresh,'--','LineWidth',2) xlabel('r^2 to auditory trace') ylabel('Number of neurons') title(sprintf('Auditory threshold = %g',thresh))
figure; hold on % plot the theoretical trace for reference plot(aud_regressor) % plot of the mean activity of auditory-classified neurons plot(mean(DeltaF(r2>thresh,:),1)) % add the mean activity of non-auditory neurons % xlabel('frames') ylabel('DeltaF/F') legend({'Auditory stimuli', 'Auditory neurons', 'Non-auditory neurons'})