neherlab / pan-genome-visualization

Visualization of the pan-genome output by panX
https://pangenome.ch
Other
61 stars 14 forks source link

Cannot use local server to visualize results of the analysis pipeline #16

Closed Mestizia closed 1 year ago

Mestizia commented 1 year ago

What I have done so far with the pangenome pipeline?

I created all the pangenomes using your PanX pipeline but I am unable to visualize the results.

Which errors do I get?

Installing and running the server does not work with the current git version from the server because 8000 port is not available and I get the following error "Error: listen EADDRINUSE: address already in use :::8000" [see attachment EADDRINUSE.png] when I start the server. This is an issue I can attribute at our network/machine and I found some resources on your git on how to solve it in the FAQ [https://github.com/neherlab/pan-genome-visualization#faq]. However, changing the port to 3000 in ./bin/www is not possible because ./bin/www is not created when running npm install; npm start with the code in the current git version. EADDRINUSE

As a workaround, I found this issue https://github.com/neherlab/pan-genome-visualization/issues/15 that suggests to download an older branch of your git which automatically uses port 3000 which seems to work [see attachment localhost3000_home.png]. I followed the instructions to push the panX analysis to the local visualization repository. The bash command ran just fine but the python script does not. Reading the code I saw that it expects a specific file structure and I ran manually the rsync command to move the content of the vis/ folder to the public/dataset/ folder. localhost3000_home

As a result, in the path "/DATA_RAID/vtracann/tools/pan-genome-visualization/public/dataset/sphingomonadaceae/" there are the files from the vis/ directory [coreGenomeTree.json, geneCluster, geneCluster.json, metaConfiguration.js, strainMetainfo.json, strain_tree.nwk]. There is a sphingomonadaceae.js file in routes/ and sphingomonadaceae.jade file in views/ however, opening the browser at http://localhost:3000 or http://localhost:3000/sphingomonadaceae only shows the base html of the page and no results [See attachment SP1]. SP1

What about the current visualization pipeline?

Assuming that the issues I encountered are due to the old git branch of the visualization pipeline that I am using, I downloaded on my local machine the visualization pipeline (master branch) and the output from the vis/ folder.

While npm install and npm start do manage to start the local server at port 8000, it has no content [see attachment localhost8000]. localhost8000

Do you have any suggestions to get the visualization pipeline working?

ivan-aksamentov commented 1 year ago

Hi Vittorio @Mestizia,

This error:

Error: listen EADDRINUSE: address already in use :::8000

Means that the port 8000 is already used on your computer. You need to stop the application that uses this port. It could be that you are already running a copy of pangenome in another terminal, or that this copy have not stopped correctly. In this case, try to find it among your processes (for example using htop on Linux) and stop it forcefully.

ivan-aksamentov commented 1 year ago

@Mestizia, Regadring how to run the application (I would not call it a pipeline, it's just a basic JS web app. Compared to the analysis repo, no pipes, no lines here). All guides are indeed currently out of date. Pangenome is a very old application, circa 2015 and it becomes increasingly tricky to run it. This app predates me joining the lab, and I have troubles running it myself too. However, I tried to write a little guide. I pushed it to the readme on master branch:

https://github.com/neherlab/pan-genome-visualization/blob/master/README.md

I hope you find it useful.

Note that I am currently in the process of rewriting pangenome based on a more modern tools, as I mentioned in the readme, but it might take quite some time.

Mestizia commented 1 year ago

Hi Vittorio @Mestizia,

This error:

Error: listen EADDRINUSE: address already in use :::8000

Means that the port 8000 is already used on your computer. You need to stop the application that uses this port. It could be that you are already running a copy of pangenome in another terminal, or that this copy have not stopped correctly. In this case, try to find it among your processes (for example using htop on Linux) and stop it forcefully.

Thanks for the suggestions. Stiil, I did some troubleshooting but nor htop nor lsof listed any process currently using the port. Rebooting the server did not solve it. However, I got around it by editing the scripts/server.js file to use a different one: const PORT = 3000

@Mestizia, Regadring how to run the application (I would not call it a pipeline, it's just a basic JS web app. Compared to the analysis repo, no pipes, no lines here). All guides are indeed currently out of date. Pangenome is a very old application, circa 2015 and it becomes increasingly tricky to run it. This app predates me joining the lab, and I have troubles running it myself too. However, I tried to write a little guide. I pushed it to the readme on master branch:

https://github.com/neherlab/pan-genome-visualization/blob/master/README.md

I hope you find it useful.

Note that I am currently in the process of rewriting pangenome based on a more modern tools, as I mentioned in the readme, but it might take quite some time.

I saw it! Many thanks, the application runs right now with the pregenerated data. I will try and report if everything works with my analysis as well. If you have a working version of pangenome I would be happy to test it with my data.