pwAddData


 [namesObservation, namesDataSet] = ...
  pwAddData(filename, tryAutomatic, showPlots, namesObservation, namesDataSet)
  pwAddData(dataSet,  tryAutomatic, showPlots, namesObservation, namesDataSet)

 Adds a data file from harddisk or a data set from Matlab workspace
 to the currently selected models.

 

Arguments for pwAddData

 filename       string  Data file (xls or txt)
                        It is recommended to use
                        Microsoft Excel 5.0/95 Workbook xls files.
                        Then, no Excel has to be installed, but the
                        internal Matlab xls reader is able to open the file.
 dataSet        struct  Alternative call to use a matrix
                        of the working space. See pwGetDataSet.
 tryAutomatic   bool    If true (default) saved mappings of observables
                        names to data set columns are reused.
 showPlots      bool    If true (default) the loaded data is displayed.
                        The figures are arranged automatically depending on
                        config.data.arrangeFigures

 namesObservation string array
 namesDataSet     string array
                        In order to avoid the mapping dialog between model
                        observation and header names in the external data
                        file, the mapping can be specified as a string
                        cell array.

 

Relevant configuration settings

  config.data.*

 

Supported file types

 Please use Excel-95 or ASCII text files if the Excel-COM server is not available.
 Else any Excel file is supported, including xlsx and csv.

 

Structure of data files

 

Meta information

 Data files are ASCII text or Excel files and contain meta information and
 numerical data structured as a matrix. In ASCII files, each line of the meta
 information section starts with '#' to distinguish these lines from
 the numerical data. The tabulator is here used as the column separator.

 Three subsections are distinguished:

 - free user-specific information, e.g. comments

 - Matlab commands having 'MCode' as a keyword in the first column.
   The second column usually contains driving functions, i.e. the used
   stimulations in the corresponding experiment or simulation.
   Attention: The MCode lines will be evaluated by MATLAB. Be careful which commands
   a data file contain and whether they may be harmful to your system!
   Alternatively, the keyword 'Input' can be used, see below.

 - Column names of the data matrix. Usually the last row before the data matrix.

 

MCode and Input section

 Any valid Matlab command can be saved in the MCode section in the
 second column. For PottersWheel, two kind of commands are relevant:

 1. Specification of experimental settings

    Use "MCode  drivingFunctions(1).name = 'Epo';"
    to specify that the first driving function is named 'Epo'.
    Use "MCode  drivingFunctions(1).stimuli(1)=pwGetDrivingFunction('steps',[-1 0 5],  [0 6 0]);"
    to specify that Epo is a step function with values 0, 6, and 0
    at time points -1, 0, and 5.
    A second stimulus could be defined via
    "MCode  drivingFunctions(1).stimuli(2)=pwGetDrivingFunction('steps',[-1 0],  [0 6]);"
    Compare pwAddU.

    Since PW 2.0.55 an alternative approach to specify experimental settings
    can be applied, which avoids the MCode keyword and improves readibility
    by using several spreadsheet cells.
    The above example would be written as:

     Header  Name    StimulusNr  Type   Time points  Values
     Input   Epo     1           steps  -1;0;5       0;6;0
     Input   Epo     2           steps  -1;0         0;6


    Since PW 2.1.09 a name may be specified for each stimulus:

     Header    Number  Name
     Stimulus  1       Epo-Pulse
     Stimulus  2       Epo-Continuous

    If no stimulus name is specified, PottersWheel will assign an automatic
    stimulus names. A systematic stimulus name is important to select a subset
    of stimulations when working with PottersWheel database files (PWDB, see
    pwDbCreate, pwAddDataFromDB).

 2. Specification of experiment-depending initial values for
    dynamical variables x, for dynamic parameters k,
    and for scaling parameters s.

    Use the command "MCode  x0.('A') = 0.34;" to set the initial concentration
    of species A to a value of 0.34.
    Use the command "MCode  k.('production_rate') = 0.23;" to set the
    parameter production_rate to a value of 0.23.
    The same approach can be applied to scaling parameters using e.g.
    "MCode  s.('scalingParName') = 0.1".

    If the initial value or the parameter value is not experiment-dependent,
    it is recommended to specify its value directly in the model definition file.
    Compare pwAddX and pwAddK.

    Alternatively, see pwSetFittedK, pwSetFittedS, pwSetFittedX.

 

