Differences between revisions 5 and 6
Revision 5 as of 2015-12-23 10:06:50
Size: 4540
Comment:
Revision 6 as of 2015-12-23 11:01:12
Size: 6929
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
{{attachment:animinfo_types_menu.png}}

'
''Figure 1'''
{{attachment:animinfo_types_menu.png}}<<BR>>''Figure 1''
Line 21: Line 19:
 * '''!AnimInfo Types''' groups related !AnimInfo attributes (see below) together into a coherent logical unit in the !AnimInfo file format. They are indicated by UPPERCASE names and only alphanumeric characters are allowed, plus underscore(_) and hyphen(-)..  * '''!AnimInfo Types''' groups related !AnimInfo attributes (see below) together into a coherent logical unit in the !AnimInfo file format. They are indicated by UPPERCASE names and only alphanumeric characters are allowed, plus underscore(_) and hyphen(-).
Line 28: Line 26:
{{attachment:animinfo_overview.png}}

'
''Figure 2'''
{{attachment:animinfo_overview.png}}<<BR>>''Figure 2''
Line 34: Line 30:
=== Assembling an !AnimInfo file === === Assembling an AnimInfo file ===

The !AnimInfo file format is an XML file format. For basic information on XML, see [[https://en.wikipedia.org/wiki/XML]] or [[public/XMLdigest]]. XML is a flexible system for complex data files and was choosen for !AnimInfo in order to ensure easy future development and extension of the module's file format and capabilities, as well as a fitting format for the current data model.

The structure of the !AnimInfo XML file format is as following:

 * '''interbull''': The root element of the Interbull XML file formats. It requires the XML attributes '''type''' and '''version''', where the values should be ''animinfo'' and ''1.0'' respectively.
  * '''animals''': The animals element defines the section which lists all animals and their !AnimInfo data.
   * '''a''': the ''animals'' section contains several a-elements which each represents a single animal. Every a-element should have an '''id'''-attribute which is the animal's international id (AID).
    * '''ANIMINFO TYPE''': Every animal specified by the a-element may have one or more unique !AnimInfo types specified, with each's respective attributes defined.

'''Example 1:'''
Take a file which will upload %RH-genes information about two animals. Then the correctly formatted !AnimInfo XML data file would look like this:
{{{#!highlight xml

<interbull type="animinfo" version="1.0">
  <animals>
    <a id="HOLUSAM000000000X11">
      <RH_GENES percent="50" />
    </a>
    <a id="HOLDEUF000000000Y22">
      <RH_GENES percent="N/A" />
    </a>
  </animals>
</interbull>

}}}

'''Example 2:''' A more complex example would like to upload %RH-genes and Genolist data (which specifies whether the animal has been genotyped or not, and if it this animal's genotype is public or not) for four animals:
{{{#!highlight xml

<interbull type="animinfo" version="1.0">
  <animals>
    <a id="HOLUSAM000000000X11">
      <RH_GENES percent="50" />
      <GENOLIST genotyped="Y" public="Y" />
    </a>
    <a id="HOLDEUF000000000Y22">
      <RH_GENES percent="N/A" />
      <GENOLIST genotyped="Y" public="N" />
    </a>
    <a id="HOLUSAM000000000X45">
      <RH_GENES percent="50" />
      <GENOLIST genotyped="N" />
    </a>
    <a id="HOLDEUF000000000Y67">
      <GENOLIST genotyped="Y" public="Y" />
      <RH_GENES percent="N/A" />
    </a>
  </animals>
</interbull>

}}}

IDEA AnimInfo User Manual

Preface

The IDEA AnimInfo is a module in the Interbull Centre Data Exchange website that allows organizations to upload additional information — like %RH-genes or if the animal is genotyped — tied to animals in the pedigree, and to make this information available to the Interbull Centre and/or to other organizations in the IDEA system. The following is a description on how to, as an end-user, prepare and upload additional animal information to IDEA.

AnimInfo usage

AnimInfo allows storing additional data and information about animals in the pedigree in the IDEA database. The purpose of the AnimInfo is to gather reported data from sources, not to verify or authorize that information. To add data into AnimInfo one prepares an AnimInfo file according to the specification, and uploads it to IDEA. Depending on the type of information uploaded it will be available for viewing and uploading by none, some or all other organizations in IDEA. For some AnimInfo data only the authorized organization may view and upload data, for other data it is possible for some or all organizations to view and/or upload it. If more than one organization uploads the same type of data for the same animal all the uploaded information will be shown when querying that animal, with indications from which organization the different pieces of data come from.

Preparation

animinfo_types_menu.png
Figure 1

In order to add additional information to animals in IDEA one has to know which types of information that are allowed in IDEA AnimInfo. This can be found by clicking on the AnimInfo -> Types menu item in the bar menu in IDEA (see figure 1). Here you will be shown a list of the allowed AnimInfo types, attributes and values:

  • AnimInfo Types groups related AnimInfo attributes (see below) together into a coherent logical unit in the AnimInfo file format. They are indicated by UPPERCASE names and only alphanumeric characters are allowed, plus underscore(_) and hyphen(-).

  • AnimInfo Attributes holds the actual information of the relevant AnimInfo type in a list of name/value-pairs, for example genotyped="Y". The first part, before the equal(=) sign is the name of the attribute, and is in lowercase, and the part after the equal sign and within quotation marks (") is the value of that attribute (see below). As with the types the attribute name can only contain alphanumeric characters, underscore and hyphen. An AnimInfo type can contain from one to several related attributes — some of which are required, others are optional. An attribute can only be specified once for each AnimInfo type, organization and animal.

  • AnimInfo Values sets the value of each attribute for each animal. The value must conform to the specification of the attribute, which can be different from attribute to attribute; ranging from a free-form text string, to a set of predefined values, to a defined pattern the value must match.

In the AnimInfo -> Types page in IDEA you will find an overview of all the available types, attributes and values in the AnimInfo module. There one finds a bullet list of the AnimInfo types, in bold, uppercase letters, and with a short description in italic. Below each type, in a sub-listlevel, the type's attributes are listed in lowercase. After each attribute, in parantheses, the attribute value type is specified. Also, there is a short description in italics for each attribute. In the case of attributes with a predefined set of allowed values, these are listed in yet another level of the list, below the relevant attribute. Below the AnimInfo types and attribute overview one finds a specification of the value types available, with a description on which pattern the value must conform to.

animinfo_overview.png
Figure 2

Here, in Figure 2, one can see the specification of the %RH-genes AnimInfo data structure, where the type is specified as RH_GENES, and it has a single attribute, percent. The percent has the value type percent with not available, which is defined in the list of value types as A numerical, integer value between 0 and 100, with the string N/A if not available. This means that one can upload %RH-genes percent values (which is either a percent value or N/A for missing values) for every animal, using the AnimInfo file format.

Assembling an AnimInfo file

The AnimInfo file format is an XML file format. For basic information on XML, see https://en.wikipedia.org/wiki/XML or public/XMLdigest. XML is a flexible system for complex data files and was choosen for AnimInfo in order to ensure easy future development and extension of the module's file format and capabilities, as well as a fitting format for the current data model.

The structure of the AnimInfo XML file format is as following:

  • interbull: The root element of the Interbull XML file formats. It requires the XML attributes type and version, where the values should be animinfo and 1.0 respectively.

    • animals: The animals element defines the section which lists all animals and their AnimInfo data.

      • a: the animals section contains several a-elements which each represents a single animal. Every a-element should have an id-attribute which is the animal's international id (AID).

        • ANIMINFO TYPE: Every animal specified by the a-element may have one or more unique AnimInfo types specified, with each's respective attributes defined.

Example 1: Take a file which will upload %RH-genes information about two animals. Then the correctly formatted AnimInfo XML data file would look like this:

   1 <interbull type="animinfo" version="1.0">
   2   <animals>
   3     <a id="HOLUSAM000000000X11">
   4       <RH_GENES percent="50" />
   5     </a>
   6     <a id="HOLDEUF000000000Y22">
   7       <RH_GENES percent="N/A" />
   8     </a>
   9   </animals>
  10 </interbull>

Example 2: A more complex example would like to upload %RH-genes and Genolist data (which specifies whether the animal has been genotyped or not, and if it this animal's genotype is public or not) for four animals:

   1 <interbull type="animinfo" version="1.0">
   2   <animals>
   3     <a id="HOLUSAM000000000X11">
   4       <RH_GENES percent="50" />
   5       <GENOLIST genotyped="Y" public="Y" />
   6     </a>
   7     <a id="HOLDEUF000000000Y22">
   8       <RH_GENES percent="N/A" />
   9       <GENOLIST genotyped="Y" public="N" />      
  10     </a>
  11     <a id="HOLUSAM000000000X45">
  12       <RH_GENES percent="50" />
  13       <GENOLIST genotyped="N" />
  14     </a>
  15     <a id="HOLDEUF000000000Y67">
  16       <GENOLIST genotyped="Y" public="Y" />
  17       <RH_GENES percent="N/A" />
  18     </a>
  19   </animals>
  20 </interbull>

public/IDEA_animinfo_manual (last edited 2024-01-17 15:55:20 by Valentina)