-
Notifications
You must be signed in to change notification settings - Fork 205
feat!: Pin wrapper versions in meta-wrappers; add alignoth_report meta-wrapper #4678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
50ad636
feat: Add alignoth_report meta-wrapper
fxwiegand f1a2d96
Refactor alignoth_report workflow for VCF.gz input and table handling
fxwiegand c1372e9
Use dynamic coverage path in datavzrd template
fxwiegand ae08dd8
Merge branch 'master' into alignoth-report
fxwiegand efe86a8
change format
FelixMoelder 30b22ef
add linkouts
FelixMoelder f87660c
fixed linkout
FelixMoelder 8c3f917
Add default view and adjust visibility settings in datavzrd template
FelixMoelder 589ca1c
Add pills plot for REF and ALT columns in template yaml
fxwiegand 73474c4
Nest plot settings under pills for REF and ALT
fxwiegand 13d92f7
Update alignoth rules to use BCF format and remove VCF files
FelixMoelder 8153920
Add highlight dataset and view to datavzrd template
fxwiegand d86cefb
Merge branch 'master' into alignoth-report
fxwiegand 706c152
Rename input parameter 'csi' to 'idx'
fxwiegand ff1639b
fix: set path_var
FelixMoelder 7f0cdb8
Update template.datavzrd.yaml configuration
fxwiegand 3b22008
disable linting for now
johanneskoester 60923ac
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester 4a165b9
Use --around-vcf-record
fxwiegand 9d2b65e
prepare autobumping and set versions to the latest ones for now.
johanneskoester 147ad2f
Merge branch 'master' into alignoth-report
fxwiegand 0cea9a9
do not use wrapper prefix for meta-wrappers
johanneskoester 5dd1f75
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester 928c136
update all meta-wrappers to concrete wrapper versions (otherwise, the…
johanneskoester 23b45e6
re-enable linting, but for the right files
johanneskoester 977d157
comment
johanneskoester 9bfc274
fix linting
johanneskoester b197187
fix: Add required alignment and reference index files
fxwiegand 823146d
Update wrapper paths to use specific commit hashes (temporaray)
fxwiegand 0f04ba8
Reorder columns in vembrane table output
fxwiegand 779ba29
Update labels for SAMPLE, CHROM, POS, REF, and ALT
fxwiegand ea7f2a5
Merge branch 'master' into alignoth-report
fxwiegand 13b9176
Update wrappers to version 7.9.1
fxwiegand f921508
try using relative paths in test snakefile and git path in wrapper pr…
johanneskoester 204814c
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester ce6df8a
Move alignoth helper functions to common.smk
fxwiegand fd8b6b8
Remove unused pandas import
fxwiegand 5900daf
remove breakpoint
johanneskoester bbef664
Merge branch 'alignoth-report' of github.com:snakemake/snakemake-wrap…
johanneskoester bae161f
start wrapper linting from the test snakefile
johanneskoester a1df503
fixes
johanneskoester 24019a5
move functions into the meta wrapper itself (linter needs to be updated)
johanneskoester ebc924a
fix
johanneskoester 5b793d2
fix
johanneskoester 9707385
fixes
johanneskoester 9285259
fix qc
johanneskoester 4847c28
do not fail on linting errors in meta-wrappers for now
johanneskoester File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| def get_alignoth_tables(wildcards, results_dir): | ||
| count = count_variants(wildcards) | ||
| return [f"{results_dir}/alignoth/{{sample}}/{i}/" for i in range(count)] | ||
|
|
||
|
|
||
| def count_variants(wildcards): | ||
| return sum(1 for _ in open(checkpoints.vembrane_table.get(sample=wildcards.sample).output[0], "r")) - 1 | ||
|
|
||
|
|
||
| checkpoint vembrane_table: | ||
| input: | ||
| "<results>/{sample}.bcf", | ||
| output: | ||
| "<results>/tables/{sample}.tsv" | ||
| log: | ||
| "<logs>/vembrane_table/{sample}.log" | ||
| params: | ||
| expression="INDEX, CHROM, POS, REF, ALT", | ||
| extra="" | ||
| wrapper: | ||
| "v7.6.1/bio/vembrane/table" | ||
|
|
||
|
|
||
| rule alignoth: | ||
| input: | ||
| bam="<results>/mapped/{sample}.bam", | ||
| bam_idx="<results>/mapped/{sample}.bam.bai", | ||
| reference="resources/genome.fa", | ||
| reference_idx="resources/genome.fa.fai", | ||
| vcf="<results>/{sample}.bcf", | ||
| vcf_idx="<results>/{sample}.bcf.csi", | ||
| overview="<results>/tables/{sample}.tsv" | ||
| output: | ||
| directory("<results>/alignoth/{sample}/{index}/") | ||
| params: | ||
| extra=lambda wc, input: f"--around-vcf-record {wc.index} -f tsv" | ||
| log: | ||
| "<logs>/alignoth/{sample}_{index}.log" | ||
| wrapper: | ||
| "v7.9.1/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: | ||
| "v7.9.1/utils/datavzrd" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| __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: | ||
| SAMPLE: | ||
| label: sample | ||
| CHROM: | ||
| label: chromosome | ||
| POS: | ||
| label: position | ||
| INDEX: | ||
| display-mode: hidden | ||
| REF: | ||
| label: reference allele | ||
| spell: | ||
| url: v1.5.0/med/alleles | ||
| ALT: | ||
| label: alternative allele | ||
| spell: | ||
| url: v1.5.0/med/alleles | ||
| ?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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: "file:.." | ||
|
|
||
| use rule * from alignoth_report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| >1 | ||
| TGTGCACCCAGGCTAATTAATGTTCATGGGAACTAATTAGAGCTGACATGTACAGCCAGCCTTTTGCTTACTCTGCGGGATCTTGTTCTGTGTGATTTCTCTAGGGGGAGCCTGCTCACTTTGAGTATTTGATGTATCCATTGCACTCAGCACCCATCACCGGTCTAGCTACCTGCATCCGCAAACCCCTTATAGCCACCTGTTCTCTGGATCGATCCATCCGCCTTTGGAATTATGAAACAAAGTAAGGAATGAAAGGCTTGCCTACTTTATTATGCAAGACCCCAGTTGTGAATTTATGTGAATTATTTTAATTACAGTGTTCCAAACTTTAATTATTTAGAAGCTTTCAGTTGGAAAAGATTTTTAAAAAATCAAGTCAGTCAACCTACCTGTTTCTCACTCTTGCGTGGGCTAGAAAACTACTTTGTGGTTTATTTAATGCTTACCACATGCTAGACACTGGGGACATGAAGAGATGAAGACAACACCTCAGTCTCTCACCTTCTTACATAAACTCCTGGGTCCCTCCAGCTCTCCTATCCCCTTGTTTCCCACAGGAACTGCTCTTTGCTTCAGGGAGCTCTCCAGACCCTTTCTTCCTCATCTTTCTCCCAGGACATCACTATCTCAACCACCCCCAACTCCCTCCTGACTTTACCTTCCAGCACAGCTTCCCTGGGAAGCTCCAACCCTAGGTGGACCCCCACCCCCTACTGTTTTCTTTGTTCTTATGTACAACTTCTGGGGCTTCTGGGGAAAAAATACTTGGACAATACTCATGAATTTTGGAATATAAACAGAGCTATGTCTTCAGCATCGCTAGACCACACCTTGACCAGTCTCCCTATCTACCATGCTCCACGCTGGACATTATCCCCTAATAACCAAGATCTAGAAAAGAGAGGAACCAACAATTGCAAACAGTAGTGTGTCTCAAATACGATGATAACAATATATATCAGATACAGTAGATGACTGGAAGGATTTAGTGAGCTAAGCTTACAATTCAGTAATTGATCTTTTTCACAGCACCCTGGAACTATTTAAGGAATACCAAGAAGAGGCATATTCCATCAGCCTTCATCCATCTGGACACTTCATTGTAGTAGGGTTTGCTGACAAACTACGCCTCATGAATCTACTCATTGATGATATACGTTCTTTCAAAGAATACTCTGTTAGAGGATGCGGAGAGGTAAAAAAAAAACTGCTGAAGACAAAAGTCCAGTTTCTTAGAAAGCCACGGCTGAAATATCAGGAACTAACATGATCTGGGGAGGTGGGACCAAAATCTGTCTTGGAGAACTACAGTGGCTTAAAAAAAGGGGGAAGGAGGAAATCCAGTTATTTTCCCAGCAACCTTATTGAGTATATGGTTCCATCCCCATATTCTTATGTCCACCAGACTATTTCATTGAACCTAAAACCTTGTGAGATCCCCGCTATGATAAGTCCTGTCTGTAATTGTGGAATATTAACAAATATTTTAAAAGAAAAGTAATCTCAGAATCAGAGTCACAGCTAAGAAGGTGAGGTTGGAGACGGAGGAGCCAGGGAAAAATAAGCATCAATGGTGAGAGGTAATAAAGAGCGCATCAGCTTTCCCTGAGGTGTCTTGCAGAAACAAGGCAATGATTTCAGGAATTACTTCCCCGGCTCTGAAACATGCTTCTACAGGCAAAATGATTGCTTGTGGTCCCAACGGCTTAATGATTTGTGGGCCTGACAGTGTCAGCATCTGGCCACTATGAGTTACAGGAATAATGAAAGTGTCTGAAAATGTCAGCCACTCCTCAGTCTCATTTGCACCTTCCCCCCACTCCCACCCTCACACGTAGTTTCAGTCTGAACTCGTTGGGAAAAGCACCTCTTGACTGTAACCTCTAATTAGACTGCTCACTTCCTGCTTGCTTGCTCTCTTGCTGTCTTTCCCTATAGTGTTCCTTTAGCAATGGAGGTCACCTGTTTGCTGCAGTCAATGGAAATGTGATTCACGTTTACACCACCACGAGCCTAGAGAACATCTCAAGCCTGAAAGGACACACAGGGAAGGTAAGTGAGTGAACAGTCTCTGGGGAAACAAGGGGCACGGAGCCAAGTATGCCGCCAGCCAGTGGGATACAGGTGAACAAAAGAGAGATGGTTCCTTTCCTCATGGGTTCACTGTCTACTTGGGGAAAGAGACAATAAAACAAATGCACAGACAAATGTAGTTACTAATTGCAGTTCCACTGAAAGAAAAACATGGTGTTGTTGTGAGAGAAATAATGAAGGGGGCGGCATAATTTAGGTGGCTGTATTTGCAAAGGCTTGGTCCTATAAGAGTGAGTAGGAGTTAATCAGACACAACTGGTGGGGATAATCACTGCAGATAGGGATCCAAAGGCCAGAGATGGGAGACTCATAGG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1 2411 3 2411 2412 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| wrappers: | ||
| - bio/vembrane/table | ||
| - bio/alignoth | ||
| - utils/datavzrd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.