XML

WellReader can import and export data in the XML format. The purpose is to offer an easy way to access information from other applications. The XML structure is based on the MATLAB `WR` struct, and thus is very similar to it. The main difference is the storage of the data points: in WR they are stored linearly, i.e., the corrected_signal field is an array of values, whereas in XML the values (original_signal, corrected_signal, outlier, etc) are grouped together according to the time-point of the measurement. The XML format follows the XML schema rules.

  1. XML
    1. XML example
    2. XML Schema

XML example

<?xml version="1.0" encoding="ISO-8859-1"?>
<wellreader version="0.5"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="file:wellreader.xsd">
    <experiment_info>
        <author>Bruno Besson</author>
        <notebook_page>1</notebook_page>
        <description>This is a sample XML file</description>
        <initial_time>2006-11-17T12:13:24</initial_time>
        <program name="program1">
            <header name="Assay" value="hans_abs"/>
            <header name="Software" value="Fusion 4.00"/>
            <header name="Lamp Intensity" value="10"/>
            <measure_reference type="Absorbance">abs1</measure_reference>
            <measure_reference type="RFU">RFU1</measure_reference>
        </program>
    </experiment_info>
    <global_parameters>
        <plasmid_copies>20</plasmid_copies>
        <RFU_default_gamma>0.01</RFU_default_gamma>
        <RLU_default_gamma>0.01</RLU_default_gamma>
        <protein_default_gamma>0.001</protein_default_gamma>
        <absorbance_detection_limit>0.01</absorbance_detection_limit>
    </global_parameters>
    <well name="A1" id ="1" sample_type="UNK1">
        <measure_type name="Absorbance">
            <measure name="abs1">
                <value time="0" original_signal="12" corrected_signal="11" />
                <value time="0.3" original_signal="79" corrected_signal="77" outlier="true" />
                <value time="0.6" original_signal="16" corrected_signal="14" />
                <background_correction reference_well="H9">
                    <time_shift>200</time_shift>
                    <growth_difference>1.02</growth_difference>
                </background_correction>
                <fit spline_type="pp2sp" parameter="0.000628"/>
            </measure>
        </measure_type>
        <measure_type name="RFU">
            <measure name="RFU1">
                <value time="0.2" original_signal="150" corrected_signal="15" />
                <value time="0.5" original_signal="157" corrected_signal="21" />
                <value time="0.8" original_signal="163" corrected_signal="25" />
                <background_correction reference_well="H9">
                    <time_shift>-150</time_shift>
                    <growth_difference>1</growth_difference>
                </background_correction>
                <fit spline_type="pp2sp" parameter="0.000628"/>
            </measure>
        </measure_type>
    </well>
    <well name="H9" id ="93" sample_type="UNK2">
        <measure_type name="Absorbance">
            <measure name="abs1" is_background="true">
                <value time="0.1" original_signal="1" />
                <value time="0.4" original_signal="2" />
                <value time="0.7" original_signal="2" />
                <fit spline_type="pp2sp" parameter="0.00063"/>
            </measure>
        </measure_type>
        <measure_type name="RFU">
            <measure name="RFU1" is_background="true">
                <value time="0.2" original_signal="150" corrected_signal="15" />
                <value time="0.5" original_signal="157" corrected_signal="21" />
                <value time="0.8" original_signal="163" corrected_signal="25" />
                <fit spline_type="pp2sp" parameter="0.0000628"/>
            </measure>
        </measure_type>
    </well>
</wellreader>

