app-ui
Webapps for searching, viewing and data projection on Pathway Commons data
4.2K
Install the project dependencies by typing:
npm install
Run the project using one of the defined package scripts:
For development:
npm run watch
For a production build:
npm run build-prod
npm start
The following environment variables can be used to configure the server (also docker image):
NODE_ENV: the environment mode, either production or development (default)PORT: the port on which the server runs (default 3000)PC_URL: Pathway Commons homepage URL (default: 'http://www.pathwaycommons.org/'; cPath2 service should be there available at /pc2/ path)NCBI_API_KEY: NCBI E-Utilities API key (read more)FACTOID_URL: the Factoid app URL (default: 'https://biofactoid.org/')SBGN_IMG_SERVICE_BASE_URL: URL for service that converts SBGN to an image (i.e. Syblars; default is http://localhost:9090/)SBGN_IMG_PATH: cli tool snapshot output folder for images (default: public/img/pathways)npm start : start the servernpm stop : stop the servernpm run build : build projectnpm run build-prod : build the project for productionnpm run bundle-profile : visualise the bundle dependenciesnpm run clean : clean the projectnpm run watch : watch mode (debug mode enabled, autorebuild, autoreload)npm test : run testsnpm run lint : lint the projectnpm run ci : run the tests and lint and build-prod at onceBuild the image.
docker build -t pathwaycommons/app-ui .
Run the container:
docker run --detach --rm --publish 3000:3000 --env "NODE_ENV=production" --name "app-ui" pathwaycommons/app-ui
All files /test will be run by Mocha. You can npm test to run all tests, or you
can run npm run test ./test/path/to/test to run specific tests.
Chai is included to make the tests easier to read and write.
The scripts/cli.js file contains app-ui command line tools:
source: Download and extract a file to downloads foldersnapshot: Generate PNG images for pathways listed in a PC GMT-formatted file
SBGN_IMG_SERVICE_BASE_URLSBGN_IMG_PATH (default: public/img/pathways)Retrieve a GMT file
Pathway Commons makes compressed archives of GMT files for each release available for download. For PC version 14, issue the following command:
node src/scripts/cli.js source --file pc-hgnc.gmt https://download.baderlab.org/PathwayCommons/PC2/v14/pc-hgnc.gmt.gz
Build and run a Syblars instance
docker build --file Dockerfile.syblars -t pathwaycommon/syblars:latest .
docker run --detach --rm --publish 9090:3000 --name syblars pathwaycommon/syblars:latest
Generate a PNG of an SBGN representation for each pathway declared in the GMT file at downloads/pc-hgnc.gmt:
SERVER_FETCH_TIMEOUT="60000" node src/scripts/cli.js snapshot --file pc-hgnc.gmt
img/pathways/:id, where id is the pathway URI with anything that is not a letter (a-z) or digit (0-9) is replaced with underscores (_).Students who work on the repo should follow these instructions for each feature that they work on:
git clone https://github.com/myusername/app-ui.gitcd app-uidevelopment branch: git checkout -b development origin/developmentpc remote: git remote add pc https://github.com/PathwayCommons/app-ui.gitgit fetch pcRemotes > Fetch All Branches, Remotes > Fetch All Tagsdevelopment branch is up-to-date:
git checkout development && git merge pc/developmentpc/development points toMerge into Current Branchgit checkout -b name-of-featureHEAD commit (which should be the top commit of your local development branch),
then select Create Branch...git commit -am "My descriptive commit message"Select View tab (View > Commit)
Commit buttondevelopment branch is up-to-date:
git checkout development && git merge pc/developmentpc/development points togit checkout name-of-feature, git merge developmentHEAD is the newest commit of your feature branch: Right-click the latest commit
on name-of-feature branch and select Checkout "name-of-feature" Branchdevelopment branch and select Merge into Current Branchgit pushRemotes > Push Current BranchNew pull request buttonrelease/1.2.3npm testnpm run lintnpm version, in accordance with semver. The version command
in npm updates both package.json and git tags, but note that it uses a v prefix on the tags (e.g. v1.2.3).npm version patch.npm version minor.npm version major.npm version 1.2.3.git push origin --tagsContent type
Image
Digest
sha256:625e95d60…
Size
550 MB
Last updated
about 1 year ago
docker pull pathwaycommons/app-ui:pc14Pulls:
203
Last week