Closed MillironX closed 2 years ago
Maybe it would be better to use a static site generator, instead. The workflow would look like:
SITE_GENERATOR
SITE_GENERATOR
uses a static site generator to create the visualizer webpages, with links to the proper output filesSITE_GENERATOR
has its publishDir
directive and output:
set to publish all the correct files to the results directoryflowchart TD
subgraph Processes
A[KRAKEN_CLASSIFICATION]
B[FASTQC]
C[MINIMAP_ALIGMENT]
D[HAPLINK_HAPLOTYPES]
E[RAXML_TREE]
end
subgraph Analysis
X[MULTIQC]
Y["Metadata compiler (Nextflow)"] -- CSV or YAML --> Z[STATIC_GENERATOR]
end
subgraph Output
O[params.outdir]
end
A -- kreport --> X
B -- zip --> X
C -- "path(bam)" --> Y
C -- bam --> O
D -- YAML --> Y
D -- YAML --> O
E -- "path(newick)" --> Y
E -- newick --> O
X -- HTML --> O
Z -- HTML --> O
Possible site generators:
Name | Repo | Pros | Cons |
---|---|---|---|
Jekyll | https://github.com/jekyll/jekyll | Ubiquitous | |
Hugo | https://github.com/gohugoio/hugo | Powerful, includes optimization, integrates well with NPM | Extending is hard (no sequence support) |
Franklin.jl | https://github.com/tlienart/Franklin.jl | Easy extension with Julia (BioJulia support) | Doesn't seem to support data files? |
A static site generator for the final product is out due to Cross origin resource sharing issues. However, a static site generator could still create individual pieces, namely
Then the server would simply serve up the remote resources, including
As much as I hate CDNs, I think they will be required for this page in the end. Then the only dependencies will be a web server (Node.js, Python, Julia even). CDN resources include
Starting with #40, the output is mostly a static page, but it still needs a server. Linux and Mac users can use Python3's http.server
. We should try to compile a binary from https://github.com/tlienart/LiveServer.jl for Windows users.
Summary
Create a script that goes from a clean install to fully functional Visualizer with just a double-click from the user that is output with the results.
More Info
Context
For many of our target users, installing
npm
and maintaining it is difficult. This would make it graphical and "easy."Possible implementation
The script would do, in pseudocode:
A Windows version (batchfile) should also be included.