merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
439 stars 145 forks source link

[BUG] `anvio-summarize` : `popper.min.js` is missing. #2365

Open Louis-MG opened 1 day ago

Louis-MG commented 1 day ago

Short description of the problem

When summarizing a profile db, I get this error that some javascript is missing.

anvi'o version

anvio-dev just updated:

From https://github.com/merenlab/anvio
   b4af33438..18310dda1  codon-visualization -> origin/codon-visualization
   39d6fa4f1..19144a202  foldseek-driver     -> origin/foldseek-driver
Already up to date.
Anvi'o .......................................: marie (v8-dev)
Python .......................................: 3.10.14

Profile database .............................: 40
Contigs database .............................: 24
Pan database .................................: 21
Genome data storage ..........................: 7
Auxiliary data storage .......................: 2
Structure database ...........................: 2
Metabolic modules database ...................: 4
tRNA-seq database ............................: 2

System info

Linux 6.1.0-12-amd64 x86_64

Detailed description of the issue

anvi-summarize -c /mnt/scratch/LM/test_ecoli/Ecoli-contigs.db -C Genomes -p /mnt/scratch/LM/test_ecoli/bowtie/dry/dry-MERGED/PROFILE.db -o /mnt/scratch/LM/test_ecoli/Ecoli-dry-SUMMARY

Contigs DB ...................................: Initialized: /mnt/scratch/LM/test_ecoli/Ecoli-contigs.db (v. 24)                                                                                                                                                                                                                                      

WARNING
===============================================
ProfileSuperClass found a collection focus, which means it will be initialized
using only the splits in the profile database that are affiliated with the
collection Genomes and all bins it describes.

Auxiliary Data ...............................: Found: /mnt/scratch/LM/test_ecoli/bowtie/dry/dry-MERGED/AUXILIARY-DATA.db (v. 2)                                                                                                                                                                                                                      
Profile Super ................................: Initialized with 28163 of 28163 splits: /mnt/scratch/LM/test_ecoli/bowtie/dry/dry-MERGED/PROFILE.db (v. 40)

THE MORE YOU KNOW 🌈
===============================================
Someone asked the Contigs Superclass to initialize only a subset of contig
sequences. Usually this is a good thing and means that some good code somewhere
is looking after you. Just FYI, this class will only know about 394 contig
sequences instead of all the things in the database.

Misc data reported for layers ................: default

Misc data reported for items .................: None
[30 Oct 24 13:53:33 Generating the output] ...                                                                                                                                                                                                                                                                                                       Traceback (most recent call last):
  File "/home/guelou01/github/anvio/bin/anvi-summarize", line 124, in <module>
    main(args)
  File "/home/guelou01/github/anvio/bin/anvi-summarize", line 70, in main
    summary.process()
  File "/home/guelou01/github/anvio/anvio/summarizer.py", line 952, in process
    self.index_html = SummaryHTMLOutput(self.summary, r=self.run, p=self.progress).generate(quick=self.quick)
  File "/home/guelou01/github/anvio/anvio/summaryhtml.py", line 85, in generate
    self.copy_files()
  File "/home/guelou01/github/anvio/anvio/summaryhtml.py", line 104, in copy_files
    shutil.copytree(html_content_dir, destination_dir, ignore=shutil.ignore_patterns('.git*'))
  File "/home/guelou01/miniconda3/envs/anvio-dev/lib/python3.10/shutil.py", line 559, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/home/guelou01/miniconda3/envs/anvio-dev/lib/python3.10/shutil.py", line 513, in _copytree
    raise Error(errors)
shutil.Error: [('/home/guelou01/github/anvio/anvio/data/static/content/js/popper.min.js', '/mnt/scratch/LM/test_ecoli/Ecoli-dry-SUMMARY/.html/js/popper.min.js', "[Errno 2] No such file or directory: '/home/guelou01/github/anvio/anvio/data/static/content/js/popper.min.js'")]

Files / commands to reproduce the issue

My files are too voluminous :(

metehaansever commented 1 day ago

Hello @Louis-MG ,

Did you run npm install command recently? Normally I expect to see another Error message like; Some npm packages seem to be missing in your interactive directory. Please run 'npm install' in the interactive directory and try again. So you can go anvio/data/interactive directory and then run npm install

If it does not work, please let me know :)

Louis-MG commented 1 day ago

I had a problem with npm indeed, ran the command, this is the result if I run it again:

up to date, audited 17 packages in 7s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
metehaansever commented 1 day ago

Can you please run that command under Anvio directory:

ls -lR . | grep '^l'

We need to see symlink like below for popper.min.js _popper.min.js -> ../../../interactive/nodemodules/popper.js/dist/popper.min.js

If you don't see it like this, your node_modules folder might not be created correctly and that's why the symlink is not showing the correct package. You can delete the _nodemodules and package-lock.json files and try running npm install again.

Louis-MG commented 1 day ago

(Partial) Results of the command in the anvio repo ~/github/anvio/anvio:

lrwxrwxrwx 1 guelou01 guelou01    75 Oct  9 10:39 bootstrap.min.js -> ../../../interactive/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js
lrwxrwxrwx 1 guelou01 guelou01    59 Oct  9 10:39 jquery.min.js -> ../../../interactive/node_modules/jquery/dist/jquery.min.js
lrwxrwxrwx 1 guelou01 guelou01    62 Oct  9 10:39 popper.min.js -> ../../../interactive/node_modules/popper.js/dist/popper.min.js
lrwxrwxrwx 1 guelou01 guelou01    68 Oct  9 10:39 sortable.min.js -> ../../../interactive/node_modules/sortable-tablesort/sortable.min.js