Data matrix

 The data matrix should contain one column with the time points.
 The column name should start with "xCol-", e.g. "xCol-Time-min"
 or just with "Time", e.g. "Time-min".
 If the data file comprises multiple stimulations, please use
 the column "parCol-Stimulus" or "Stimulus" to distinguish the stimulations
 from each other: If in some row the value of the stimulus column is 5,
 then all entries in this row belong to stimulus 5.
 If you have only one stimulus, the stimulus column can be neglected.

 

Standard deviations

 If available, the standard deviation can be specified in columns
 with the prefix "stdCol-" before the name of the corresponding column.
 E.g. main column "Erk" and standard deviations in "stdCol-Erk".
 Important: If you want to use the standard deviations as given in the
 data file, please specify this either in the configuration dialog or via:

  config = pwGetConfig;
  config.data.yStdCalculation = 2;
  pwSetConfig(config);

 

General information

 

Model-data mapping

 May ask the user to map file columns to observation functions.
 If tryAutomatic = true (default), PottersWheel checks for saved
 mat files describing the connection between the current observation
 and the data file. If you pressed 'Save' in the same mapping
 dialog earlier, the connection mat file will be reused.

 

Recommendations

 It is recommended to use only the following characters inside the file:
 A-Za-z_,0-9 #.'-[]():
 In ASCII files, columns have to be separated by a tabulator.
 The filename should contain only [a-zA-Z0-9] and the underscore _.

 

Example

 Format since PottersWheel version 2.0.55:

 # PottersWheel Data Format 2.0.55
 # Test file with experimental data.
 # Stimulation with Epo.
 # Experiment: Adam Smith.
 # Two stimulations: 1 Continuous, 2 Pulse (5 min). Both with dose 6.
 # Two observations: A and B
 #
 # Header  Name    Stimulus Type   Time points  Values
 # Input   Epo     1        steps  -1;0;5       0;6;0
 # Input   Epo     2        steps  -1;0         0;6
 #
 # Stimulus   Time   A_obs    B_obs
 1            0      11.707   0.38078
 1            3      4.17596  3.51887
 1            6      1.71684  6.62109
 1            9      1.83223  6.56341
 1            12     1.34706  6.32869
 2            0      13.707   0.58078
 2            3      5.17596  4.51887
 2            6      2.71684  7.62109
 2            9      2.83223  7.56341
 2            12     2.34706  7.32869

 Alternatively the old format can be used:

 # Test file with experimental data.
 # Stimulation with Epo.
 # Experiment: Adam Smith.
 # Two stimulations: 1 Continuous, 2 Pulse (5 min). Both with dose 6.
 # Two observations: A and B
 # Driving functions:
 # MCode  drivingFunctions(1).name = 'Epo';
 # MCode  drivingFunctions(1).stimuli(1)=pwGetDrivingFunction('steps',[-1 0],  [0 6]);
 # MCode  drivingFunctions(1).stimuli(2)=pwGetDrivingFunction('steps',[-1 0 5],[0 6 0]);
 #
 # parCol-Stimulus   xCol-Time   A_obs    B_obs
 1                   0           11.707   0.38078
 1                   3           4.17596  3.51887
 1                   6           1.71684  6.62109
 1                   9           1.83223  6.56341
 1                   12          1.34706  6.32869
 2                   0           13.707   0.58078
 2                   3           5.17596  4.51887
 2                   6           2.71684  7.62109
 2                   9           2.83223  7.56341
 2                   12          2.34706  7.32869



See also

pwGetDrivingFunction
pwGetDrivingFunctionCont
pwGetDrivingFunctionPulse
pwAddModel
pwSelect
pwGetDataSet
pwGetConfig
pwGetDrivingFunctionsFromFile
pwSetFittedK
pwSetFittedS
pwSetFittedX