PAGviz is a simple command-line interface for displaying Partial Ancestral Graphs (PAGs), Directed Acyclic Graphs (DAGs) or Complete Partial DAGs (CPDAGs) exported in a text format from the Tetrad program for causal discovery.
It can output the graph either as an image (.png by default) generated by the pydot Python package, or a .dot file that can be edited and displayed separately using any Graphviz-compatible software. The image can also be sent to stdout as an option (tested on a Linux machine).
PAGviz [-h] [-w] [-f FILE_OUTPUT] [-t] input_file
Simple command to convert a PAG (Partial Ancestral Graph) in a TXT format exported from Tetrad into a DOT format with a color scheme for the different edge types, and output as an image
or DOT file.
positional arguments:
input_file
options:
-h, --help show this help message and exit
-w, --white-background
Add a white background to the graph instead of OldLace
output:
Choose one or more output modes
-f, --file-output FILE_OUTPUT
A path with a filename (with the extension) to save the output to a desired location. If the extension is `.dot`, a DOT file is produced instead of an image.
Example: './output_pag.png' or '../dot_files/output_pag.dot'
-t, --terminal-output
Output the result to stdout in the PNG format.