Giter Site home page Giter Site logo

gsrs-vip-parser's Introduction

GSRS Visualization Data Generator for FDA VIP by Conceptant, Inc

Generates JSON files in a format suitable for GSRS connections graph visualization.

Requires:

  1. JDK 1.8+
  2. maven

Installation

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

Running the Generator

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

Deploying the Frontend

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

Debugging

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".

gsrs-vip-parser's People

Contributors

ahvetskovich avatar andrey-mikhalchuk-at-fda-hhs-gov avatar conceptant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.