Browse Source

Document data file organization

GRamosT 2 years ago
parent
commit
71389915fd
1 changed files with 98 additions and 1 deletions
  1. 98 1
      README.md

+ 98 - 1
README.md

@@ -1,3 +1,100 @@
 # off-motion-receptive-fields
 
-Dataset to generate figures published in "The physiological basis for contrast opponency in motion computation in Drosophila"
+Dataset to generate figures published in "The physiological basis for contrast opponency in motion computation in Drosophila"
+
+## 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).