User Tools

Site Tools


analysis:course-w16:week13

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
analysis:course-w16:week13 [2016/03/07 17:48]
mvdm [Spike-field coherence]
analysis:course-w16:week13 [2018/07/07 10:19] (current)
Line 1: Line 1:
 ~~DISCUSSION~~ ~~DISCUSSION~~
- 
-:!: **UNDER CONSTRUCTION,​ DO NOT USE YET** :!: 
  
 ===== Spike-field relationships:​ phase locking, phase precession, etc. ===== ===== Spike-field relationships:​ phase locking, phase precession, etc. =====
Line 22: Line 20:
 Local field potentials and related quantities such as the EEG ultimately result from the spatiotemporal summation of electrical currents across the cell membrane of neurons. Thus, in general, it is expected that spiking activity should be related to LFPs somehow. However, the exact nature of this relationship has proven to be far from trivial, and depends on many factors such as the three-dimensional arrangement of neurons, ion channel distributions,​ and more rapid dynamics arising from the interaction of multiple inputs. Accordingly,​ measures that characterize the relationship between spikes and LFPs have painted a surprisingly rich picture of how individual neurons participate in population- and systems-level activity (see e.g. Womelsdorf et al. 2005, Benchenane et al. 2010 and many others for striking examples). ​ Local field potentials and related quantities such as the EEG ultimately result from the spatiotemporal summation of electrical currents across the cell membrane of neurons. Thus, in general, it is expected that spiking activity should be related to LFPs somehow. However, the exact nature of this relationship has proven to be far from trivial, and depends on many factors such as the three-dimensional arrangement of neurons, ion channel distributions,​ and more rapid dynamics arising from the interaction of multiple inputs. Accordingly,​ measures that characterize the relationship between spikes and LFPs have painted a surprisingly rich picture of how individual neurons participate in population- and systems-level activity (see e.g. Womelsdorf et al. 2005, Benchenane et al. 2010 and many others for striking examples). ​
  
-A different, practical issue is that LFPs are susceptible to //volume conduction//,​ that is, they can be recorded some distance away from their source. The exact amount distance depends on numerous factors, but even intracranially in the rat the hippocampally-generated theta rhythm can be recorded several millimeters away in the cortex (Sirota et al. 2008). Thus, is is not a priori clear that a LFP recorded from a particular brain structure is generated there (is locally relevant) raising the possibility of attributing properties of the recording to the wrong site! One of the major ways to determine if a LFP is locally relevant is to establish if it is related to spiking activity, which as a fast and relatively local signal does not volume-conduct nearly as far.+A different, practical issue is that LFPs are susceptible to //volume conduction//,​ that is, they can be recorded some distance away from their source. The exact amount distance depends on numerous factors, but even intracranially in the rat the hippocampally-generated theta rhythm can be recorded several millimeters away in the cortex (Sirota et al. 2008), and gamma oscillations in the ventral striatal LFP [[ http://​biorxiv.org/​content/​early/​2017/​04/​13/​127126|originate in the nearby piriform cortex]]. Thus, is is not a priori clear that a LFP recorded from a particular brain structure is generated there (is locally relevant) raising the possibility of attributing properties of the recording to the wrong site! One of the major ways to determine if a LFP is locally relevant is to establish if it is related to spiking activity, which as a fast and relatively local signal does not volume-conduct nearly as far.
  
 In this module, we will examine basic measures of spike-field relationships useful for both approaches. In this module, we will examine basic measures of spike-field relationships useful for both approaches.
Line 146: Line 144:
 For a more sophisticated analysis of STAs, we move to FieldTrip. Since we now need to load not just LFPs, but also spikes, there are a few preliminaries to take care of first. For a more sophisticated analysis of STAs, we move to FieldTrip. Since we now need to load not just LFPs, but also spikes, there are a few preliminaries to take care of first.
  
-:!: For this section to work, you need to use the version of ''​read_mclust_t.m''​ that is in the ''​nsb2015''​ codebase, **NOT** the one in %%FieldTrip%%! To do this, you can delete this file from the ''​fieldtrip\fileio\private''​ folder. ​+:!: For this section to work, you need to use the version of ''​read_mclust_t.m''​ that is in the ''​neuraldata-w16''​ codebase, **NOT** the one in %%FieldTrip%%! To do this, you can delete this file from the ''​fieldtrip\fileio\private''​ folder. ​
  
 Now we can load some LFPs and the spikes from this neuron. Ignore the usual warnings about timestamp mismatches arising from gaps in the LFP data. Now we can load some LFPs and the spikes from this neuron. Ignore the usual warnings about timestamp mismatches arising from gaps in the LFP data.
Line 214: Line 212:
 </​code>​ </​code>​
  
