Customising the attribute definition

Related Topics: Attributes  |  Attribute XML Format  |  Contents

The master attribute definition file is the standard file that is supplied with maxdLoad. When a new database is created, the attribute definition is simply a reference to the master definition which is held in:

  http://www.bioinf.man.ac.uk/microarray/maxd/xml/standard-attributes.xml

Whilst it is possible to create a local version of the attribute definition file and edit it directly, the recommended method for altering the definition is to reference the master version of the file and use three special tags to add, modify or remove attributes as required.

Adding Attributes

The simple form of the AddAttribute element looks like this:

  <AddAttribute parent="SomeExistingGroupName">
    <Integer name="My New Thing"/>
  </AddAttribute>

The 'parent' should be set to the name of a <Group> attribute that has already been defined, for example "Source" or "Source.Cell Type". The new attribute will be added to the group after the existing children of that group.

Attributes can also be inserted into particular positions within a group by specifying a position relative to an existing child attribute of the group, for example:

  <AddAttribute parent="SomeExistingGroupName"
                position="after"
                target="OneOfTheChildrenOfTheGroup">
    <String name="My Extra Attribute"/>
  </AddAttribute>

The 'position' can be either "before" or "after".

An AddAttribute element can contain either a single attribute (i.e. String, Integer and so on) or a Group attribute.

Only one attribute can be specified in an AddAttribute element, but any number of AddAttribute elements can be provided in the attribute definition.

Attribute names must not contain the "." character as this character is used to separate the components of the name, for example "Source.Age.Initial Time Point".

Modifying Attributes

It is also possible to modify certain features of existing attribute definitions, for instance setting (or changing) the default value:

  <ModifyAttribute name="AttributeName"
                   default="NewDefaultValue"
  </ModifyAttribute>

The 'name' should identify an existing attribute definition. The name of the attribute should be the full name, which can be found by selecting the "What is this attribute" option from the menu displayed when right-clicking on the attribute name in any of the data entry or display forms which contain the attribute.

Details of the various parameters that can be changed can be found on the attribute definition syntax page.

Removing Attributes

Unwanted attributes can be removed from the definition using the RemoveAttribute element as follows:

  <RemoveAttribute name="AttributeName" />

The name of the attribute should be the full name, which can be found by selecting the "What is this attribute" option from the menu displayed when right-clicking on the attribute name in any of the data entry or display forms which contain the attribute.

It is possible to remove both single attributes (i.e. String, Integer and so on) and Group attributes.

How to reference the standard definition

In most cases, it will be desirable to retain a reference to the master attribute definition so that any changes made to it, for example in response to updates in the MIAME standard, will appear in your database.

To accomplish this, your customised attribute definition should start with a reference to the master definition, and then use the AddAttribute, ModifyAttribute and RemoveAttribute elements to make your desired modifications. The following example shows how this works:

  <AttributeDefinition identifier="My Customised Definitions">

    <Include url="http://www.bioinf.man.ac.uk/microarray/maxd/xml/standard-attributes.xml"/>

    <AddAttribute parent="Source" position="after" target="Lab Code">
      <Group name="Store Location">
        <Integer name="Freezer Number"/>
        <Integer name="Shelf Number" />
        <Integer name="Jar Number" />
      </Group>
    </AddAttribute>

    <ModifyAttribute name="Source.Organism.Standard Ontology.Value" default="Homo Sapiens"/>

    <RemoveAttribute name="Feature.Absolute Position" />
    <RemoveAttribute name="ArrayType.Feature Size.Height" />

  </AttributeDefinition>