Skip to content
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

chore: move config accesses in wrappers to params #536

Draft
wants to merge 71 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
56db085
chore: alfred/qc: move config access to params
tedil Aug 2, 2024
d0c8d2c
chore: remove alfred/qc_external wrapper (unused)
tedil Aug 2, 2024
bd25fab
chore: arriba/run: move config access to params
tedil Aug 2, 2024
d55a86b
chore: arriba/run: move config access to params (pt 2)
tedil Aug 2, 2024
affc68b
chore: ascat/*: move config access to params
tedil Aug 2, 2024
59d5f32
chore: baf_file_generation: move config access to params
tedil Aug 2, 2024
ed6e0ca
chore: bbduk: move config access to params (might need str conversions)
tedil Aug 5, 2024
f9fe113
chore: {bcftools,platypus}/call_joint: move config access to params
tedil Aug 5, 2024
260cdd2
chore: bcftools/filter: rename params to args for consistency
tedil Aug 5, 2024
9d40314
chore: bcftools/gvcf_to_vcf: move config access to params
tedil Aug 5, 2024
d0a4163
chore: bcftools/heterozygous_variants: move config access to params
tedil Aug 5, 2024
5ad8316
chore: bcftools/merge_snv_vcf: move config access to params
tedil Aug 5, 2024
6c11e19
chore: bcftools/merge_vcf: move config access to params
tedil Aug 5, 2024
842225f
chore: bcftools/pileups: move config access to params
tedil Aug 5, 2024
6bcbcf3
chore: bcftools/protected: use snakemake type hints
tedil Aug 6, 2024
5aea5fd
chore: bcftools/regions: use snakemake type hints
tedil Aug 6, 2024
5040037
chore: bcftools/stats: remove unused wrapper
tedil Aug 6, 2024
a3d5ec7
chore: bcftools/TMB: move config access to params
tedil Aug 6, 2024
1c6b52f
chore: bcftools_call: move config access to params
tedil Aug 6, 2024
c4fca92
chore: bcftools_roh: move config access to params
tedil Aug 6, 2024
1d79c9b
chore: only import snakemake.script when type checking
tedil Aug 6, 2024
f8c9c9e
fix: alfred/qc incorrect param name
tedil Aug 6, 2024
1c136b9
chore: bed_jaccard_operations: import snakemake.script.snakemake for …
tedil Aug 6, 2024
a33de05
chore: bed_venn: import snakemake.script.snakemake for type hints
tedil Aug 6, 2024
dac4295
chore: bwa: move config access to params
tedil Aug 7, 2024
31821ae
chore: bwa_mem2: move config access to params
tedil Aug 7, 2024
aad0e80
chore: canvas/somatic_wgs: move config access to params
tedil Aug 7, 2024
6b7994a
chore: cbioportal/case_lists: move config access to params
tedil Aug 7, 2024
c5b1430
chore: cbioportal/clinical_data: move config access to params
tedil Aug 7, 2024
a086273
add FIXME for cbioportal/clinical_data wrapper+model combo
tedil Aug 7, 2024
6ace434
chore: defuse: move config access to params
ericblanc20 Dec 2, 2024
9dc8543
chore: delly2: move config to params (germline_cnv & somatic not used…
ericblanc20 Dec 3, 2024
38cfec0
chore: dkfz & eb_filter: move config access to params (params to args…
ericblanc20 Dec 3, 2024
38d9f2c
chore: fastp: move config access to params (with test of adapter trim…
ericblanc20 Dec 3, 2024
1e300f1
chore: expansionhunter: move config to params & input
ericblanc20 Dec 3, 2024
55b333d
chore: gatk3, gatk4 gatk_phase_by_transmission
ericblanc20 Jan 21, 2025
c28cc39
chore: gcnv
ericblanc20 Jan 21, 2025
bb1d66c
chore: gcnv once more
ericblanc20 Jan 21, 2025
87350f9
chore: featurecounts
ericblanc20 Jan 21, 2025
3990564
chore: cnvetti & control_freec
ericblanc20 Jan 21, 2025
ed52461
chore: maelstrom
ericblanc20 Jan 21, 2025
6b93fc9
chore: manta
ericblanc20 Jan 21, 2025
a1c40da
chore: mantis2
ericblanc20 Jan 21, 2025
7c75009
chore: mbcs
ericblanc20 Jan 21, 2025
67d3b35
chore: mehari
ericblanc20 Jan 21, 2025
5d9d77b
chore: melt
ericblanc20 Jan 21, 2025
13fb144
chore: ngs_chew
ericblanc20 Jan 21, 2025
ee4f8c2
chore: optitype
ericblanc20 Jan 21, 2025
2498fa1
chore: picard
ericblanc20 Jan 21, 2025
628ce2e
chore: pizzly
ericblanc20 Jan 21, 2025
5181d1b
chore: popdel
ericblanc20 Jan 21, 2025
046ca8b
chore: rnaqc
ericblanc20 Jan 21, 2025
77d21a5
chore: rseqc
ericblanc20 Jan 21, 2025
ef7b8f7
chore: salmon
ericblanc20 Jan 21, 2025
4258edb
chore: scalpel
ericblanc20 Jan 21, 2025
5dd5228
chore: scarHRD
ericblanc20 Jan 21, 2025
23ea2ae
chore: sequenza
ericblanc20 Jan 21, 2025
31c4655
chore: somatic_cnv_checking (& friends in bcftools & vcfpy)
ericblanc20 Jan 23, 2025
e91afcf
chore: somatic_variant_filtration
ericblanc20 Jan 23, 2025
19ad956
chore: star
ericblanc20 Jan 23, 2025
627b2d9
chore: starfusion
ericblanc20 Jan 23, 2025
998a72c
chore: strelka2
ericblanc20 Jan 23, 2025
80238e9
chore: varfish_annotator
ericblanc20 Jan 23, 2025
c9b6d6f
style: make ruff check happy
ericblanc20 Jan 23, 2025
925b414
chore: variant_filtration
ericblanc20 Jan 23, 2025
45a0ddf
style: make ruff happy
ericblanc20 Jan 24, 2025
d401ab4
chore: vep
ericblanc20 Jan 24, 2025
24d2eeb
merge origin/main
tedil Feb 5, 2025
c949abd
remove uv.lock
tedil Feb 5, 2025
2d95382
remove unused wrappers
tedil Feb 5, 2025
b684e75
fmt
tedil Feb 5, 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
Prev Previous commit
Next Next commit
chore: bcftools/pileups: move config access to params
tedil committed Aug 5, 2024
commit 842225f03d7dc9599ff8126c1c1e538baae2e7f4
2 changes: 2 additions & 0 deletions snappy_pipeline/workflows/somatic_cnv_checking/Snakefile
Original file line number Diff line number Diff line change
@@ -80,6 +80,8 @@ rule somatic_cnv_checking_pileup_tumor:
unpack(wf.get_input_files("pileup", "tumor")),
output:
**wf.get_output_files("pileup", "tumor"),
params:
args=wf.get_params("pileup", "tumor"),
threads: wf.get_resource("pileup", "tumor", "threads")
resources:
time=wf.get_resource("pileup", "tumor", "time"),
24 changes: 16 additions & 8 deletions snappy_wrappers/wrappers/bcftools/pileups/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# -*- coding: utf-8 -*-
"""Wrapper for running bcftools mpileup"""

from typing import TYPE_CHECKING

from snakemake.shell import shell

step = snakemake.config["pipeline_step"]["name"]
config = snakemake.config["step_config"][step]
if TYPE_CHECKING:
from snakemake.script import snakemake


args = snakemake.params["args"]
reference_path = args["reference_path"]
max_depth = args["max_depth"]

if "args" in snakemake.params and "intervals" in snakemake.params["args"]:
locii = "-r " + snakemake.params["args"]["intervals"]
# FIXME: "locii" only ever gets set as the input, never as a parameter in args
if intervals := args["intervals"]:
locii = "-r " + intervals
elif "locii" in snakemake.input.keys():
locii = "-R " + snakemake.input.locii
elif "locii" in config and config["locii"]:
locii = "-R " + config["locii"]
elif locii_arg := args.get("locii"):
locii = "-R " + locii_arg
else:
locii = ""

@@ -32,8 +40,8 @@

bcftools mpileup \
{locii} \
--max-depth {config[max_depth]} \
-f {snakemake.config[static_data_config][reference][path]} \
--max-depth {max_depth} \
-f {reference_path} \
-a "FORMAT/AD" \
-O z -o {snakemake.output.vcf} \
{snakemake.input.bam}