-Notice that the contents of ''​data_trl''​ now have multiple cells (88) corresponding to trials, rather than just one for the entire session as before.+Notice that the contents of ''​data_trl''​ now have multiple cells (88) corresponding to trials, rather than just one for the entire session as before. ​(Also, a more transparent trialification method can be seen in [[http://​ctnsrv.uwaterloo.ca/​vandermeerlab/​doku.php?​id=analysis:​course-w16:​week7|this module]].)
  
 Now, we can compute the STA for specific task segments, defined relative to task event time zero, the nosepokes into the reward receptacle: Now, we can compute the STA for specific task segments, defined relative to task event time zero, the nosepokes into the reward receptacle:
Line 393: Line 391:
  
 <code matlab> <code matlab>
-csc = myLoadCSC('​R016-2012-10-03-CSC02d.ncs'​)+LoadExpKeys
-cscR = Range(csc); cscD = Data(csc);​ +cfg = []; 
- +cfg.fc ​ExpKeys.goodTheta
-% filter in theta range +csc LoadCSC(cfg);
-Fs = 2000; +
-Wp = [ 6 10* 2 / Fs+
-Ws [ 4 12] * 2 / Fs+
-[N,​Wn] ​cheb1ordWp, Ws, 3, 20); % determine filter parameters +
-[b_c1,a_c1] = cheby1(N,​0.5,​Wn); % builds filter+
    
-csc_filtered ​filtfilt(b_c1,a_c1,cscD); +% filter in theta range 
-phi = angle(hilbert(csc_filtered));+cfg_f []; 
 +cfg_f.f = [6 10]; cfg_f.type = '​fdesign';​ 
 +cscF = FilterLFP(cfg,csc); 
 + 
 +phi = angle(hilbert(cscF.data));
 </​code>​ </​code>​
  
Line 410: Line 407:
  
 <code matlab> <code matlab>
-S = LoadSpikes({'​R016-2012-10-03-TT02_1.t'​});​ +S = LoadSpikes([]); 
-spk_t = Data(S{1}); +spk_phi = interp1(cscF.tvec,phi,S.t{1},'​nearest'​);​ 
-spk_phi = interp1(cscR,phi,spk_t,'​nearest'​);​ + 
 hist(spk_phi,​-pi:​pi/​18:​pi) hist(spk_phi,​-pi:​pi/​18:​pi)
 </​code>​ </​code>​
  
-As before, the phase histogram is non-uniform,​ indicating a spike-LFP relationship. Now we can plot phase as a function of position:+As before, the phase histogram is non-uniform,​ indicating a spike-LFP relationship. Now we can plot phase as a function of position, using the nice ''​scatterplotC''​ function:
  
 <code matlab> <code matlab>
-[Timestamps,​ X, Y, Angles, Targets, Points, Header] ​Nlx2MatVT('​VT1.nvt', ​[1 1 1 1 1 1], 1, 1, []); +pos LoadPos([]);
-Timestamps = Timestamps*10^-6;​ +
-toRemove = (X == 0 & Y == 0); +
-X = X(~toRemove);​ Y = Y(~toRemove);​ Timestamps = Timestamps(~toRemove);+
  
-spk_x = interp1(Timestamps,X,spk_t,'​linear'​);​ +spk_x = interp1(pos.tvec,getd(pos,'​x'​),S.t{1},'​linear'​);​ 
-spk_y = interp1(Timestamps,Y,spk_t,'​linear'​);​ +spk_y = interp1(pos.tvec,getd(pos,'​y'​),S.t{1},'​linear'​);​ 
- +  
-plot(X,Y,'​.','​Color',​[0.5 0.5 0.5],'​MarkerSize',​1);​ axis off; hold on;+plot(getd(pos,'​x'​),​getd(pos,'​y'​),'​.','​Color',​[0.5 0.5 0.5],'​MarkerSize',​1);​ axis off; hold on;
 h = scatterplotC(spk_x,​spk_y,​spk_phi,'​Scale',​[-pi pi],'​solid_face',​1,'​plotchar','​.'​);​ h = scatterplotC(spk_x,​spk_y,​spk_phi,'​Scale',​[-pi pi],'​solid_face',​1,'​plotchar','​.'​);​
 </​code>​ </​code>​
Line 437: Line 430:
  
 Each spike is now plotted according to where the rat was when it occurred, and the color indicates the theta phase. Note that there is a systematic phase change visible as the rat runs along the bottom edge of the track: this is the famous //theta phase precession//​ phenomenon characteristic of hippocampal place cells. Each spike is now plotted according to where the rat was when it occurred, and the color indicates the theta phase. Note that there is a systematic phase change visible as the rat runs along the bottom edge of the track: this is the famous //theta phase precession//​ phenomenon characteristic of hippocampal place cells.
 +
 +==== Challenges ====
 +
 +★ Apply one or more of the methods introduced in this module to your own data. Keep in mind that in these examples, we have related spikes (action potentials) to local field potentials; however, the idea of spike-field relationships can be generalized to relationships between any point process and any periodic time series data. For instance, the timing of behavioral responses may be systematically related to the phase of changes in say, pupil diameter. ​
 +
 +★ In this module we encountered a relationship between the spiking of hippocampal neurons and the theta rhythm. However, it is also thought that the spike timing of these neurons is related to low-gamma (~40-60 Hz) and high-gamma (~70-90 Hz) oscillations. Characterize this relationship using one or more of the methods used here. Good sessions with many hippocampal neurons include those from rats R050 and R064; the ''​ExpKeys''​ ''​GoodTheta''​ field also tends to have good gamma.
analysis/course-w16/week13.1457390938.txt.gz · Last modified: 2018/07/07 10:19 (external edit)