Formats

Drug2ways handles the following formats:

  • CSV (.csv)

  • TSV (.tsv)

  • GraphML (.graphml or .xml)

  • GML (.gml or .xml)

  • BEL (.bel)

  • Pickle (.pickle). BELGraph object from PyBEL 0.13.2

  • Edge list (.lst)

  • Node-Link JSON (.json)

The GraphML, GML, EdgeList and Node-Link JSON readers of drug2ways rely on NetworkX. BEL and Pickle files rely on PyBEL. The two easiest format to work with drug2ways are a triple-based file represented as the file below (tsv/csv). The file must contain three columns: source, relation and target (order is not relevant) and the only condition is that the relation column contains 1 and -1 to indicate the direction of the relation (increase/decrease).

source

target

relation

Drug1

Protein1

-1

Protein1

Protein2

1

Protein2

Protein3

-1

Protein3

Disease1

1