Dataset to generate figures published in "The physiological basis for contrast opponency in motion computation in Drosophila"

GRamosT d77c8af2f9 Add code details to description 3 лет назад
data 3bd49f05d8 Upload MAT-files containing data used to produce paper figures 3 лет назад
figures 94e790c07a Upload matlab scripts to generate paper figures and source data excel files 3 лет назад
fullfield 8591bc45f7 Upload matlab functions used by main MakeFigure scripts 3 лет назад
plotting 8591bc45f7 Upload matlab functions used by main MakeFigure scripts 3 лет назад
receptiveFields 8591bc45f7 Upload matlab functions used by main MakeFigure scripts 3 лет назад
stats 8591bc45f7 Upload matlab functions used by main MakeFigure scripts 3 лет назад
utils 8591bc45f7 Upload matlab functions used by main MakeFigure scripts 3 лет назад
LICENSE 3cbb6bcbb3 Initial commit 3 лет назад
README.md d77c8af2f9 Add code details to description 3 лет назад

README.md

Fly OFF motion pathway receptive fields

Dataset to generate figures published in The physiological basis for contrast opponency in motion computation in Drosophila.

Includes responses from Tm1, Tm2, Tm4, Tm9, CT1 and T5 neurons with ONOFF fullfield flashes, ON bars, OFF bars. Additionally Tm9 and T5 responses were also (simultaneously) recorded with a moving sinewave with different spatial and temporal frequencies. Responses are quantified as dF/F0, over manually selected regions of interest (ROIs). Tuning curves were fitted by a single Gaussian or a difference-of-Gaussians. Response quality index as a measure of trial to trial reliability. Statistical testing uses nested permutation tests.

Code

To generate figures used in the paper, first download the full repository, add it to the MATLAB path, and run the scripts in the figure folder. Final figures require additional vector illustration edits, but source data will be exported as excel files. Each figure generates a folder inside the figures folder, which contains the corresponding excel file and pdf/png figure files to be generated (e.g., figures/Fig3/someImage.pdf).

Data

Data contained in the data folder are MAT-files with the following structure

Figures 2, 4 - 7

Variables are contained in a table called ProcessedTable, with dimensions (number of recorded layers, number of data variables)

