Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9aa1593

Browse files
committedNov 24, 2016
Pass job to germline docker call (resolves #478)
1 parent cfd31fd commit 9aa1593

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed
 

‎src/toil_scripts/gatk_germline/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ def output_file_job(job, filename, file_id, output_dir, s3_key_path=None):
2222
work_dir = job.fileStore.getLocalTempDir()
2323
filepath = job.fileStore.readGlobalFile(file_id, os.path.join(work_dir, filename))
2424
if urlparse(output_dir).scheme == 's3':
25-
s3am_upload(fpath=os.path.join(work_dir, filepath),
25+
s3am_upload(job,
26+
fpath=os.path.join(work_dir, filepath),
2627
s3_dir=output_dir,
2728
s3_key_path=s3_key_path)
2829
elif os.path.exists(os.path.join(output_dir, filename)):
2930
job.fileStore.logToMaster("File already exists: {}".format(filename))
3031
else:
3132
mkdir_p(output_dir)
3233
copy_files([filepath], output_dir)
34+

‎src/toil_scripts/gatk_germline/germline.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ def prepare_bam(job, uuid, url, config, paired_url=None, rg_line=None):
566566
config.g1k_indel,
567567
config.mills,
568568
config.dbsnp,
569+
realign=False, # Do not realign INDELs
569570
memory=config.xmx,
570571
cores=config.cores).encapsulate()
571572
sorted_bam.addChild(preprocess)
@@ -674,8 +675,9 @@ def setup_and_run_bwakit(job, uuid, url, rg_line, config, paired_url=None):
674675

675676
return job.addFollowOnJobFn(run_bwakit,
676677
bwa_config,
677-
sort=False, # BAM files are sorted later in the pipeline
678+
sort=False, # BAM files are sorted later in the pipeline
678679
trim=config.trim,
680+
mark_secondary=True, # Mark split alignments as secondary
679681
cores=config.cores,
680682
disk=bwakit_disk).rv()
681683

@@ -739,7 +741,8 @@ def gatk_haplotype_caller(job,
739741

740742
# Uses docker_call mock mode to replace output with hc_output file
741743
outputs = {'output.g.vcf': hc_output}
742-
docker_call(work_dir=work_dir,
744+
docker_call(job=job,
745+
work_dir=work_dir,
743746
env={'JAVA_OPTS': '-Djava.io.tmpdir=/data/ -Xmx{}'.format(job.memory)},
744747
parameters=command,
745748
tool='quay.io/ucsc_cgl/gatk:3.5--dba6dae49156168a909c43330350c6161dc7ecc2',

‎src/toil_scripts/gatk_germline/test/test_germline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ def _get_default_inputs(self):
214214
inputs.ssec = None
215215
inputs.sorted = False
216216
inputs.cores = 4
217-
inputs.xmx = '8G'
217+
inputs.file_size = '0.5G'
218+
inputs.xmx = '4G'
218219
inputs.output_dir = self.workdir
219220
inputs.suffix = ''
220221
inputs.unsafe_mode = False

0 commit comments

Comments
 (0)
Please sign in to comment.