Differences between revisions 10 and 13 (spanning 3 versions)
Revision 10 as of 2009-02-12 01:03:12
Size: 2661
Editor: localhost
Comment: converted to 1.6 markup
Revision 13 as of 2012-03-03 00:35:57
Size: 5258
Editor: server2
Comment: Added example section and removed pitfalls
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

[[http://www.cs.rpi.edu/~puninj/XGMML/|XGMML]] is an XML version of [[http://infosun.fmi.uni-passau.de/Graphlet/GML/|GML]].  
[[http://www.cs.rpi.edu/~puninj/XGMML/|XGMML]] is an XML version of [[http://infosun.fmi.uni-passau.de/Graphlet/GML/|GML]].
Line 6: Line 5:
In the future releases, Cytoscape's standard format for saving graph layout will be XGMML. Users can save graph topology AND attributes in the same file. In future releases, Cytoscape's standard format for saving graph layout will be XGMML. Users can save graph topology AND attributes in the same file.
Line 12: Line 11:
In Cytoscape v2.3, a new concept called Metanode will be introduced. In XGMML, metanode is a node which has a subgraph containing nodes and edges. For more information, please read [[Metanode_In_XGMML]] section. In Cytoscape v2.3, a new concept called Metanode will be introduced. In XGMML, a metanode is a node which has a subgraph containing nodes and edges. For more information, please read [[Metanode_In_XGMML]] section.
Line 21: Line 20:
  * This is a general information for the network. Generic information like network name, date modified, etc. will be inserted here. The data format used for network meta-information is RDF (Resource Description Framework). The supported attributes are taken from Dublin Core Metadata Element Set (DCMES):
       * Title
       * Creator
     * Subject
       * Description
       * Publisher
       * Contributor
       * Date
     * Type
       * Format
       * Identifier
       * Source
       * Language
       * Relation
       * Coverage
       * Rights
  * This is general information for the network. Generic information like network name, date modified, etc. will be inserted here. The data format used for network meta-information is RDF (Resource Description Framework). The supported attributes are taken from Dublin Core Metadata Element Set (DCMES):
   * Title
   * Creator
   * Subject
   * Description
   * Publisher
   * Contributor
   * Date
   * Type
   * Format
   * Identifier
   * Source
   * Language
   * Relation
   * Coverage
   * Rights
Line 38: Line 37:
  * Although internal data structure will support all of the above, GUI (Network Metadata Editor) supports subset of the elemets. For more information about DCMES, please visit [[http://dublincore.org/documents/dces/|here]].
  * Although the internal data structure will support all of the above, GUI (Network Metadata Editor) supports a subset of the elements. For more information about DCMES, please visit [[http://dublincore.org/documents/dces/|here]].
Line 42: Line 40:
   Questions:
     * Previously, attributes could be any Java type -- java.net.URL for instance -- and XGMML supports "list", "integer", "real", and "string". What thought has been given to restoring the ability to use other types?
      * The examples in the testData directory put the '''type''' of the attribute
        in the '''label'''. For example,

 .
Questions:
  * Previously, attributes could be any Java type -- java.net.URL for instance -- and XGMML supports "list", "integer", "real", and "string". What thought has been given to restoring the ability to use other types?
  * The examples in the testData directory put the '''type''' of the attribute
   . in the '''label'''. For example,
Line 49: Line 49:
           instead of the correct XGMML  . instead of the correct XGMML
Line 53: Line 54:
           ... should that not be fixed? Is Cytoscape doing the the right thing?  . .. should that not be fixed? Is Cytoscape doing the the right thing?

=== Pitfalls ===
You always get a null pointer exception instead of an decent error. Therefore finding the the source of the problem is pretty much trial and error. Besides doing smart guessing based on the call tree, here are some pitfalls to watch out for:

 * The file must start with
 {{{
<?xml version="1.0"?>
<graph label="test"
                    xmlns:dc="http://purl.org/dc/elements/1.1/"
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                    xmlns:cy="http://www.cytoscape.org"
                    xmlns="http://www.cs.rpi.edu/XGMML"
                    directed="1">
}}}
 Even then XGMML sample files may fail to load.
 * Each edge must have a label
 * The weight must be an attribute (<att />)

=== Example ===
The example below describes a small graph in xgmml which contains a sub-graph and will import successfully into '''Cytoscape v2.8.2''' with '''metaNodePlugin2 v1.6''' loaded
{{{
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<graph label="small metanode example"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:cy="http://www.cytoscape.org"
    xmlns="http://www.cs.rpi.edu/XGMML"
    directed="1">
  <node label="B" id="1"></node>
  <node label="A" id="2"></node>
  <node label="M" id="10">
    <att type="string" name="__groupViewer" value="metaNode"/>
    <att>
      <graph>
        <node label="D" id="8"></node>
        <node label="E" id="9"></node>
        <node label="C" id="7"></node>
        <edge label="D-E" source="8" target="9">
   <att name="weight" type="integer" value="4"/>
        </edge>
        <edge label="E-C" source="9" target="7"></edge>
        <edge label="C-D" source="7" target="8"></edge>
      </graph>
    </att>
  </node>
  <edge label="A-B" source="2" target="1"></edge>
  <edge label="A-E" source="2" target="9"></edge>
</graph>
}}}
please note that:
 * every <graph>, <node> and <edge> element '''must''' contain a ''label'' attribute. Failure to do so will result in a null-pointer error during the import.
 * all of the ''xmsns'' attributes in the root <graph> element '''must''' be present
 * the <node> containing the sub-graph '''must''' contain <att type="string" name=" groupViewer" value="metaNode"/> as shown in the example (note the 2 underline characters)
 * including data associated with <graph>, <node> and <edge> elements requires an <att> element with the attributes ''name'', ''type'' and ''value'' as shown

What is XGMML?

XGMML is an XML version of GML.

XGMML in Cytoscape

In future releases, Cytoscape's standard format for saving graph layout will be XGMML. Users can save graph topology AND attributes in the same file.

XML Schema

The code to manipulate data element in XML file will be generated by data binding package, called Java Architecture for XML Binding (JAXB). JAXB automatically generate JAVA code based on XML Schema. XML schema for XGMML is available here.

Metanode and XGMML

In Cytoscape v2.3, a new concept called Metanode will be introduced. In XGMML, a metanode is a node which has a subgraph containing nodes and edges. For more information, please read Metanode_In_XGMML section.

File Format

Network file in XGMML has the following information:

  • Interactions (Nodes/Edges)
  • Attributes (annotation for nodes/edges)
  • Graphical representation of nodes and edges
  • Network meta-info in RDF
    • This is general information for the network. Generic information like network name, date modified, etc. will be inserted here. The data format used for network meta-information is RDF (Resource Description Framework). The supported attributes are taken from Dublin Core Metadata Element Set (DCMES):
      • Title
      • Creator
      • Subject
      • Description
      • Publisher
      • Contributor
      • Date
      • Type
      • Format
      • Identifier
      • Source
      • Language
      • Relation
      • Coverage
      • Rights
    • Although the internal data structure will support all of the above, GUI (Network Metadata Editor) supports a subset of the elements. For more information about DCMES, please visit here.

JamesMcIninch 2006/04/20:

  • Questions:
    • Previously, attributes could be any Java type -- java.net.URL for instance -- and XGMML supports "list", "integer", "real", and "string". What thought has been given to restoring the ability to use other types?
    • The examples in the testData directory put the type of the attribute

      • in the label. For example,

      <att value="YCK2" label="string" name="commonName"/>
  • instead of the correct XGMML

      <att value="YCK2" type="string" label="Common Name" name="commonName"/>
  • .. should that not be fixed? Is Cytoscape doing the the right thing?

Pitfalls

You always get a null pointer exception instead of an decent error. Therefore finding the the source of the problem is pretty much trial and error. Besides doing smart guessing based on the call tree, here are some pitfalls to watch out for:

  • The file must start with
    <?xml version="1.0"?>
    <graph label="test"
                        xmlns:dc="http://purl.org/dc/elements/1.1/"
                        xmlns:xlink="http://www.w3.org/1999/xlink"
                        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                        xmlns:cy="http://www.cytoscape.org"
                        xmlns="http://www.cs.rpi.edu/XGMML"
                        directed="1">
    Even then XGMML sample files may fail to load.
  • Each edge must have a label
  • The weight must be an attribute (<att />)

Example

The example below describes a small graph in xgmml which contains a sub-graph and will import successfully into Cytoscape v2.8.2 with metaNodePlugin2 v1.6 loaded

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<graph label="small metanode example" 
    xmlns:dc="http://purl.org/dc/elements/1.1/" 
    xmlns:xlink="http://www.w3.org/1999/xlink" 
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
    xmlns:cy="http://www.cytoscape.org" 
    xmlns="http://www.cs.rpi.edu/XGMML"  
    directed="1">
  <node label="B" id="1"></node>
  <node label="A" id="2"></node>
  <node label="M" id="10">
    <att type="string" name="__groupViewer" value="metaNode"/>
    <att>
      <graph>
        <node label="D" id="8"></node>
        <node label="E" id="9"></node>
        <node label="C" id="7"></node>
        <edge label="D-E" source="8" target="9">
          <att name="weight" type="integer" value="4"/>
        </edge>
        <edge label="E-C" source="9" target="7"></edge>
        <edge label="C-D" source="7" target="8"></edge>
      </graph>
    </att>
  </node>
  <edge label="A-B" source="2" target="1"></edge>
  <edge label="A-E" source="2" target="9"></edge>
</graph>

please note that:

  • every <graph>, <node> and <edge> element must contain a label attribute. Failure to do so will result in a null-pointer error during the import.

  • all of the xmsns attributes in the root <graph> element must be present

  • the <node> containing the sub-graph must contain <att type="string" name=" groupViewer" value="metaNode"/> as shown in the example (note the 2 underline characters)

  • including data associated with <graph>, <node> and <edge> elements requires an <att> element with the attributes name, type and value as shown

XGMML (last edited 2012-03-03 00:48:59 by server2)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux