Skip to contents

Convert a GinSim file into a GraphML file GinSim files have the extension .zginml. This utility function converts such files into the GraphML format. keeping the kind - fate, input or gene -, the edge sign and the rule - formulae - data.

Usage

ginmlToGraphml(ginzipFile, fates = c(), dest = NULL)

Arguments

ginzipFile

The path to the .zginml file. The GraphML file will be created in the same directory.

fates

A vector of fate names. If left empty, both fate and gene nodes will be labelled as kind='gene'

dest

The path to the graphml file that will be created. If NULL, defaults to the same path as the zginml file, but with the graphml extension.

Value

A vector with the lines of the newly created GraphML file.

Examples

filename <-
  system.file("extdata", "example_ginsim.zginml", package = "ingres")
head(ginmlToGraphml(filename))
#> [1] "<?xml version=\"1.0\" encoding=\"UTF-8\"?><graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\">"
#> [2] "<key attr.name=\"kind\" attr.type=\"string\" for=\"node\" id=\"kind\"/>"                            
#> [3] "<key attr.name=\"rule\" attr.type=\"string\" for=\"node\" id=\"rule\"/>"                            
#> [4] "<key attr.name=\"sign\" attr.type=\"string\" for=\"edge\" id=\"sign\"/>"                            
#> [5] "<graph edgedefault=\"directed\">"                                                                   
#> [6] "<node id=\"DNA_Damage\">"