Alternative fmriprep Visual Reports Format?

Hi all -

Unfortunately, the HPC portal we use at UNC, OnDemand, removed support for rendering html files due to (understandable) security concerns. This has made it much more inconvenient for fmriprep users and quality control checkers to access the Visual QA html files provided by fmriprep.

While there is an issue open to bring this feature back: Return HTML rendering · Issue #1619 · OSC/ondemand · GitHub

It doesn’t seem like this will happen anytime soon.

Of course, we have work arounds available like viewing the html from a desktop instance, but this is considerable less convenient.

I was thinking that it would be nice if we could render those figure .svgs in a pdf instead of html, and thought I’d ask if anyone knew if fmriprep had some sort of switch for this before I try and implement it myself.

Thanks - Will

Some systems let you use SSHFS or globus to mount the remote filesytem locally, which could make it easier to view the files. Wouldn’t have to download all the html and svg files at least.

Pandoc can convert html to pdf, but it requires a few packages that might not exist on the system. In addition to pandoc I had to install python3-sphinxcontrib.svg2pdfconverter and texlive-latex-recommended on my debian system. Maybe there are other pandoc outputs that work out of the box that they’ll let you display?

Something interesting I found out, UNC ondemand lets you run jupyter note books and tere is a way to render an HTML file directly in a notebook:

I tried with local fmriprep outputs and unfortunately it wouldn’t load the SVGs due to how jupyter interprets the paths for external images. If there was a way to output the reports all in one file it may be viable.

Sorry these aren’t great, hopefully somebody can come up with something better.

Thanks, I really appreciate the detailed reply.

Yeah, I looked briefly into using Python to do an html → pdf conversion but was disappointed by the system dependencies - I don’t have root on the cluster so I’d have to deploy them as stand alone installations.

The notebooks are an interesting idea - I had considered trying to use notebooks to make it easier for quality checkers to view raw images (fsleyes has some notebook integration capabilities). We’d still have to boot up cluster resources to use the notebook, so to me that starts to get into the same effort range as starting up a desktop. However, if both the presentation of the html AND presentation of the raw data were in a single notebook - that would be really worth it.

Anyways, thanks again for the suggestions!!