Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
50ad636
feat: Add alignoth_report meta-wrapper
fxwiegand Oct 28, 2025
f1a2d96
Refactor alignoth_report workflow for VCF.gz input and table handling
fxwiegand Oct 28, 2025
c1372e9
Use dynamic coverage path in datavzrd template
fxwiegand Oct 28, 2025
ae08dd8
Merge branch 'master' into alignoth-report
fxwiegand Oct 28, 2025
efe86a8
change format
FelixMoelder Oct 28, 2025
30b22ef
add linkouts
FelixMoelder Oct 28, 2025
f87660c
fixed linkout
FelixMoelder Oct 28, 2025
8c3f917
Add default view and adjust visibility settings in datavzrd template
FelixMoelder Oct 28, 2025
589ca1c
Add pills plot for REF and ALT columns in template yaml
fxwiegand Oct 28, 2025
73474c4
Nest plot settings under pills for REF and ALT
fxwiegand Oct 28, 2025
13d92f7
Update alignoth rules to use BCF format and remove VCF files
FelixMoelder Oct 28, 2025
8153920
Add highlight dataset and view to datavzrd template
fxwiegand Oct 28, 2025
d86cefb
Merge branch 'master' into alignoth-report
fxwiegand Oct 29, 2025
706c152
Rename input parameter 'csi' to 'idx'
fxwiegand Oct 29, 2025
ff1639b
fix: set path_var
FelixMoelder Oct 29, 2025
7f0cdb8
Update template.datavzrd.yaml configuration
fxwiegand Oct 30, 2025
3b22008
disable linting for now
johanneskoester Oct 30, 2025
60923ac
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester Oct 30, 2025
4a165b9
Use --around-vcf-record
fxwiegand Oct 30, 2025
9d2b65e
prepare autobumping and set versions to the latest ones for now.
johanneskoester Oct 31, 2025
147ad2f
Merge branch 'master' into alignoth-report
fxwiegand Oct 31, 2025
0cea9a9
do not use wrapper prefix for meta-wrappers
johanneskoester Oct 31, 2025
5dd1f75
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester Oct 31, 2025
928c136
update all meta-wrappers to concrete wrapper versions (otherwise, the…
johanneskoester Oct 31, 2025
23b45e6
re-enable linting, but for the right files
johanneskoester Oct 31, 2025
977d157
comment
johanneskoester Oct 31, 2025
9bfc274
fix linting
johanneskoester Oct 31, 2025
b197187
fix: Add required alignment and reference index files
fxwiegand Nov 2, 2025
823146d
Update wrapper paths to use specific commit hashes (temporaray)
fxwiegand Nov 2, 2025
0f04ba8
Reorder columns in vembrane table output
fxwiegand Nov 3, 2025
779ba29
Update labels for SAMPLE, CHROM, POS, REF, and ALT
fxwiegand Nov 3, 2025
ea7f2a5
Merge branch 'master' into alignoth-report
fxwiegand Nov 3, 2025
13b9176
Update wrappers to version 7.9.1
fxwiegand Nov 4, 2025
f921508
try using relative paths in test snakefile and git path in wrapper pr…
johanneskoester Nov 4, 2025
204814c
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester Nov 4, 2025
ce6df8a
Move alignoth helper functions to common.smk
fxwiegand Nov 4, 2025
fd8b6b8
Remove unused pandas import
fxwiegand Nov 4, 2025
5900daf
remove breakpoint
johanneskoester Nov 5, 2025
bbef664
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester Nov 5, 2025
bae161f
start wrapper linting from the test snakefile
johanneskoester Nov 6, 2025
a1df503
fixes
johanneskoester Nov 6, 2025
24019a5
move functions into the meta wrapper itself (linter needs to be updated)
johanneskoester Nov 6, 2025
ebc924a
fix
johanneskoester Nov 7, 2025
5b793d2
fix
johanneskoester Nov 7, 2025
9707385
fixes
johanneskoester Nov 7, 2025
9285259
fix qc
johanneskoester Nov 10, 2025
4847c28
do not fail on linting errors in meta-wrappers for now
johanneskoester Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions meta/bio/alignoth_report/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: alignoth_report
description: Export variants via vembrane and create alignment plots with alignoth for a Datavzrd report.
authors:
- Felix Wiegand
- Felix Mölder
68 changes: 68 additions & 0 deletions meta/bio/alignoth_report/meta_wrapper.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import pandas as pd

checkpoint vembrane_table:
input:
"<results>/{sample}.bcf",
output:
"<results>/tables/{sample}.tsv"
log:
"<logs>/vembrane_table/{sample}.log"
params:
expression="INDEX, CHROM, POS, ALT, REF",
extra=""
wrapper:
"master/bio/vembrane/table"


rule alignoth:
input:
bam="<results>/mapped/{sample}.bam",
reference="resources/genome.fa",
vcf="<results>/{sample}.bcf",
idx="<results>/{sample}.bcf.csi",
overview="<results>/tables/{sample}.tsv"
output:
directory("<results>/alignoth/{sample}/{index}/")
params:
extra=lambda wc, input: f"--around {get_variant_position(wc, input)} -f tsv"
log:
"<logs>/alignoth/{sample}_{index}.log"
wrapper:
"master/bio/alignoth"


rule datavzrd:
input:
config=workflow.source_path("resources/template.datavzrd.yaml"),
overview="<results>/tables/{sample}.tsv",
plot_tables=lambda wc: get_alignoth_tables(wc, "results")
output:
report(
directory("<results>/datavzrd-report/{sample}"),
htmlindex="index.html",
),
# config = "resources/datavzrd/{sample}.rendered_config.yaml"
params:
max_index=lambda wc: count_variants(wc)
log:
"<logs>/datavzrd/{sample}.log",
wrapper:
"master/utils/datavzrd"


def get_alignoth_tables(wildcards, results_dir):
count = count_variants(wildcards)
l = [f"{results_dir}/alignoth/{{sample}}/{i}/" for i in range(count)]
return l


def count_variants(wildcards):
return sum(1 for _ in open(checkpoints.vembrane_table.get(sample=wildcards.sample).output[0], "r")) - 1


def get_variant_position(wildcards, input):
df = pd.read_csv(input.overview, sep="\t")
row = int(wildcards.index)
chrom = df.iloc[row]["CHROM"]
pos = df.iloc[row]["POS"]
return f"{chrom}:{pos}"
58 changes: 58 additions & 0 deletions meta/bio/alignoth_report/resources/template.datavzrd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
__use_yte__: true

default-view: variants

datasets:
variants:
path: ?input.overview
separator: "\t"
links:
alignment plot:
column: INDEX
view: "{value}"
?for i in range(params.max_index):
?f"{i}.coverage":
path: ?f"{input.plot_tables[i]}/{wildcards.sample}.coverage.tsv"
separator: "\t"
?f"{i}.reference":
path: ?f"{input.plot_tables[i]}/{wildcards.sample}.reference.tsv"
separator: "\t"
?f"{i}.reads":
path: ?f"{input.plot_tables[i]}/{wildcards.sample}.reads.tsv"
separator: "\t"
?f"{i}.highlight":
path: ?f"{input.plot_tables[i]}/{wildcards.sample}.highlight.tsv"
separator: "\t"
views:
variants:
dataset: variants
render-table:
columns:
INDEX:
display-mode: hidden
REF:
label: reference
plot:
pills:
separator: ""
domain: ["A", "T", "G", "C"]
range: ["#CADB69", "#7284A8", "#F28CC2", "#F2B671"]
merge: true
ALT:
label: alternative
plot:
pills:
separator: ""
domain: ["A", "T", "G", "C"]
range: ["#CADB69", "#7284A8", "#F28CC2", "#F2B671"]
merge: true
?for i in range(params.max_index):
?i:
hidden: true
datasets:
reads: ?f"{i}.reads"
reference: ?f"{i}.reference"
coverage: ?f"{i}.coverage"
highlight: ?f"{i}.highlight"
render-plot:
spec-path: ?f"{input.plot_tables[i]}/{wildcards.sample}.vl.json"
8 changes: 8 additions & 0 deletions meta/bio/alignoth_report/test/Snakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from snakemake.utils import min_version

min_version("9.13.1")

module alignoth_report:
meta_wrapper: "master/meta/bio/alignoth_report"

use rule * from alignoth_report
2 changes: 2 additions & 0 deletions meta/bio/alignoth_report/test/resources/genome.fa
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>1
TGTGCACCCAGGCTAATTAATGTTCATGGGAACTAATTAGAGCTGACATGTACAGCCAGCCTTTTGCTTACTCTGCGGGATCTTGTTCTGTGTGATTTCTCTAGGGGGAGCCTGCTCACTTTGAGTATTTGATGTATCCATTGCACTCAGCACCCATCACCGGTCTAGCTACCTGCATCCGCAAACCCCTTATAGCCACCTGTTCTCTGGATCGATCCATCCGCCTTTGGAATTATGAAACAAAGTAAGGAATGAAAGGCTTGCCTACTTTATTATGCAAGACCCCAGTTGTGAATTTATGTGAATTATTTTAATTACAGTGTTCCAAACTTTAATTATTTAGAAGCTTTCAGTTGGAAAAGATTTTTAAAAAATCAAGTCAGTCAACCTACCTGTTTCTCACTCTTGCGTGGGCTAGAAAACTACTTTGTGGTTTATTTAATGCTTACCACATGCTAGACACTGGGGACATGAAGAGATGAAGACAACACCTCAGTCTCTCACCTTCTTACATAAACTCCTGGGTCCCTCCAGCTCTCCTATCCCCTTGTTTCCCACAGGAACTGCTCTTTGCTTCAGGGAGCTCTCCAGACCCTTTCTTCCTCATCTTTCTCCCAGGACATCACTATCTCAACCACCCCCAACTCCCTCCTGACTTTACCTTCCAGCACAGCTTCCCTGGGAAGCTCCAACCCTAGGTGGACCCCCACCCCCTACTGTTTTCTTTGTTCTTATGTACAACTTCTGGGGCTTCTGGGGAAAAAATACTTGGACAATACTCATGAATTTTGGAATATAAACAGAGCTATGTCTTCAGCATCGCTAGACCACACCTTGACCAGTCTCCCTATCTACCATGCTCCACGCTGGACATTATCCCCTAATAACCAAGATCTAGAAAAGAGAGGAACCAACAATTGCAAACAGTAGTGTGTCTCAAATACGATGATAACAATATATATCAGATACAGTAGATGACTGGAAGGATTTAGTGAGCTAAGCTTACAATTCAGTAATTGATCTTTTTCACAGCACCCTGGAACTATTTAAGGAATACCAAGAAGAGGCATATTCCATCAGCCTTCATCCATCTGGACACTTCATTGTAGTAGGGTTTGCTGACAAACTACGCCTCATGAATCTACTCATTGATGATATACGTTCTTTCAAAGAATACTCTGTTAGAGGATGCGGAGAGGTAAAAAAAAAACTGCTGAAGACAAAAGTCCAGTTTCTTAGAAAGCCACGGCTGAAATATCAGGAACTAACATGATCTGGGGAGGTGGGACCAAAATCTGTCTTGGAGAACTACAGTGGCTTAAAAAAAGGGGGAAGGAGGAAATCCAGTTATTTTCCCAGCAACCTTATTGAGTATATGGTTCCATCCCCATATTCTTATGTCCACCAGACTATTTCATTGAACCTAAAACCTTGTGAGATCCCCGCTATGATAAGTCCTGTCTGTAATTGTGGAATATTAACAAATATTTTAAAAGAAAAGTAATCTCAGAATCAGAGTCACAGCTAAGAAGGTGAGGTTGGAGACGGAGGAGCCAGGGAAAAATAAGCATCAATGGTGAGAGGTAATAAAGAGCGCATCAGCTTTCCCTGAGGTGTCTTGCAGAAACAAGGCAATGATTTCAGGAATTACTTCCCCGGCTCTGAAACATGCTTCTACAGGCAAAATGATTGCTTGTGGTCCCAACGGCTTAATGATTTGTGGGCCTGACAGTGTCAGCATCTGGCCACTATGAGTTACAGGAATAATGAAAGTGTCTGAAAATGTCAGCCACTCCTCAGTCTCATTTGCACCTTCCCCCCACTCCCACCCTCACACGTAGTTTCAGTCTGAACTCGTTGGGAAAAGCACCTCTTGACTGTAACCTCTAATTAGACTGCTCACTTCCTGCTTGCTTGCTCTCTTGCTGTCTTTCCCTATAGTGTTCCTTTAGCAATGGAGGTCACCTGTTTGCTGCAGTCAATGGAAATGTGATTCACGTTTACACCACCACGAGCCTAGAGAACATCTCAAGCCTGAAAGGACACACAGGGAAGGTAAGTGAGTGAACAGTCTCTGGGGAAACAAGGGGCACGGAGCCAAGTATGCCGCCAGCCAGTGGGATACAGGTGAACAAAAGAGAGATGGTTCCTTTCCTCATGGGTTCACTGTCTACTTGGGGAAAGAGACAATAAAACAAATGCACAGACAAATGTAGTTACTAATTGCAGTTCCACTGAAAGAAAAACATGGTGTTGTTGTGAGAGAAATAATGAAGGGGGCGGCATAATTTAGGTGGCTGTATTTGCAAAGGCTTGGTCCTATAAGAGTGAGTAGGAGTTAATCAGACACAACTGGTGGGGATAATCACTGCAGATAGGGATCCAAAGGCCAGAGATGGGAGACTCATAGG
1 change: 1 addition & 0 deletions meta/bio/alignoth_report/test/resources/genome.fa.fai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 2411 3 2411 2412
Binary file added meta/bio/alignoth_report/test/results/NA12878.bcf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions meta/bio/alignoth_report/used_wrappers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wrappers:
- bio/vembrane/table
- bio/alignoth
- utils/datavzrd
12 changes: 12 additions & 0 deletions test_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ def test_alignoth(run):
["snakemake", "--cores", "1", "--use-conda", "-F", "out/json_plot.vl.json", "out/plot.html", "output-dir/"],
)

def test_alignoth_report_meta(run):
run(
"meta/bio/alignoth_report",
[
"snakemake",
"--cores",
"1",
"--use-conda",
"results/datavzrd-report/NA12878/",
],
)


def test_miller(run):
run(
Expand Down
Loading