Designing MOBY-S Objects
Fundamental Facts about MOBY-S Objects
MOBY-S objects are simple XML-based documents. The object-type must exist in the ObjectOntology, and the serialization of this ontology node precisely defines the structure of the resulting XML representation of that object. Here are some fundamental facts about MOBY objects:
All MOBY objects are derived from the root Object
, which
can be considered to be nothing more than an identifier.
The attributes of Object
are namespace
and id
, either of which may be null.
The Object
datatype has no value (XML content), it
consists exclusively of a MobyNamespace
and an identifier within that namespace (e.g., namespace=NCBI_gi,
id=163483).
The Object types String
, Integer
,
Float
, and DateTime
are allowed to have
additional content; the content is of the type described by the object
name.
Namespaces
MobyNamespace's are limited by a controlled vocabulary. For example, NCBI_gi is the namespace assigned to Genbank 'gi' numbers.Because of the inconsistencies in identifier nomenclature, identifiers in MOBY do not include a prefix. Two examples: "GO:0003456" is correctly written 0003456; and "gi|163483" is correctly written 163483.
Note that the Generic_Keyword namespace is a peculiar one - the id
attribute contains one or more words or phrases representing a SINGLE
keyword entry: e.g., namespace="Generic_Keyword" id="DNA
helicase inhibitor"
Types of relationships in the object ontology
The ObjectOntology includes three types of relationships that allow the existence of more complex MOBY Objects- ISA - is an inheritence relationship, indicating that all properties of the parent are present in the child. This includes the namespace and id attributes, and the ability to have "content". Only one ISA parent is allowed for any ObjectOntology node (i.e. Object Class)
- HASA - is a container relationship with cardinality
1.
Foo
HASABar
indicates that the Object typeFoo
contains exactly one instance of Object typeBar
- HAS - is a container relationship with cardinality 1 or
more.
Foo HAS Bar
indicates that the Object typeFoo
contains at least one instance of Object typeBar
. Contained objects are named according to the role they play relative to the containing parent. This information is carried in thearticleName
attribute
Examples of Objects
A MOBY Object representing a Generic_Keyword 'Arabidopsis thaliana'
Object (is root)
<Object namespace = 'GenericKeyword' id = 'Arabidopsis thaliana'/>
A MOBY Object representing a simple Genbank 'gi' number 163483
Object (is root)
<Object namespace = 'NCBI_gi' id = '163483'/>
The VirtualSequence instantiation of the same object
VirtualSequence ISA Object VirtualSequence HASA Integer (articleName Length)
<VirtualSequence namespace = 'NCBI_gi' id = '163483'> <Integer namespace = '' id = '' articleName = 'Length'> 947 </Integer> </VirtualSequence>Note that the contained Integer object is anonymous (no namespace or id), but its role within the containing VirtualSequence parent is defined by its articleName 'Length'.
The DNASequence instantiation of the same object
DNASequence ISA GenericSequence GenericSequence ISA VirtualSequence VirtualSequence ISA Object VirtualSequence HASA Integer ( articleName Length ) GenericSequence HASA String ( articleName SequenceString)
<DNASequence namespace = 'NCBI_gi' id = '163483'> <Integer namespace = '' id = '' articleName = 'Length'> 947 </Integer> <String namespace = '' id = '' articleName = 'SequenceString'> GGGCGTGGCAACATGCTGCGCTTGCTGGTGTTCACCTCTCTCGTCCTTTATGGACACAGCACCCAGGACTTTCCAGAAACCAACGCCCGGGTAGTTGGAG ... </String> </DNASequence>
A Hypothetical 'Primer Pair' Object containing two DNASequence objects
PrimerPair ISA Object PrimerPair HASA DNASequence ( articleName fivePrime) PrimerPair HASA DNASequence ( articleName threePrime)
<PrimerPair namespace = '' id = ''> <DNASequence namespace = 'PrimerDB' id = 'AS212334' articleName = 'fivePrime'> <Integer namespace = '' id = '' articleName = 'Length'> 23 </Integer> <String namespace = '' id = '' articleName = 'SequenceString'> TGGTGTTCACCTCTCTCGTCCTT </String> </DNASequence> <DNASequence namespace = 'PrimerDB' id = 'AS8873484' articleName = 'threePrime'> <Integer namespace = '' id = '' articleName = 'Length'> 25 </Integer> <String namespace = '' id = '' articleName = 'SequenceString'> GGGCGTGGCAACATGCTGCGCTTGC </String> </DNASequence> </PrimerPair>Note that the outermost PrimaryPair object is anonymous in this case, but it contains two DNASequence objects that are not anonymous; likely derived from some proprietary database in the namespace 'PrimerDB'.
Note also that the Integer and String object's articleName attributes do not change when they are more deeply contained! i.e. the articleName indicates the relationship that contained object has to its immediate parent, not to the outermost parent.