From 4efe9eb016c29bc696bae941d80595a32a19f15b Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 29 Jul 2020 13:59:49 +0200 Subject: [PATCH] let valet use only one thread for samtools sort with `-@ 16` I get `samtools sort: couldn't allocate memory for bam_mem` seem better anyway with restrictive HPC setups --- recipes/valet/meta.yaml | 2 +- recipes/valet/valet.patch | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/recipes/valet/meta.yaml b/recipes/valet/meta.yaml index 115f98d4782ab..e97f461dd80bb 100644 --- a/recipes/valet/meta.yaml +++ b/recipes/valet/meta.yaml @@ -14,7 +14,7 @@ source: build: noarch: generic - number: 2 + number: 3 requirements: run: diff --git a/recipes/valet/valet.patch b/recipes/valet/valet.patch index 557e7dbeea00a..fc2577651b455 100644 --- a/recipes/valet/valet.patch +++ b/recipes/valet/valet.patch @@ -1,11 +1,20 @@ ---- a/src/py/valet.py -+++ b/src/py/valet.py -@@ -13,7 +13,7 @@ import sys +--- src/py/valet.py 2017-08-01 23:04:55.000000000 +0200 ++++ src/py/valet.py 2020-07-29 13:56:29.524490605 +0200 +@@ -13,7 +13,7 @@ import subprocess from subprocess import Popen, PIPE - + -BASE_PATH = os.path.dirname(sys.argv[0])[:-len('src/py/')] +BASE_PATH = os.path.dirname(os.path.realpath(__file__))[:-len('src/py/')] FILE_LIMIT = resource.getrlimit(resource.RLIMIT_NOFILE)[1] FNULL = open('/dev/null', 'w') - COMMANDS_FILE = None \ No newline at end of file + COMMANDS_FILE = None +@@ -524,7 +524,7 @@ + call_arr = ["samtools", "view", "-F", "0x100", "-bS", sam_output_location] + run(call_arr, bam_fp, error_fp) + +- call_arr = ["samtools", "sort", "-@ 16", "-o", sorted_bam_location+".bam", bam_location] ++ call_arr = ["samtools", "sort", "-o", sorted_bam_location+".bam", bam_location] + run(call_arr, stderr=FNULL) + + coverage_file_dir = output_dir + "/coverage/"