| A bx-annotation:annotation is a collection of bx-features which are designated by a human expert. Importantly, this is considered a seperate case from a bx-computation:computation, which is also a collection of bx-features - but are computer generated.
The bx-annotation:annotation mirrors the bx-computation:computation in structure, but has a crucial difference - the bx-annotation:evidence tag. One needs to back up an annotation with evidence( this can be a one-to-one or one-to-many relationship). The evidence can be a bx-link to a bx-computation:computation (either the local document or an external source), a bx-computation:computation_span. It can also be a description by the author and/or a bx-link:dbxref.
You'll see that there are two bx-link's in bx-annotation:annotation. One is just a bx-link:link, the other is wrapped by a bx-annotation:seq_link. The bx-annotation:seq_link is specifically to point to the sequence which is being annotated, whereas the bx-link:link is for a bxlink:dbxref to a published paper or to other xml of interest. This dtd's url is http://www.bioxml.org/dtds/current/annotation.dtd.
<!ENTITY % feature SYSTEM "feature.dtd">
<!ENTITY % seq SYSTEM "seq.dtd">
<!-- bx-link is imported by bx-seq -->
%feature;
%seq;
<!ELEMENT bx-annotation:annotation (
bx-annotation:name?,
bx-annotation:type,
bx-annotation:seq_link,
bx-link:link*,
bx-annotation:description?,
bx-annotation:feature_set*,
bx-annotation:produces_seq?
)>
<!ATTLIST bx-annotation:annotation
xmlns:bx-annotation CDATA #FIXED "http://www.bioxml.org/dtds/annotation/v0_1"
bx-annotation:id ID #REQUIRED
>
<!ELEMENT bx-annotation:seq_link (
bx-link:link
)>
<!ELEMENT bx-annotation:feature_set (
bx-annotation:name?,
bx-annotation:type,
bx-annotation:author?,
bx-annotation:creation_date?,
bx-annotation:version?,
bx-annotation:evidence*,
bx-annotation:description?,
bx-annotation:feature_span*,
bx-annotation:produces_seq?
)>
<!ATTLIST bx-annotation:feature_set
bx-annotation:id ID #REQUIRED
>
<!ELEMENT bx-annotation:feature_span (
bx-annotation:evidence*,
bx-annotation:tag_residues?,
bx-feature:feature
)>
<!ATTLIST bx-annotation:feature_span
bx-annotation:id ID #REQUIRED
>
<!ELEMENT bx-annotation:produces_seq (
bx-seq:seq |
bx-link:link
)>
<!ELEMENT bx-annotation:name (#PCDATA)>
<!ELEMENT bx-annotation:type (#PCDATA)>
<!ELEMENT bx-annotation:author (
( bx-annotation:first_name,
bx_annotation:last_name)
)>
<!ATTLIST bx-annotation:author
email CDATA #IMPLIED
url CDATA #IMPLIED
>
<!ELEMENT bx-annotation:creation_date (#PCDATA)>
<!ELEMENT bx-annotation:version (#PCDATA)>
<!ELEMENT bx-annotation:description (#PCDATA)>
<!ELEMENT bx-annotation:evidence (
bx-link:link*,
description?
)>
<!ATTLIST bx-annotation:evidence
type CDATA #IMPLIED
>
And the example. You can validate this file with your java xerces (assuming you're running linux/unix) with the command:
- java sax.SAXCount -Nwv http://www.bioxml.org/samples/annotation.xml The -v flag means validate. The -w is warmup the parser before timing and -N means turnoff namespaces so that FullyQualified? names don't give weird errors. This program doesn't do anything other than validate, count the tags in, and time the parsing of the document.
:
<?xml version="1.0"?>
<!DOCTYPE bx-annotation:annotation SYSTEM "/home/brad/tmp/dtds/annotation.dtd">
<bx-annotation:annotation
xmlns:bx-annotation="http://www.bioxml.org/dtds/annotation/v0_1"
bx-annotation:id='annot1'>
<bx-annotation:type>exon</bx-annotation:type>
<bx-annotation:seq_link>
<bx-link:link xmlns:bx-link="http://www.bioxml.org/dtds/bx-link/v0_1">
<bx-link:simple_xlink
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="dna.xml#xpointer(id('b45'))"
xlink:role="bx-seq:seq"
xlink:title="The sequence we're annotating."
xlink:show="embed"
xlink:actuate="user">seq
</bx-link:simple_xlink>
</bx-link:link>
</bx-annotation:seq_link>
<bx-annotation:feature_set
bx-annotation:id='b52'>
<bx-annotation:type>transcript</bx-annotation:type>
<bx-annotation:feature_span
bx-annotation:id='b108'>
<bx-annotation:evidence>
<bx-link:link xmlns:bx-link="http://www.bioxml.org/dtds/bx-link/v0_1">
<bx-link:simple_xlink
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="comp.xml#xpointer(id('b52'))"
xlink:role="bx-computation:feature_span"
xlink:title="The computation feature-span."
xlink:show="embed"
xlink:actuate="user">computation span
</bx-link:simple_xlink>
</bx-link:link>
</bx-annotation:evidence>
<bx-feature:feature
xmlns:bx-feature="http://www.bioxml.org/feature/v0_1"
bx-feature:id='b46'>
<bx-feature:type>exon1</bx-feature:type>
<bx-feature:seq_relationship>
<bx-feature:span>
<bx-feature:start>5</bx-feature:start>
<bx-feature:end>25</bx-feature:end>
</bx-feature:span>
</bx-feature:seq_relationship>
</bx-feature:feature>
</bx-annotation:feature_span>
</bx-annotation:feature_set>
</bx-annotation:annotation>
And finally, onto the TutorialConclusions.
--BradMarshall
Related pages: Unclassified?
|