neherlab / pan-genome-visualization

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

panX visualization empty - and errors/warnings during npm start #3

Closed rdejonge closed 4 years ago

rdejonge commented 4 years ago

Firstly, thank you for efforts in building the panX pangenome package set.

I've recently tried to get panX visualization up and running but hitting a brick wall. After panX analysis, I've used the link-to-server.py code (with slight update to remove the data structure dependency) to copy a species set to the visualization folder. It appears this was successful, as I could run add-new-pages-repo.sh to add the required pages. I confirm that there is a species route, view and public dataset. I can also open the appropriate page at localhost:8000/Species .

However, as pointed out by some others the page is empty. When I start the server (npm start), I notice various errors that might be relevant (copied below)?

chunk {0} client_bundle.js (client_bundle) 3.32 MB [entry] [rendered] [1] ./~/d3/d3.js 338 kB {0} {1} [built] [5] ./public/javascripts/global.js 2.64 kB {0} [built] [12] ./~/jquery/dist/jquery.js 280 kB {0} {1} [built] [15] ./public/javascripts/tooltips.js 8.33 kB {0} [built] [21] ./~/datatables.net/js/jquery.dataTables.js 449 kB {0} {1} [built] [23] ./public/phyloTree/src/updateTree.js 7.29 kB {0} [built] [28] ./public/javascripts/data_path.js 1.01 kB {0} [built] [29] ./public/javascripts/tree-init.js 15.9 kB {0} [built] [44] (webpack)-hot-middleware/client.js 7.87 kB {0} {1} [built] [63] (webpack)/buildin/module.js 517 bytes {0} {1} [built] [111] ./~/strip-ansi/index.js 161 bytes {0} {1} [built] [114] (webpack)-hot-middleware/client-overlay.js 2.22 kB {0} {1} [built] [115] (webpack)-hot-middleware/process-update.js 4.45 kB {0} {1} [built] [216] ./public/javascripts/render_viewer.js 9.52 kB {0} [built] [559] multi webpack-hot-middleware/client ./public/javascripts/render_viewer.js 40 bytes {0} [built]

****WARNING in ./~/bootstrap-multiselect/dist/js/bootstrap-multiselect.js 48:48-55 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/bootstrap-multiselect/dist/js/bootstrap-multiselect.js 48:84-91 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in webpack: Using NoErrorsPlugin is deprecated. Use NoEmitOnErrorsPlugin instead.****

ERROR in ./~/bootstrap-multiselect/dist/js/bootstrap-multiselect.js Module not found: Error: Can't resolve 'knockout' in '/home/ronnie/git/pan-genome-visualization/node_modules/bootstrap-multiselect/dist/js' @ ./~/bootstrap-multiselect/dist/js/bootstrap-multiselect.js 51:8-47 @ ./public/javascripts/datatable-gc.js @ ./public/javascripts/speciesTree.js @ ./public/javascripts/render_viewer.js @ multi webpack-hot-middleware/client ./public/javascripts/render_viewer.js

Any suggestion as to how I should debug this situation?

rdejonge commented 4 years ago

Also: the example http://localhost:8000/S_pneumoniae616 is also empty. Which is why I'm thinking I have a problem with the javascript code. Also #2: I'm using the latest version of firefox. Server is Ubuntu 18.03.4 LTS version.

rneher commented 4 years ago

I am pretty sure this is a problem with your analysis files. Within the pan-genome-visualization folder, there should be a directory

public/dataset/YOUR_SPECIES

which contains a couple of json files, some js files, and another folder with the geneClusters.

coreGenomeTree.json
geneCluster
geneCluster.json
geneGainLossEvent.json
metaConfiguration_association.js
metaConfiguration.js
metainfo.tsv
newColumnConfig.js
strainMetainfo.json
strain_tree.nwk

if those aren't there, the problem is more likely in your analysis. best, richard

rdejonge commented 4 years ago

Okay, thank you for the reply!

I'm however still in doubt. How do you explain the "empty" page for S_pneumoniae616 ? Also localhost:8000/P_marinus_meta returns an "empty" page (panX graphic layout is all there, just no content).

The public/dataset/MY_SPECIES folder contains the following (so lacking indeed a few): coreGenomeTree.json geneCluster geneCluster.json metaConfiguration.js strainMetainfo.json strain_tree.nwk

