Skip to content

Commit

Permalink
Merge pull request #150 from FrancescoSantini/resmem
Browse files Browse the repository at this point in the history
added rounding in dynamic resource specification
  • Loading branch information
alexg9010 authored Sep 13, 2024
2 parents 463013e + bdf97be commit 70270e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snakefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def lookup(column, predicate, fields=[]):
output:
os.path.join(OUTPUT_DIR, 'input_annotation_stats.tsv')
resources:
mem_mb = lambda wc, input: max(1.5 * input.size_mb, config['execution']['rules']['check_annotation_files']['memory'])
mem_mb = lambda wc, input: max(round(1.5 * input.size_mb), config['execution']['rules']['check_annotation_files']['memory'])
log: os.path.join(LOG_DIR, 'check_annotation_files.log')
shell: "{RSCRIPT_EXEC} {SCRIPTS_DIR}/validate_input_annotation.R {input.gtf} {input.cdna} {input.dna} {OUTPUT_DIR} >> {log} 2>&1"

Expand Down Expand Up @@ -420,7 +420,7 @@ def hisat2_file_arguments(args):
os.path.join(MAPPED_READS_DIR, 'hisat2', '{sample}_Aligned.sortedByCoord.out.bam')
resources:
mem_mb = config['execution']['rules']['hisat2_map']['memory'],
disk_mb=lambda wc, input: max(3 * input.size_mb, config['execution']['rules']['hisat2_map']['disk_mb'])
disk_mb = lambda wc, input: max(round(4 * input.size_mb), config['execution']['rules']['hisat2_map']['disk_mb'])
params:
samfile = lambda wildcards: os.path.join(MAPPED_READS_DIR, 'hisat2', "_".join([wildcards.sample, 'Aligned.out.sam'])),
index_dir = rules.hisat2_index.params.index_directory,
Expand Down

0 comments on commit 70270e5

Please sign in to comment.