The Diagram core contains a collection of server-side tools, mainly focusing on the generation of a set of JSON files to be consumed by the Pathway Diagram Viewer v3.0. As illustrated in the following figure, the Diagram-core utilises the Reactome-Core to generate two different types of files for every single pathway diagram. The first file includes layout information (nodes, edges, co-ordinates, glyphs, names, shades, etc.), while the second file includes a graph of the pathway diagram and all its contained entities.
** Maven Setup: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html.
-
Clone the Diagram-Core repository on your end
git clone https://github.com/reactome-pwp/diagram-core.git
-
Navigate into diagram-core
-
Package with Maven
mvn clean package
-
Diagram-core Help: --help
java -jar target/tools-jar-with-dependencies.jar --help
-
Convert all pathway diagrams
-
command help (ensure special characters are escaped):
java -jar target/tools-jar-with-dependencies.jar Convert -h dbhost -d dbschema -u dbuser -p dbpass -o output_folder -r list_of_trivial_molecules -v
-
Please note that the current list of trivial molecules can be found in ./src/main/resources/trivialchemicals.txt
java -jar target/tools-jar-with-dependencies.jar Convert \ -h localhost \ -d reactome \ -u root \ -p root \ -o /Users/reactome/diagram/static \ -r /Users/reactome/diagram/trivialchemicals.txt \ -v
-
The user can also specify a target list of diagrams to be generated by using the -t switch and the list of DBIDs like in the example:
java -jar target/tools-jar-with-dependencies.jar Convert \
-h localhost \
-d reactome \
-u root \
-p root \
-o /Users/reactome/diagram/static \
-r /Users/reactome/diagram/trivialchemicals.txt \
-t:5654738,5655291,2219530,5637815
-v
In case of connection to a remote server via ssh there might be a "No X11 DISPLAY variable was set" error. Then try unsetting the DISPLAY using the following command:
unset DISPLAY