XML Schema

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:annotation>
        <xsd:documentation>
            Definition schema for wellreader (version 0.5 from 2006/01/10)
            0.4 -> 0.5
              * Added attribute id to well, corresponding to its numbered position (from 1 to 96)
            0.3 -> 0.4
              * Reintroduced a measure's type information in programs
            0.2 -> 0.3
              * Removed useless global parameters: RLU_detection_limit and
                RFU_detection_limit
            0.1 -> 0.2
              * Introducing a level distinction between a measure type and the measure itself.
                Now the hierarchy is well > measure_type > measure
              * Mixing comment and description in a single field: description
            0.1
              * Initial proposal
        </xsd:documentation>
    </xsd:annotation>

    <xsd:simpleType name="measureType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                The 'type' attribute of the 'measure' element may be only one
                of 'absorbance', 'RFU' or 'RLU'
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="absorbance" />
            <xsd:enumeration value="RFU" />
            <xsd:enumeration value="RLU" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="wellId">
        <xsd:restriction base="xsd:integer">
            <xsd:minInclusive value="1" />
            <xsd:maxInclusive value="96" />
        </xsd:restriction>
    </xsd:simpleType>

    <!-- Declaration of simple elements -->

    <xsd:element name="author" type="xsd:string" />
    <xsd:element name="notebook_page" type="xsd:string" />
    <xsd:element name="description" type="xsd:string" />
    <xsd:element name="initial_time" type="xsd:dateTime">
        <xsd:annotation>
            <xsd:documentation>
                'initial_time' is time 0 when the experiment started. All times
                given as decimal values refer to this date. The entry is
                written in the format 'YYYY-MM-DDThh:mm:ss' e.g.
                '2006-11-20T10:32:15'.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="plasmid_copies" type="xsd:positiveInteger" />
    <xsd:element name="RFU_default_gamma" type="xsd:decimal" />
    <xsd:element name="RLU_default_gamma" type="xsd:decimal" />
    <xsd:element name="protein_default_gamma" type="xsd:decimal" />
    <xsd:element name="absorbance_detection_limit" type="xsd:decimal" />
    <xsd:element name="time_shift" type="xsd:decimal" />
    <xsd:element name="growth_difference" type="xsd:decimal" />

    <!-- Declaration of complex elements -->

    <xsd:element name="header">
        <xsd:annotation>
            <xsd:documentation>
                A 'header' contains information found at the begin of every
                program. It consists of a 'name' and its corresponding 'value'.
                E.g., one may find 'Lamp Intensity' at value '10'
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:attribute name="name" type="xsd:string" use="required" />
            <xsd:attribute name="value" type="xsd:string" use="required" />
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="measure_reference" type="xsd:string">
        <xsd:annotation>
            <xsd:documentation>A reference to a measure</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:attribute name="type" type="measureType" us="required" />
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="program">
        <xsd:annotation>
            <xsd:documentation>
                A program defines a set of measures run over time, using
                specific conditions. It often consists of only one measure
                (e.g. RFU) but may contain more than one.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="header" minOccurs="0" maxOccurs="unbounded" />
                <xsd:element ref="measure_reference" maxOccurs="unbounded" />
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:ID" use="required" />
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="experiment_info">
        <xsd:annotation>
            <xsd:documentation>
                An 'experiment_info' element contains various general info such
                as 'author' and the list of programs run with the experiment.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="author" minOccurs="0" />
                <xsd:element ref="notebook_page" minOccurs="0" />
                <xsd:element ref="description" minOccurs="0" />
                <xsd:element ref="initial_time" />
                <xsd:element ref="program" maxOccurs="unbounded" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="global_parameters">
        <xsd:annotation>
            <xsd:documentation>
                'global_parameters' are some parameters specific to the
                analysis of the measurements, and have no relations to the
                experiment itself.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="plasmid_copies" />
                <xsd:element ref="RFU_default_gamma" />
                <xsd:element ref="RLU_default_gamma" />
                <xsd:element ref="protein_default_gamma" />
                <xsd:element ref="absorbance_detection_limit" />
                <xsd:element ref="RFU_detection_limit" />
                <xsd:element ref="RLU_detection_limit" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="value">
        <xsd:annotation>
            <xsd:documentation>
                A 'value' is like a coordinate, containing various signals and
                info for a given time. These may be both read or computed
                values.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:attribute name="time" type="xsd:decimal" use="required" />
            <xsd:attribute name="original_signal" type="xsd:decimal" use="required" />
            <xsd:attribute name="corrected_signal" type="xsd:decimal" use="optional" />
            <xsd:attribute name="outlier" type="xsd:boolean" use="optional"
                           default="false" />
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="background_correction">
        <xsd:annotation>
            <xsd:documentation>
                A 'background_correction' element regroups parameters used to
                correct a signal read. It consists of the well used as a
                reference and the parameters applied.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="time_shift" />
                <xsd:element ref="growth_difference" />
            </xsd:sequence>
            <xsd:attribute name="reference_well" type="xsd:string" use="required" />
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="fit">
        <xsd:annotation>
            <xsd:documentation>
                A 'fit' may apply to the corrected signal (if we study it) or
                to the original one (if the well is defined as a background one
                for the present measure).
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:attribute name="spline_type" type="xsd:string" fixed="pp2ps" />
            <xsd:attribute name="parameter" type="xsd:decimal" use="required" />
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="measure">
        <xsd:annotation>
            <xsd:documentation>
                A 'measure' consists of an enumeration of values plus various
                computations applied (such as fit or background correction). It
                may be defined as a background measure or not.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="value" maxOccurs="unbounded" />
                <xsd:element ref="background_correction" minOccurs="0" />
                <xsd:element ref="fit" />
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required" />
            <xsd:attribute name="is_background" type="xsd:boolean" use="optional"
                           default="false" />
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="measure_type">
        <xsd:annotation>
            <xsd:documentation>
                A 'measure_type' regroups all 'measure' elements of the same type
                for a given well.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="measure" minOccurs="0" maxOccurs="unbounded" />
            </xsd:sequence>
                <xsd:attribute name="name" type="measureType" use="required" />
            </xsd:complexType>
    </xsd:element>

    <xsd:element name="well">
        <xsd:annotation>
            <xsd:documentation>
                A 'well' contains three 'measure_type' (respectively 'RFU', 'RLU'
                and 'Absorbance')  Each of them contains effective measures.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="measure_type" minOccurs="3" maxOccurs="3" />
            </xsd:sequence>
            <xsd:attribute name="name" use="required" type="xsd:ID" />
            <xsd:attribute name="sample_type" use="required" type="xsd:string" />
            <xsd:attribute name="id" use="required" type="wellId" />
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="wellreader">
        <xsd:annotation>
            <xsd:documentation>Root element</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="experiment_info" />
                <xsd:element ref="global_parameters" />
                <xsd:element ref="well" minOccurs="1" maxOccurs="unbounded" />
            </xsd:sequence>
            <xsd:attribute name="version" type="xsd:string" use="required" fixed="0.5" />
        </xsd:complexType>
    </xsd:element>
</xsd:schema>