Skip to content

Commit

Permalink
Merge pull request #549 from broadinstitute/ct-increase-trinity-mem
Browse files Browse the repository at this point in the history
raise trinity rule memory 4g->10g, JVMmemory 5g
  • Loading branch information
tomkinsc authored Dec 14, 2016
2 parents 7319dda + bce25ae commit 2e9bd5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pipes/rules/assembly.rules
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rule assemble_trinity:
input: config["data_dir"]+'/'+config["subdirs"]["per_sample"]+'/{sample}.taxfilt.bam'
output: config["tmp_dir"] +'/'+config["subdirs"]["assembly"]+'/{sample}.assembly1-trinity.fasta'
resources:
mem=4,
mem=7,
cores=int(config.get("number_of_threads", 1))
params: LSF=config.get('LSF_queues', {}).get('short', '-W 4:00'),
UGER=config.get('UGER_queues', {}).get('short', '-q short'),
Expand All @@ -52,7 +52,7 @@ rule assemble_trinity:
makedirs(expand("{dir}/{subdir}",
dir=[config["data_dir"],config["tmp_dir"]],
subdir=config["subdirs"]["assembly"]))
shell("{config[bin_dir]}/assembly.py assemble_trinity {input} {params.clipDb} {output} --n_reads={params.n_reads} --outReads {params.subsamp_bam} --threads {params.numThreads}")
shell("{config[bin_dir]}/assembly.py assemble_trinity {input} {params.clipDb} {output} --n_reads={params.n_reads} --outReads {params.subsamp_bam} --threads {params.numThreads} --JVMmemory 5g")

rule orient_and_impute:
''' This step cleans up the Trinity assembly with a known reference genome.
Expand Down
14 changes: 12 additions & 2 deletions pipes/rules/interhost.rules
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ rule ref_guided_diversity:
shell("cat " + " ".join(params.inFastas) + " > {output[0]}")
merge_vcfs(params.inVcfs, params.refGenome, output[1])

def multi_align_mafft_memory(_, input):
sample_count = len(list(read_samples_file(config["samples_assembly"])))
if sample_count in range(0,50):
mem=8
elif sample_count in range(50,100):
mem=16
elif sample_count >= 100:
mem=32
return mem

rule multi_align_mafft:
input:
expand("{data_dir}/{subdir}/{sample}.fasta",
Expand All @@ -105,10 +115,10 @@ rule multi_align_mafft:
subdir=config["subdirs"]["multialign_ref"],
chrom=range(1, len(config["accessions_for_ref_genome_build"])+1))
resources:
mem=8,
mem=multi_align_mafft_memory,
cores=int(config.get("number_of_threads", 1))
params: LSF=config.get('LSF_queues', {}).get('short', '-W 4:00'),
UGER=config.get('UGER_queues', {}).get('short', '-q short'),
UGER=config.get('UGER_queues', {}).get('long', '-q long'),
logid="all",
refGenome=os.path.join(config["ref_genome_dir"],"reference"+".fasta"),
samples=list(read_samples_file(config["samples_assembly"])),
Expand Down

0 comments on commit 2e9bd5f

Please sign in to comment.