Generates JSON files in a format suitable for GSRS connections graph visualization.
- JDK 1.8+
- maven
To build the jar, first make sure that your JAVA_HOME variable points to the location of the jdk, then run
mvn clean package
This will produce the executable jar file in the directory called "target". The name of the file will look like this:
gsrsnetworkmaker-0.0.1-SNAPSHOT-jar-with-dependencies.jar
In order to run the generator you need to obtain the .gsrs data file from the GSRS website. For example, the Oct 2020 version can be downloaded with this command:
wget https://gsrs.ncats.nih.gov/downloads/dump-public-2020-10-01.gsrs
You can find newer and older versions of this file on this page: https://gsrs.ncats.nih.gov/#/release
Once you have the data file, you can generate the .json files using the following command:
java -jar target/gsrsnetworkmaker-0.0.1-SNAPSHOT-jar-with-dependencies.jar -d data -l 2 -f dump-public-2020-10-01.gsrs
Run the .jar with "-h" flag to find more about its arguments:
java -jar gsrsnetworkmaker-0.0.1-SNAPSHOT-jar-with-dependencies.jar -h
Here is the list of the currently supported arguments:
This program generates the data files required for the FDA VIP GSRS visualization. It supports the following command-line parameters:
-f fileName - required, the name of the .gsrs file to process
-d directoryPath - optional, the path to the directory to output the data files into
-m maxNumberOfElements - optional (default is 1000), the maximum number of elements to be displayed in the visualization
-n maxNumberOfLinksPerNode - optional (default is 50), the maximum number of links for each node
-l depth - optional (default is 4), the maximum depth of relationships fetching for each node
-a algorithm - optional (default is 2), the version of the algorithm to use for the JSON generation
-h, --help - displays this message
The .json files generated by this utility can be rendered as 3D visualizations of substance relationships with the Conceptant GSRS 3D Visualization frontend. The frontend itself is a set of static files which can be served by any web server. Most modern web browsers won't allow you to open the frontend files from the local disk, so you will need to install a web server to serve them. The latest version of the frontend can be downloaded from this location and already includes the pregenerated .json files using the Oct 2020 GSRS data: https://gsrs3d.conceptant.com/gsrs3d_2021011301.tar.gz (45MB).
You can unpack this file with the following command:
tar xzvf https://gsrs3d.conceptant.com/gsrs3d_2021011301.tar.gz
This will create a new directory called "www". Refer to your web server documentation for information on how to configure it to serve static files from this directory.
Once you have the web server configured, you can view the visualizations by opening a URL looking like this:
http://localhost/index.html?uuid=27ee06c0-05a8-4f67-a140-edc8cdb89608
In this example the URL is pointing to your webserver installed on localhost and, if everything is configured correctly, it will render 3D relationships for a substance with UUID 27ee06c0-05a8-4f67-a140-edc8cdb89608 (RIVOCERANIB). You can find an example of this visualization on Conceptant's web server here: https://gsrs3d.conceptant.com/index.html?uuid=27ee06c0-05a8-4f67-a140-edc8cdb89608
You can adjust the logging parameters in "src/main/resources/log4j.properties". For example, if you do not want to see all the logs substitute "DEBUG" with "ERROR".