tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
745 stars 187 forks source link

Unable to create the PDF file (LaTeX issue?) #90

Closed UFZZhao closed 3 years ago

UFZZhao commented 6 years ago

Hello, I have tried ALLMAPS and it works well. However, there is some issue with creating the PDF file even with the demo data. Here is the log:

Reading liftover chains Mapping coordinates 14:48:19 [base] sort -k1,1 -k2,2n -k3,3n -k4,4 JM-2.lifted.bed -o JM-2.lifted.be d 14:48:19 [base] Load file JM-2.bed 14:48:19 [allmaps] Map contains 120 markers in 2 linkage groups. 14:48:19 [base] Load file scaffolds.fasta.sizes 14:48:19 [base] Load file JM-2.chr.agp 14:48:19 [base] Load file JM-2.agp 14:48:19 [base] Load file JM-2.lifted.bed 14:48:19 [allmaps] Map contains 120 markers in 2 linkage groups. 14:48:19 [base] Load file weights.txt 14:48:19 [base] Imported 2 records from weights.txt. 14:48:19 [allmaps] Map weights: [('JMMale', 1), ('JMFemale', 1)] 14:48:20 [base] Load file JM-2.agp sh: latex: command not found 14:48:20 [base] savefig failed. Reset usetex to False. LaTeX was not able to process the following string: 'lp' Here is the full report generated by LaTeX:

/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/font_manage r.py:1297: UserWarning: findfont: Font family [u'sans-serif'] not found. Falling back to DejaVu Sans (prop.get_family(), self.defaultFamily[fontext])) sh: latex: command not found Traceback (most recent call last): File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/runpy.py", line 162, in _run _module_as_main "main", fname, loader, pkg_name) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/runpy.py", line 72, in run code exec code in run_globals File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/ allmaps.py", line 1871, in main() File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/ allmaps.py", line 827, in main p.dispatch(globals()) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/apps/base .py", line 96, in dispatch globalsaction File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/ allmaps.py", line 1525, in path "--figsize={0}".format(opts.figsize)]) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/ allmaps.py", line 1867, in plotall plot(xargs + [seqid]) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/ allmaps.py", line 1842, in plot savefig(image_name, dpi=iopts.dpi, iopts=iopts) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/graphics/ base.py", line 186, in savefig plt.savefig(figname, dpi=dpi) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/pyp lot.py", line 697, in savefig res = fig.savefig(*args, kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/fig ure.py", line 1573, in savefig self.canvas.print_figure(args, kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/bac kend_bases.py", line 2252, in print_figure kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/bac kends/backend_pdf.py", line 2527, in print_pdf self.figure.draw(renderer) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/art ist.py", line 63, in draw_wrapper draw(artist, renderer, args, kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/fig ure.py", line 1144, in draw renderer, self, dsu, self.suppressComposite) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/ima ge.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/art ist.py", line 63, in draw_wrapper draw(artist, renderer, *args, *kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/axe s/_base.py", line 2426, in draw mimage._draw_list_compositing_images(renderer, self, dsu) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/ima ge.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/art ist.py", line 63, in draw_wrapper draw(artist, renderer, args, **kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/tex t.py", line 798, in draw mtext=mtext) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/bac kends/backend_pdf.py", line 1845, in draw_tex dvifile = texmanager.make_dvi(s, fontsize) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/tex manager.py", line 423, in make_dvi report)) RuntimeError: LaTeX was not able to process the following string: 'JMFemale-23' Here is the full report generated by LaTeX:

Any idea of what's going on?

tanghaibao commented 6 years ago

@UFZZhao Often a LATEX installation issue. On Debian-like OS you can do:

apt-get install -y texlive texlive-latex-extra texlive-latex-recommended

Haibao

UFZZhao commented 6 years ago

Hi Haibao,

Really thanks for your quick response! Actually I am running the program in the HPC in our school and I don't have the permission to install any software. Based on your advice, what I did was:

module spider texlive, which shows the texlive (texlive/2015.20160320) is existed in the HPC. So I just loaded that module by typing module load texlive, then re-ran the program, and log is below:

Reading liftover chains Mapping coordinates 14:59:07 [base] sort -k1,1 -k2,2n -k3,3n -k4,4 JM-2.lifted.bed -o JM-2.lifted.bed 14:59:07 [base] Load file JM-2.bed 14:59:07 [allmaps] Map contains 120 markers in 2 linkage groups. 14:59:07 [base] Load file scaffolds.fasta.sizes 14:59:07 [base] Load file JM-2.chr.agp 14:59:07 [base] Load file JM-2.agp 14:59:07 [base] Load file JM-2.lifted.bed 14:59:07 [allmaps] Map contains 120 markers in 2 linkage groups. 14:59:07 [base] Load file weights.txt 14:59:07 [base] Imported 2 records from weights.txt. 14:59:07 [allmaps] Map weights: [('JMMale', 1), ('JMFemale', 1)] 14:59:07 [base] Load file JM-2.agp ERROR : Unknown image format/type: /ufrc/apps/singularity/images/texlive/2015.20160320-rhel7.img ABORT : Retval = 255 14:59:08 [base] savefig failed. Reset usetex to False. LaTeX was not able to process the following string: 'lp' Here is the full report generated by LaTeX:

/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family [u'sans-serif'] not found. Falling back to DejaVu Sans (prop.get_family(), self.defaultFamily[fontext])) ERROR : Unknown image format/type: /ufrc/apps/singularity/images/texlive/2015.20160320-rhel7.img ABORT : Retval = 255 Traceback (most recent call last): File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/allmaps.py", line 1871, in main() File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/allmaps.py", line 827, in main p.dispatch(globals()) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/apps/base.py", line 96, in dispatch globalsaction File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/allmaps.py", line 1525, in path "--figsize={0}".format(opts.figsize)]) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/allmaps.py", line 1867, in plotall plot(xargs + [seqid]) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/assembly/allmaps.py", line 1842, in plot savefig(image_name, dpi=iopts.dpi, iopts=iopts) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/jcvi/graphics/base.py", line 186, in savefig plt.savefig(figname, dpi=dpi) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/pyplot.py", line 697, in savefig res = fig.savefig(*args, kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/figure.py", line 1573, in savefig self.canvas.print_figure(args, kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2252, in print_figure kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 2527, in print_pdf self.figure.draw(renderer) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, args, kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/figure.py", line 1144, in draw renderer, self, dsu, self.suppressComposite) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, *kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2426, in draw mimage._draw_list_compositing_images(renderer, self, dsu) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, args, **kwargs) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/text.py", line 798, in draw mtext=mtext) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 1845, in draw_tex dvifile = texmanager.make_dvi(s, fontsize) File "/apps/gcc/5.2.0/python/2.7.10/lib/python2.7/site-packages/matplotlib/texmanager.py", line 423, in make_dvi report)) RuntimeError: LaTeX was not able to process the following string: 'JMFemale-23' Here is the full report generated by LaTeX:

So it shows a different error this time (ERROR: Unknown image format/type: .....). Is there something wrong with the version of the texlive in the HPC? If that is the problem, I can submit a request to let them install it again or try a different version maybe.

Thanks!

Zifan

BioYLiu commented 4 years ago

python -m jcvi.graphics.dotplot grape.peach.anchors --notex