Skip to content
A script to convert simple association files to graphML format.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Generate graphML from Association Data

The makeGML script converts association files into valid graphML data.

Association File format

Association files are designed to be a simple method of capturing associations between elements. The association format is:


In the above example, the node A is associated with nodes B and C. The node D is not associated with any other nodes.

makeGML Usage

usage: makeGML [-h] [-v] [-r] [-a GRAPH_NAME] [-p NODE_PREFIX] <file>

Convert association text file to GraphML format

positional arguments:
  <file>                input association file

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -r, --allow-reciprocal
                        allow reciprocal edges
  -a GRAPH_NAME, --graph-name GRAPH_NAME
                        graph name
  -p NODE_PREFIX, --node-prefix NODE_PREFIX
                        node prefix string

Example Output

The small example file above yields the following graphML:

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns=""
  <graph id="G" edgedefault="undirected">
    <node id="A" />
    <node id="B" />
    <node id="C" />
    <node id="D" />
    <edge source="A" target="B" />
    <edge source="A" target="C" />
You can’t perform that action at this time.