Converting MultiQC Reports to PDF
3
1
Entering edit mode
6.2 years ago
serodyc ▴ 20

I am having trouble converting some MultiQC reports from HTML to PDF format while preserving the files' graphics. I am working on a Red Hat Linux cluster and trying to accomplish this with a Bash script. Currently, I have tried using several versions of wkhtmltopdf to do this, and, although it converts the files, the graphs and charts are not rendered. For example, the charts for where my Sequence Quality Histograms or Per Sequence Quality Scores should be will instead have a gray box with the text "loading..." inside. Has anyone found a tool that works for this?

MultiQC PDF • 4.0k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
4
Entering edit mode
6.0 years ago
Phil Ewels ★ 1.4k

The problem is that MultiQC plots are by default rendered as interactive JavaScript objects. These aren't traditional graphics and tend to not do well with HTML conversion tools such as the one you're trying. MultiQC can render static image plots though, using the option --flat. There's also a template called "simple" (use -t simple) which produces a report with no JavaScript at all.

The --pdf option renders a HTML report using the simple template and then passes this through the pandoc command (see the command here). It's a little flaky as it requires you to install pandoc yourself, which can vary quite a bit between systems. It is something that could potentially be dropped in future versions of MultiQC.

Generally when people ask about PDF conversion I ask "Why?". I'm always curious - what's the use case here?

Phil _(author of MultiQC)_

ADD COMMENT
0
Entering edit mode

Use case example: came here looking for a way to get MultiQC reports into my thesis document, which is a PDF.

ADD REPLY
0
Entering edit mode

Probably better to export just the plots using -p (see docs). That gives you vector versions (SVG) and is much easier. You can also export manually from the interactive report, which is good if you want to customise (eg. highlighting samples etc).

ADD REPLY
2
Entering edit mode
6.2 years ago
Joe 21k

http://multiqc.info/docs/#pdf-reports

According to their docs it supports output in PDF natively, though you need Pandoc installed.

Otherwise you may be able to convert it yourself with Pandoc.

ADD COMMENT
0
Entering edit mode
4.9 years ago
joe555 • 0

If you have already generated a regular MultiQC html report, and you are not able to rerun MultiQC again for any reason, you can convert it to pdf using the Opera browser. Save it directly into pdf instead of printing it. (One use case would be if you are asked to actually print at least some of your results.) Surely, if htmldoc / pandoc on the command line works for the conversion, then it is the way to go.

ADD COMMENT

Login before adding your answer.

Traffic: 2665 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6