From aa67e980d87a55db2e263aed5c9205737d3dbae6 Mon Sep 17 00:00:00 2001 From: verku Date: Mon, 11 Nov 2024 11:29:23 +0100 Subject: [PATCH] Add python3 to the container --- workflow/rules/0.1_reference_genome_preps.smk | 2 +- workflow/rules/1.2_map_to_mitogenomes.smk | 10 +++---- workflow/rules/13_GERP.smk | 8 +++--- workflow/rules/2_mapping.smk | 8 +++--- .../rules/3.1_bam_rmdup_realign_indels.smk | 28 +++++++++---------- .../rules/3.2_historical_bam_mapDamage.smk | 4 +-- workflow/rules/3.3_bam_subsampling.smk | 10 +++---- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/workflow/rules/0.1_reference_genome_preps.smk b/workflow/rules/0.1_reference_genome_preps.smk index bdfc90b..c21381f 100644 --- a/workflow/rules/0.1_reference_genome_preps.smk +++ b/workflow/rules/0.1_reference_genome_preps.smk @@ -48,7 +48,7 @@ rule samtools_fasta_index: group: "reference_prep_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools faidx {input.ref} 2> {log} diff --git a/workflow/rules/1.2_map_to_mitogenomes.smk b/workflow/rules/1.2_map_to_mitogenomes.smk index 9f0a60a..0382c5c 100644 --- a/workflow/rules/1.2_map_to_mitogenomes.smk +++ b/workflow/rules/1.2_map_to_mitogenomes.smk @@ -185,7 +185,7 @@ rule map_historical_merged_to_mito: log: "results/logs/1.2_map_to_mitogenomes/{sample}_{index}_{lane}_{mitoref}_map_historical_merged_to_mito.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ bwa aln -l 16500 -n 0.01 -o 2 -t {threads} {input.ref} {input.merged} | \ @@ -208,7 +208,7 @@ rule map_historical_unmerged_to_mito: log: "results/logs/1.2_map_to_mitogenomes/{sample}_{index}_{lane}_{mitoref}_map_historical_unmerged_to_mito.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ bwa aln -l 16500 -n 0.01 -o 2 -t {threads} {input.ref} {input.R1_un} > {output.R1_sai} 2> {log} && @@ -228,7 +228,7 @@ rule mitogenome_bam_stats: log: "results/logs/1.2_map_to_mitogenomes/{sample}_{index}_{lane}_{reads}_{mitoref}_mitogenome_bam_stats.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -320,7 +320,7 @@ rule merge_historical_mitogenome_bams_per_sample: log: "results/logs/1.2_map_to_mitogenomes/{sample}_{mitoref}_merge_historical_mitogenome_bams_per_sample.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ files=`echo {input} | awk '{{print NF}}'` @@ -345,7 +345,7 @@ rule merged_mitogenome_bam_stats: group: "historical_merged_mito_bams_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} diff --git a/workflow/rules/13_GERP.smk b/workflow/rules/13_GERP.smk index 7ccc61c..0d87e5d 100644 --- a/workflow/rules/13_GERP.smk +++ b/workflow/rules/13_GERP.smk @@ -331,7 +331,7 @@ rule align2target: log: "results/logs/13_GERP/alignment/" + REF_NAME + "/{gerpref}_align2target.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ bwa mem {params.extra} -t {threads} {input.target} {input.fastq} | \ @@ -349,7 +349,7 @@ rule index_gerp_bams: log: "results/logs/13_GERP/alignment/" + REF_NAME + "/{gerpref}_index_gerp_bams.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -366,7 +366,7 @@ rule gerp_bam_stats: log: "results/logs/13_GERP/alignment/" + REF_NAME + "/{gerpref}_gerp_bam_stats.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -411,7 +411,7 @@ rule bam2fasta: "results/logs/13_GERP/{chr}_chunks/" + REF_NAME + "/fasta/{gerpref}_{chunk}_bam2fasta.log", threads: 2 singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" # This container includes python 3.7.6 with default python modules + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" # This container includes python 3.7.6 with default python modules shell: """ if [ ! -d {output.fasta_dir} ]; then diff --git a/workflow/rules/2_mapping.smk b/workflow/rules/2_mapping.smk index faaab5c..db31d3b 100644 --- a/workflow/rules/2_mapping.smk +++ b/workflow/rules/2_mapping.smk @@ -63,7 +63,7 @@ rule sai2bam: "results/logs/2_mapping/historical/" + REF_NAME + "/{sample}_{index}_{lane}_sai2bam.log", threads: 8 singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ bwa samse -r $(cat {input.rg}) {input.ref} {input.sai} {input.fastq_hist} | \ @@ -104,7 +104,7 @@ rule map_modern: "results/logs/2_mapping/modern/" + REF_NAME + "/{sample}_{index}_{lane}_map_modern.log", threads: 8 singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ bwa mem -M -t {threads} -R $(cat {input.rg}) {input.ref} {input.fastq_mod_R1} {input.fastq_mod_R2} | \ @@ -122,7 +122,7 @@ rule index_sorted_bams: group: "sorted_bam_stats_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -141,7 +141,7 @@ rule sorted_bam_stats: group: "sorted_bam_stats_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} diff --git a/workflow/rules/3.1_bam_rmdup_realign_indels.smk b/workflow/rules/3.1_bam_rmdup_realign_indels.smk index 17d6882..41b54e1 100644 --- a/workflow/rules/3.1_bam_rmdup_realign_indels.smk +++ b/workflow/rules/3.1_bam_rmdup_realign_indels.smk @@ -56,7 +56,7 @@ rule merge_historical_bams_per_index: log: "results/logs/3.1_bam_rmdup_realign_indels/historical/" + REF_NAME + "/{sample}_{index}_merge_historical_bams_per_index.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ files=`echo {input} | awk '{{print NF}}'` @@ -82,7 +82,7 @@ rule merge_modern_bams_per_index: log: "results/logs/3.1_bam_rmdup_realign_indels/modern/" + REF_NAME + "/{sample}_{index}_merge_modern_bams_per_index.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ files=`echo {input} | awk '{{print NF}}'` @@ -106,7 +106,7 @@ rule index_merged_index_bams: group: "merged_index_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -125,7 +125,7 @@ rule merged_index_bam_stats: group: "merged_index_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -214,7 +214,7 @@ rule rmdup_historical_bams: log: "results/logs/3.1_bam_rmdup_realign_indels/historical/" + REF_NAME + "/{sample}_{index}_rmdup_historical_bams.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools view -@ {threads} -h {input.merged} | python3 workflow/scripts/samremovedup.py | samtools view -b -o {output.rmdup} 2> {log} @@ -253,7 +253,7 @@ rule index_rmdup_bams: group: "rmdup_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -272,7 +272,7 @@ rule rmdup_bam_stats: group: "rmdup_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -361,7 +361,7 @@ rule merge_historical_bams_per_sample: log: "results/logs/3.1_bam_rmdup_realign_indels/historical/" + REF_NAME + "/{sample}_merge_historical_bams_per_sample.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ files=`echo {input} | awk '{{print NF}}'` @@ -387,7 +387,7 @@ rule merge_modern_bams_per_sample: log: "results/logs/3.1_bam_rmdup_realign_indels/modern/" + REF_NAME + "/{sample}_merge_modern_bams_per_sample.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ files=`echo {input} | awk '{{print NF}}'` @@ -411,7 +411,7 @@ rule index_merged_sample_bams: group: "merged_sample_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -430,7 +430,7 @@ rule merged_sample_bam_stats: group: "merged_sample_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -566,7 +566,7 @@ rule index_realigned_bams: group: "realigned_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -585,7 +585,7 @@ rule realigned_bam_stats: log: "results/logs/3.1_bam_rmdup_realign_indels/{dataset}/" + REF_NAME + "/{sample}_realigned_bam_stats.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -661,7 +661,7 @@ rule realigned_bam_depth: log: "results/logs/3.1_bam_rmdup_realign_indels/{dataset}/" + REF_NAME + "/{sample}_realigned_bam_depth.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ if [ {params.cov} = "True" ] # include sites with missing data / zero coverage diff --git a/workflow/rules/3.2_historical_bam_mapDamage.smk b/workflow/rules/3.2_historical_bam_mapDamage.smk index c96ad3c..e515e1c 100644 --- a/workflow/rules/3.2_historical_bam_mapDamage.smk +++ b/workflow/rules/3.2_historical_bam_mapDamage.smk @@ -55,7 +55,7 @@ rule index_rescaled_bams: group: "rescaled_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -76,7 +76,7 @@ rule rescaled_bam_stats: log: "results/logs/3.2_historical_bam_mapDamage/" + REF_NAME + "/{sample}_rescaled_bam_stats.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} diff --git a/workflow/rules/3.3_bam_subsampling.smk b/workflow/rules/3.3_bam_subsampling.smk index 98a88d4..a208806 100644 --- a/workflow/rules/3.3_bam_subsampling.smk +++ b/workflow/rules/3.3_bam_subsampling.smk @@ -23,7 +23,7 @@ rule filter_bam_mapped_mq: log: "results/logs/3.3_bam_subsampling/{dataset}/" + REF_NAME + "/{sample}.{processed}_filter_bam_mapped_mq.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools view -h -b -F 4 -q 30 -@ {threads} -o {output.filtered} {input.bam} 2> {log} @@ -43,7 +43,7 @@ rule subsample_bams: log: "results/logs/3.3_bam_subsampling/{dataset}/" + REF_NAME + "/{sample}.{processed}.subs_dp{DP}_subsample_bams.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ depth=`head -n 1 {input.dp} | cut -d' ' -f 1` @@ -68,7 +68,7 @@ rule index_subsampled_bams: group: "subsampled_bam_group" singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools index {input.bam} {output.index} 2> {log} @@ -87,7 +87,7 @@ rule subsampled_bam_stats: log: "results/logs/3.3_bam_subsampling/{dataset}/" + REF_NAME + "/{sample}.{processed}.subs_dp{DP}_subsampled_bam_stats.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ samtools flagstat {input.bam} > {output.stats} 2> {log} @@ -114,7 +114,7 @@ rule subsampled_bam_depth: log: "results/logs/3.3_bam_subsampling/{dataset}/" + REF_NAME + "/{sample}.{processed}.subs_dp{DP}_subsampled_bam_depth.log", singularity: - "oras://community.wave.seqera.io/library/bwa_samtools:58df1856e12c14b9" + "oras://community.wave.seqera.io/library/bwa_samtools_python:57d090a0dc055d93" shell: """ if [ {params.cov} = "True" ] # include sites with missing data / zero coverage