An example table entry (row) will consist of 12 data variables (columns):

  • flyInd: Index of the fly
  • stackInd: Index of the layer recorded within a fly
  • timeSeriesPath: Original path to motion corrected data, aligned to stimulus timing in local drive
  • stimParams: Set of parameters defining the stimulus used, one column per stimulus epoch, e.g., one bar position is a different epoch with all parameters unchanged except its position. Parameter examples: stimtype, lum, contrast, duration, stimrot, spacing, randomize, USEFRUSTUM (perspective correction).
  • stimParamFileName: Filename of used stimulus file
  • typeOfProblem: Zero for no problem, otherwise indicates data that could not be processed by the analysis code, potentially incomplete or aborted recording.
  • cycleInd: Each stack corresponds to a layer, while each cycle corresponds to a time series within that layer. Old Tm9 data in figure 2b, was acquired using multiple stacks to record the same layer each stack has two cycles, an empty, prestimulus cycle and a stimulus cycle. The remaining datasets were acquired using a single stack per layer, and one cycle per stimulus, with no prestimulus cycles.
  • nonParamTuning: array structure (dimensions: 1, number of channels) with tuning curves obtained via different methods (mean, variance, min, max, etc), resulting tuning curves are stored in tc variable with dimensions (number of tuning methods), each entry contains the tuning curves for that method with dimensions (1, number of ROIs, number of stimulus epochs excluding the interstimulus interval epoch). Domain indicated the stimulus parameter dimension of the tuning, in the case of bars it is the bar position measured in degrees.

    ANOVApMap_Responsive: {1×10 cell}
     ANOVApMap_Selective: {1×10 cell}
               epochMaps: {{29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}  {29×1 cell}}
                      tc: {[1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]  [1×9×29 double]}
                tcParams: {[1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]  [1×1 struct]}
                  domain: [-28 -26 -24 -22 -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28]
          originalDomain: [-28 -26 -24 -22 -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28]
              stimSizeTC: [29 1]
            fieldNamesTC: {'stimtrans_amp'}
        stimParamsFlatTC: [1×29 struct]
          collapseMethod: 'nanmean'
           tuningMethods: {'mean'  'var'  'min'  'max'  'pctile5'  'median'  'pctile95'  'extreme'  'SNR'  'gain'}
    
  • paramTuning: struct with dimensions (channels, number of ROIs).

    • Fields:

      • fit: structure containing parameters from Gaussian fit to spatial receptive fields

        General model Gauss1:
        ans(x) =  a1*exp(-((x-b1)/c1)^2)
        Coefficients (with 95% confidence bounds):
        a1 =      0.2211  (0.175, 0.2673)
        b1 =        18.2  (17.84, 18.56)
        c1 =       2.117  (1.608, 2.627)
        
      • gof: struct with different measures of the goodness of fit

        sse: 0.4333
        rsquare: 0.5321
        dfe: 113
        adjrsquare: 0.5238
        rmse: 0.0619
        
      • info: struct with information about fitting procedure, not relevant.

  • roiMeta: array structure (dimensions: 1, number of channels) with fields backgroundRois (index of ROIs used for background subtraction, selected at last), invalidRois (indices of ROIs with NaNs in the data or some other issue).

  • responseIndex: array with dimensions (channels, number of ROIs) containing the response quality index per ROI.

  • trialsPValue: array with dimensions (channels, number of ROIs) containing the pValue testing for trial to trial differences per ROI. Not relevant for the paper analysis.

    ProcessedTable =
    
    187×12 table
    
    flyInd    stackInd                                   timeSeriesPath                                    stimParams                                stimParamFileName                               typeOfProblem    cycleInd    nonParamTuning     paramTuning       roiMeta       responseIndex    trialsPValue 
    ______    ________    ____________________________________________________________________________    _____________    ______________________________________________________________________    _____________    ________    ______________    _____________    ____________    _____________    _____________
    
     1        1           'D:\Data_LGRTL\Two_photonMat\190428.0.lr\190428.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×4  struct]    'FullField_ONOFF_1.0_2s_BG_0.5_4s_Weber_NonRand.txt'                      0                1           [        -1]      [         -1]    [1×1 struct]    [1×8  double]    [1×8  double]
     1        1           'D:\Data_LGRTL\Two_photonMat\190428.0.lr\190428.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×30 struct]    'StandingStripe_1s_YAxis_5degWide_2degSep_m1.0Con_rand_USEFRUSTUM.txt'    0                2           [1×1 struct]      [1×8  struct]    [1×1 struct]    [1×8  double]    [1×8  double]
     1        1           'D:\Data_LGRTL\Two_photonMat\190428.0.lr\190428.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×30 struct]    'StandingStripe_1s_YAxis_5degWide_2degSep_p1.0Con_rand_USEFRUSTUM.txt'    0                3           [1×1 struct]      [1×8  struct]    [1×1 struct]    [1×8  double]    [1×8  double]
     1        1           'D:\Data_LGRTL\Two_photonMat\190428.0.lr\190428.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×26 struct]    'StandingStripe_1s_XAxis_5degWide_2degSep_m1.0Con_rand_USEFRUSTUM.txt'    0                4           [1×1 struct]      [1×8  struct]    [1×1 struct]    [1×8  double]    [1×8  double]
     1        1           'D:\Data_LGRTL\Two_photonMat\190428.0.lr\190428.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×26 struct]    'StandingStripe_1s_XAxis_5degWide_2degSep_p1.0Con_rand_USEFRUSTUM.txt'    0                5           [1×1 struct]      [1×8  struct]    [1×1 struct]    [1×8  double]    [1×8  double]
     2        1           'D:\Data_LGRTL\Two_photonMat\190429.0.lr\190429.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×4  struct]    'FullField_ONOFF_1.0_2s_BG_0.5_4s_Weber_NonRand.txt'                      0                1           [        -1]      [         -1]    [1×1 struct]    [1×8  double]    [1×8  double]
     2        1           'D:\Data_LGRTL\Two_photonMat\190429.0.lr\190429.0.lr_fly1_Tm1GCaMP6f\TS-001'    [1×26 struct]    'StandingStripe_1s_XAxis_5degWide_2degSep_m1.0Con_rand_USEFRUSTUM.txt'    0                2           [1×1 struct]      [1×8  struct]    [1×1 struct]    [1×8  double]    [1×8  double]
    

Figure 3

Cell structure dataEdges, dimensions (number of flies, number of layers per fly, number of stimuli) Contains data for five stimuli ONOFF fullfield flashes, OFF horizontal bars, OFF vertical bars, ON horizontal bars, and ON vertical bars. Example of an entry:

      flyPath: '180410.0.lr_fly1_Tm9GCaMP6f-Tm4jRGECO1a'
frameDuration: 0.1111
     layerInd: 1
       roiTCs: {[1×10×112 double]  [1×10×112 double]}
 roiTCsInterp: {[1×10×124 double]  [1×10×124 double]}
stimFrameInds: {1×4 cell}
  stimulusInd: 1
 stimulusName: 'FullField_ONOFF_1.0_2s_BG_0.5_4s_Weber_NonRand.txt'
        times: [1×124 double]

Data is originally recorded with the frameDuration in seconds, but interpolated to 10 Hz, thus roiTCsInterp and times have same time dimensions because they correspond to the interpolated time series. Indices of the stimulus epoch are stored in stimFrameInds. roiTCs have dimensions of (channels, number of ROIs, number of time points).