-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A command-line tool to generate SBGN images for PC pathways #1443
Conversation
Is Chromium/Syblars itself configured to use a maximum amount of memory? Even without a leak, browsers can be aggressive with allocating memory, because UI end-users don't like it when their tabs slow down or crash. |
Not sure. I didn't customize either. |
We could use the md5 hash of a pathway URI (could still add the sanitized original URI as preix) for the file names @jvwong |
Right yes - during development I wanted to look up specific pathways by their filename/PC URI. |
This provides command line tools to generate a collection of image files of SBGN pathway representations, say from a list of pathways declared in a GMT file available from Pathway Commons. This would useful in providing PC pathway previews in the Search app, a PC pathway static site and/or improving the chance that pathway images are indexed by Google and picked up in user searches.
Details
source
: Download and extract a filesnapshot
: Generate PNGs for pathways listed in a PC GMT-formatted fileDockerfile.syblars
anddocker-compose.yml
SBGN_IMG_SERVICE_BASE_URL
: Location of Syblars instanceSBGN_IMG_PATH
: Where to save image files (default:public/img/pathways
)Performance
I did a test run using pathways in PathwayCommons12.All.hgnc.gmt.gz on my system (iMac 3.6 GHz 8-Core Intel Core i9) with a local Docker instance of Syblars outputting PNG files.
Notes
_
). There may be a better way to handle this so there's no mapping needed, possibility of clashes.snapshot
is configured to dump images topublic/img/pathways
so expressJS can serve it atimg/pathways/:id
, whereid
is the mangled pathway URIIssues
Syblars
Getting Syblars to work locally required some fiddling, hence the choice to include the
Docker.syblars
. I also suspect a leak, as it would gradually hold onto RAM while processing images, crash with an out of memory error (> 4096 MB configured), then reboot clean:Future considerations
Related