Skip to content

Commit 5330aab

Browse files
authored
docs: Add Datavzrd embedding instructions for Alignoth
Updated documentation to include embedding Alignoth visualizations in Datavzrd reports.
1 parent 74410e4 commit 5330aab

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

src/docs/embedding.rst

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,53 @@ Alignoth produces fully self-contained HTML files that can be easily embedded in
88
This allows users to integrate alignment visualizations directly into existing analysis pipelines, documentation,
99
or automated reporting systems such as Snakemake or Datavzrd.
1010

11-
Below we demonstrate how to embed Alignoth visualizations within a Snakemake report.
12-
Additional examples for Datavzrd and other tools will be added in future updates.
11+
Below we demonstrate how to embed Alignoth visualizations within a Datavzrd and Snakemake report.
12+
13+
Embedding in Datavzrd
14+
=====================
15+
16+
`Datavzrd <https://datavzrd.github.io>`_ allows embedding Vega-Lite plots via its `render-plot` keyword.
17+
This enables embedding one or more Alignoth plots directly into a Datavzrd report.
18+
These views (e.g. per variant or gene of interest) can be linked to an overview table via Datavzrd's `linking feature <https://datavzrd.github.io/docs/configuration.html#links>`_.
19+
Technically embedding the alignment views can be achieved by calling Alignoth asking for a tsv formatted output using `-f tsv` and an output directory `-o output/` for the datasets and Vega-Lite spec files like this:
20+
21+
.. code-block:: bash
22+
23+
alignoth -b sample.bam -g chr1:1000-1500 -r reference.fa -o output/ -f tsv
24+
25+
This command will create the following directory structure:
26+
27+
.. code-block:: bash
28+
29+
output/
30+
├── sample.coverage.tsv
31+
├── sample.reads.tsv
32+
├── sample.reference.tsv
33+
├── sample.vl.json
34+
35+
Next, a minimal Datavzrd configuration for embedding an Alignoth view looks like this:
36+
37+
.. code-block:: yaml
38+
39+
datasets:
40+
sample.coverage:
41+
path: output/sample.coverage.tsv
42+
separator: "\t"
43+
sample.reference:
44+
path: output/sample.reference.tsv
45+
separator: "\t"
46+
sample.reads:
47+
path: output/sample.reads.tsv
48+
separator: "\t"
49+
views:
50+
sample:
51+
datasets:
52+
reads: sample.reads
53+
reference: sample.reference
54+
coverage: sample.coverage
55+
render-plot:
56+
spec-path: "output/sample.vl.json"
57+
1358

1459
Embedding in Snakemake
1560
======================

0 commit comments

Comments
 (0)