The geneCluster folder contains many entries like so: GC_100_aa_aln.fa.gz GC_100_aa_aln_reduced.fa.gz GC_100_na_aln.fa.gz GC_100_na_aln_reduced.fa.gz GC_100.nwk GC_100_patterns.json GC**_100_tree.json

wangyy99 commented 4 years ago

I have the same problem,and I would like to ask , Would u mind helping me with this problem. I'm however still in doubt. How do you explain the "empty" page for S_pneumoniae616 ? Also localhost:8000/P_marinus_meta returns an "empty" page (panX graphic layout is all there, just no content).

Could u tell me solve the problem upstairs?

The public/dataset/MY_SPECIES folder contains the following (so lacking indeed a few): coreGenomeTree.json geneCluster geneCluster.json metaConfiguration.js strainMetainfo.json strain_tree.nwk

The geneCluster folder contains many entries like so: GC_100_aa_aln.fa.gz GC_100_aa_aln_reduced.fa.gz GC_100_na_aln.fa.gz GC_100_na_aln_reduced.fa.gz GC_100.nwk GC_100_patterns.json GC**_100_tree.json

rneher commented 4 years ago

Thanks for posting the content of these folders. The fact that some files are not there should be ok if particular analyses were not performed on MY_SPECIES. However, localhost:8000/P_marinus_meta is not expected to work if you did not run the P_marinus_meta analysis. The corresponding files are not part of the github repo. but localhost:8000/MY_SPECIES should work if you have added the route.

rneher commented 4 years ago

What errors do you see in the browser console?

wangyy99 commented 4 years ago

Thank u for your detailed answer . After entering Firefox ,then I run that localhost:8000/ ,but it's empty ,and it doesn't show anything ,what's empty under each option . There is no how to demonstrate the operation on each link .

rneher commented 4 years ago

Thanks for insisting... there is an issue with the bundling process which likely has to do with various new versions of different packages. We'll try to sort this out.

rdejonge commented 4 years ago

Thanks Richard for the reply. I think such makes sense. Looking forward to your findings. Thanks in advance.

wdingx commented 4 years ago

Indeed, the issue is due to new versions of different dependencies. For the time being, I have added package-lock.json generated from the last successful run as a workaround. It works again. Please git pull the updated repository.

rneher commented 4 years ago

thanks Wei.

git pull
npm install
npm start

worked for me.

longzhangnation commented 4 years ago

I met the same problem as @rdejonge,and I think the main problem is 'ERROR in .//bootstrap-multiselect/dist/js/bootstrap-multiselect.js Module not found: Error: Can't resolve 'knockout' in '/home/ronnie/git/pan-genome-visualization/node_modules/bootstrap-multiselect/dist/js' ',that is it can't found the module. About half year ago , I installed the software and it works very well. But recently when I reinstall for others, It goes wrong as @rdejonge. I don't know whether the absence of the module account for this error.

rdejonge commented 4 years ago

Thank you @wdingx @rneher for this fix. I had to remove "package-lock.json" before running git pull and consecutive steps, but it worked. Upon running "npm install" it found several vulnerabilities, is this something you recommend fixing (suggested code: "npm audit fix"). Regards, Ronnie

opoirot commented 3 years ago

Hello, Same problem, after following your instructions, pages are always empty (TestSet and 3 pan-genomes provided). All the files are present in the directory public/dataset When starting npm, only 3 warnings: WARNING in ./~/bootstrap-multiselect/dist/js/bootstrap-multiselect.js 48:48-55 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted WARNING in ./~/bootstrap-multiselect/dist/js/bootstrap-multiselect.js 48:84-91 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted WARNING in webpack: Using NoErrorsPlugin is deprecated. Use NoEmitOnErrorsPlugin instead.

the error concerning knockout disappeared after launching "npm i knockout"

Only 3 warning after git pull and npm install: npm install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Thanks in advance, your tool is great!

actledge commented 2 years ago

I got the same problem with opoirot. after following instructions, pages are always empty (TestSet and pan-genomes provided).

neelam19051 commented 2 years ago

Hi, i did all the suggestion regarding pan-genome visualization still facing the same issue, i mean npm open for my own data but it doesn't show anything on localhost:8000/ web browser......

Thank you!