Hosting SequenceTubeMap for Public Access
Hello hello.
I'm currently working on a pangenome project and using SequenceTubeMap to visualize specific regions. During a meeting with my advisor, we discussed the possibility of making the pangenome publicly accessible by hosting it online with this tool. Since SequenceTubeMap already generates a local web page, I wanted to ask:
Is it possible to host it on a public server for broader access?
If so, do you have any recommendations or documentation on how to set it up?
Sorry for the inconvenience.
We host it publicly for the demo server. We have update documentation at https://github.com/vgteam/sequenceTubeMap/blob/master/deploy.md and https://github.com/vgteam/sequenceTubeMap/wiki/Deploying-the-Tube-Map for when we update the frontend and backend.
The way we have it set up, we deploy the frontend to Github Pages, with a BACKEND_URL set in the config.json we built it with, and then we have the backend running npm run serve there behind an nginx proxy to handle secure certificates. The API server process is managed with pm2.
Unfortunately we don't have a recipe to make that API server and set up all the DNS and SSL stuff to make it work. You would have to do that yourself. We also don't maintain a published Docker image anymore, although we do have a Dockerfile you could patch up and use to build an image.
You don't need to separate your frontend and backend like this; you ought to be able to install vg, npm run build and npm run serve and put something to terminate SSL in front of that. The API server itself will serve the built front-end, and even though it's not a fancy setup it can probably handle more requests for the frontend page than it can handle requests for data from the backend.
Before you do this, you can edit config.json to customize the examples that will be presented. So you could make it default to some view of your pangenome that you want to show.
We don't have any machinery for turning off file uploads, which is a thing you might want to be able to do if you only really want to host one thing.
We're still not great at quickly extracting views from whole pangenomes at interactive speed: every request still has to load the whole graph file into memory to pull the part it wants, when you use a GBZ, and depending on how big your GBZ is and how fast your server is that can take longer than the browser is willing to wait. On the demo server we also have problems with the server getting too busy, which makes systemd forget to renew the DHCP lease, which makes it drop off the network. So you might need to provision a relatively powerful machine if you expect people to actually use it.
If all you want to do is show particular views, you can pre-generate a bunch of views and put them in an (extended) BED file. If you host that on a plain web server along with the correponding chunk directories, you can plug the BED URL into the demo server (or your own install of the server) and the server will fetch and render the individual chunks when a user asks for them, which can work a lot faster.