Creating a XML description of an agdbnet database
Here we'll generate the XML description for a simple one locus peptide database. Please see the description of XML attributes for details of each of the tags and more complex examples to see how they are used.
Every agdbnet XML file contains a XML declaration stating the XML version and character encoding, followed by an <agdb> opening tag:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<agdb>
The first part of the description is contained within <system> tags - this contains information required by the software to access the database and create the web site:
<system longcode="poravr" webroot="/nm/typing/pora" indexpage="" description="Neisseria meningitidis PorA variable regions" downloadFASTAonly="yes" updatescript="/usr/local/neisseria.org/mkporatables"></system>
Next, the loci are defined, with each locus contained within <locus> tags. The locus definition contains tags that define either nucleotide or peptide tables (or both):
<locus fullname="variable region 1">
<peptide>
The peptide table can contain any number of fields, but must contain at least an id and a sequence field. Fields are defined within <field> tags (a sequence field with length '0' means the sequences are variable length):
<field type="text" length="5" userupdate="no">id</field>
<field type="text" length="0">sequence</field>
Various housekeeping fields are included in all tables so that submissions can be tracked by submitter, curator and date:
<field type="int" maindisplay="no" length="4" comments="sender unique id, link to users table">sender</field>
<field type="int" maindisplay="no" length="4" comments="curator unique id, link to users table">curator</field>
<field type="date" maindisplay="no" length="10" comments="date first entered">date_entered</field>
<field type="date" maindisplay="no" length="10" userupdate="no" comments="date last modified">datestamp</field>
All open tags must be closed:
</peptide>
</locus>
</agdb>