@graphty/graph-io / @graphty/graph-io/obo / OboExportOptions
Interface: OboExportOptions ​
Defined in: formats/obo/exporter.ts:73
The format-specific options of the OBO exporter.
Extends ​
Properties ​
onMixedDirection? ​
optionalonMixedDirection?:"directed"|"error"|"undirected"
Defined in: types.ts:395
What a format with one direction per file does with a graph that has both directed and undirected edges: "error" throws (E_DIRECTED), "directed" writes every edge as directed (an undirected edge once, as one directed edge), "undirected" writes the whole graph undirected. A format that keeps each edge's own direction (GraphML, GEXF, CSV, Pajek, XGMML, Cytoscape sessions, and the JGF and graphology JSON dialects) ignores it and writes both kinds; to make such a graph all one direction, read it with the import option onMixedDirection.
Default Value ​
"error"Inherited from ​
CommonExportOptions.onMixedDirection
ontology? ​
optionalontology?:string
Defined in: formats/obo/exporter.ts:87
The ontology id written in the header, such as go or uberon. It may hold letters, digits and _ . - /; any other character makes checkExport() and the save throw E_UNSUPPORTED. The default is the id an OBO import read, else the graph name with every other character replaced by _, else no ontology line.
Default Value ​
as read, else the graph namerelation? ​
optionalrelation?:string
Defined in: formats/obo/exporter.ts:79
The relation written for an edge that has none of its own (no relation value): an OBO id such as is_a or part_of. Reasoners and ROBOT read is_a as subclassing.
Default Value ​
"is_a"sanitizeIds? ​
optionalsanitizeIds?:"error"|"mangle"
Defined in: types.ts:385
What to do with node ids the format cannot hold. "error": the export throws (E_INVALID_ID) and no node is renamed. "mangle": such ids are rewritten and the originals are written to the file too, so an import with restoreMangledIds (on by default) reads the original ids back. Pajek is the exception: it always numbers nodes 1 to N and keeps the old ids as labels.
Default Value ​
"error"