diff --git a/snakemodules/contigmap.smk b/snakemodules/contigmap.smk index dc3d8e5c2304c66d04a8b0f6a008b709a02801fa..9b88b06c2550761320b54516ccfb2405cbd88284 100644 --- a/snakemodules/contigmap.smk +++ b/snakemodules/contigmap.smk @@ -96,7 +96,8 @@ rule name_sort_unsorted: conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"] @@ -170,7 +171,8 @@ rule coordinate_sort_unsorted: conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools_25G"]["mem"], + # mem_mb = resources["samtools_25G"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools_25G"]["time"] threads: threads["multi"]["samtools"] diff --git a/snakemodules/crop_remapped.smk b/snakemodules/crop_remapped.smk index f05db9c248f5269aec0b214dec5c5e3f0eb03d75..2a6864bb1481245364c8ba56380940aad3a9b7bd 100644 --- a/snakemodules/crop_remapped.smk +++ b/snakemodules/crop_remapped.smk @@ -60,7 +60,8 @@ if config["SICKLE"]=="no": conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"] @@ -112,7 +113,8 @@ elif config["SICKLE"]=="yes": conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"] diff --git a/snakemodules/crop_unmapped.smk b/snakemodules/crop_unmapped.smk index 94e79c85a61d36c82c71f37287bb2aa7a4c5731c..9b04065354fb233d99ef6cb0a3e35a5652ed99b7 100644 --- a/snakemodules/crop_unmapped.smk +++ b/snakemodules/crop_unmapped.smk @@ -58,7 +58,8 @@ if config["SICKLE"]=="no": conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"] @@ -108,7 +109,8 @@ elif config["SICKLE"]=="yes": output: WORK_DIR + "/{sample}/non_ref.bam" resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"] diff --git a/snakemodules/kraken.smk b/snakemodules/kraken.smk index f7814e4446c4390c51cb251e615b487369d38c52..220eb5ed1497087ac1fb8f8b83b69f4e1117be5f 100644 --- a/snakemodules/kraken.smk +++ b/snakemodules/kraken.smk @@ -150,7 +150,8 @@ rule samtools_remap_classified_human: conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"] @@ -223,7 +224,8 @@ rule remapping_samsort_mates: conda: os.path.join(WORKFLOW_PATH,"snakemodules/envs/samtools.yml") resources: - mem_mb = resources["samtools"]["mem"], + # mem_mb = resources["samtools"]["mem"], + mem_mb = lambda wildcards, input, threads, attempt: resources["samtools"]["mem"] * threads, runtime = resources["samtools"]["time"] threads: threads["multi"]["samtools"]