Skip to content

Commit

Permalink
deps: add containers
Browse files Browse the repository at this point in the history
  • Loading branch information
boasvdp committed Jun 27, 2023
1 parent 9765610 commit d9d4f5e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ OUT = config["output_dir"]
localrules:
all,
aggregate_species,
copy_sample_bam,
copy_ref,
prepare_ab_table,
generate_ab_table_header,
mtb_filter_res_table_positions,


include: "workflow/rules/choose_species.smk"
Expand Down
8 changes: 8 additions & 0 deletions workflow/rules/mtb_prepare_files.smk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ rule index_sample_bam:
bam=OUT + "/mtb_typing/prepared_files/{sample}.bam",
output:
bai=temp(OUT + "/mtb_typing/prepared_files/{sample}.bam.bai"),
container:
"docker://staphb/samtools:1.17"
conda:
"../envs/gatk_picard.yaml"
log:
Expand Down Expand Up @@ -118,6 +120,8 @@ rule prepare_snpeff_config:
config=temp(OUT + "/mtb_typing/prepared_reference_data/{sample}/snpeff.config"),
conda:
"../envs/biopython.yaml"
container:
"docker://pegi3s/biopython:1.78"
log:
OUT + "/log/prepare_snpeff_config/{sample}.log",
shell:
Expand All @@ -137,6 +141,8 @@ rule build_snpeff_db:
touch(OUT + "/mtb_typing/prepared_reference_data/{sample}/build_snpeff_db.done"),
conda:
"../envs/snpeff.yaml"
container:
"docker://staphb/snpeff:5.1"
log:
OUT + "/log/build_snpeff_db/{sample}.log",
shell:
Expand Down Expand Up @@ -185,6 +191,8 @@ rule compress_index_ab_table:
index=OUT + "/mtb_typing/prepared_reference_data/{sample}/ab_table.tab.gz.tbi",
conda:
"../envs/bcftools.yaml"
container:
"docker://staphb/bcftools:1.16"
log:
OUT + "/log/compress_index_ab_table/{sample}.log",
shell:
Expand Down
12 changes: 12 additions & 0 deletions workflow/rules/mtb_typing.smk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ rule mtb_lineage_id:
tsv=OUT + "/mtb_typing/lineage_call/{sample}.tsv",
conda:
"../envs/fast_lineage_caller.yaml"
container:
"docker://ghcr.io/boasvdp/fast_lineage_caller:1.0.0"
log:
OUT + "/log/mtb_lineage_id/{sample}.log",
message:
Expand Down Expand Up @@ -33,6 +35,8 @@ rule mtb_coll_contamination:
tsv=OUT + "/mtb_typing/contamination_check/coll_positions/{sample}.tsv",
conda:
"../envs/gatk_picard.yaml"
container:
"docker://broadinstitute/gatk:4.3.0.0"
log:
OUT + "/log/mtb_typing/mtb_coll_contamination/{sample}.log",
shell:
Expand All @@ -53,6 +57,8 @@ rule mtb_rrs_rrl_contamination:
tsv=OUT + "/mtb_typing/contamination_check/rrs_rrl_contamination/{sample}.tsv",
conda:
"../envs/gatk_picard.yaml"
container:
"docker://broadinstitute/gatk:4.3.0.0"
log:
OUT + "/log/mtb_typing/mtb_rrs_rrl_contamination/{sample}.log",
shell:
Expand All @@ -75,6 +81,8 @@ rule mtb_snpeff_annotation:
stats=OUT + "/mtb_typing/snpeff_stats/{sample}.html",
conda:
"../envs/snpeff.yaml"
container:
"docker://staphb/snpeff:5.1"
# params:
# outdir = OUT,
# db_dir_base = "snpeff_ref"
Expand All @@ -98,6 +106,8 @@ rule mtb_annotate_ab_positions:
vcf=OUT + "/mtb_typing/annotated_vcf/{sample}.vcf",
conda:
"../envs/bcftools.yaml"
container:
"docker://staphb/bcftools:1.16"
params:
base_annotations="CHROM,POS",
extra_annotations=lambda wildcards: SAMPLES[wildcards.sample][
Expand All @@ -124,6 +134,8 @@ rule mtb_annotated_vcf_to_table:
tsv=OUT + "/mtb_typing/annotated_variants/{sample}.tsv",
conda:
"../envs/gatk_picard.yaml"
container:
"docker://broadinstitute/gatk:4.3.0.0"
params:
metadata=lambda wildcards: SAMPLES[wildcards.sample][
"resistance_variants_columns"
Expand Down

0 comments on commit d9d4f5e

Please sign in to comment.