Skip to content

Commit

Permalink
Merge pull request #1212 from apastore/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
chapmanb committed Feb 4, 2016
2 parents 7e21581 + 47a8736 commit 5ec1aee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bcbio/variation/mutect2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from bcbio.variation import annotation, bamprep, vcfutils, ploidy
from bcbio.variation.vcfutils import bgzip_and_index

def _shared_gatk_call_prep(align_bams, items, ref_file, dbsnp, region, out_file):
def _shared_gatk_call_prep(align_bams, items, ref_file, dbsnp, cosmic, region, out_file):
"""Shared preparation work for GATK variant calling.
"""
data = items[0]
Expand All @@ -30,7 +30,7 @@ def _shared_gatk_call_prep(align_bams, items, ref_file, dbsnp, region, out_file)
for a in annotation.get_gatk_annotations(config):
params += ["--annotation", a]
for x in align_bams:
bam.index(x, base_config)
bam.index(x, config)

paired = vcfutils.get_paired_bams(align_bams, items)
if not paired:
Expand All @@ -39,10 +39,8 @@ def _shared_gatk_call_prep(align_bams, items, ref_file, dbsnp, region, out_file)
"pipelines.html#cancer-variant-calling\n"
"for samples: %s" % ", " .join([dd.get_sample_name(x) for x in items]))
params += ["-I:tumor", paired.tumor_bam]
params += ["--tumor_sample_name", paired.tumor_name]
if paired.normal_bam is not None:
params += ["-I:normal", paired.normal_bam]
params += ["--normal_sample_name", paired.normal_name]
if paired.normal_panel is not None:
params += ["--normal_panel", paired.normal_panel]
if dbsnp:
Expand All @@ -67,7 +65,7 @@ def mutect2_caller(align_bams, items, ref_file, assoc_files,
if not utils.file_exists(out_file):
broad_runner, params = \
_shared_gatk_call_prep(align_bams, items,
ref_file, assoc_files.get("dbsnp"),
ref_file, assoc_files.get("dbsnp"), assoc_files.get("cosmic"),
region, out_file)
assert LooseVersion(broad_runner.gatk_major_version()) >= LooseVersion("3.5"), \
"Require full version of GATK 3.5+ for mutect2 calling"
Expand Down

0 comments on commit 5ec1aee

Please sign in to comment.