bhofmei / jbplugin-screenshot

JBrowse plugin that adds button which uses phantomJS to take browser screenshot
Other
9 stars 3 forks source link

Track Rendering Time #11

Closed nathanhaigh closed 6 years ago

nathanhaigh commented 6 years ago

I'm trying to screenshot a JBrowse instance which is showing a dozen or so SNPCoverage tracks. Unfortunately, the screenshot is returned with "Loading" showing in several blocks/tracks to to the time required for that plugin to compute and render the info. Increasing "Extra render time" doesn't seem to help.

Is there a workaround?

bhofmei commented 6 years ago

That's a tricky one since it has to compute SNP coverage dynamically for each track each time and it's not simply a matter of loading a resource. Does it take the entire extra time to render the page? i.e. when you set extra render time to 60 sec, it takes a full minute to render? If this is the case, you can increase the maxWait time up to 300,000 (5 min), but you'll get fewer screenshots per day.

I haven't tried it yet, but you can play around with the "waitInterval" parameter (default 1000, i.e. 1 sec). In the resulting URL assuming maxWait has been set, you can try something like ...,requestSettings:{maxWait:80000,waitInterval:30000},....

Based on the official JBrowse Configuration Guide,

Note: Since the SNPCoverage track dynamically calculates coverage and putative SNPs directly from alignment data, it is not recommended for use with very dense feature data, such as deep-coverage BAM files. For these types of files, it's recommended to pre-generate a BigWig file of the coverage and a VCF file of putative SNPs, and display those instead.

This would be the easiest option, I think. You can the Multi BigWig plugin to overlay the bigwigs and set colors.

My other suggestion would be to split the tracks, take 2 screenshots, and align them after, although this is more annoying.

Hopefully one of these options will work for you! If not, let me know and I'll keep thinking. If the wait interval does work, also let me know and I'll incorporate it in the dialog.

nathanhaigh commented 6 years ago

I'll look into the parameters and report back.

The other options are also not ideal and I have suggested improvement there...but thats for a different repo. However as you mention them, here it is in brief:

I would like multibigwig tracks to have a stackable/cumulative option to sum the combined coverage of the configured bigwigs. Separate bigwig and vcf tracks for 16 genotypes takes up a lot of verticle space. It would be nice to have SNPCoverage-like track rendered from a bigwig+vcf.