From e8135e1bf89f59d12ab6b1b3f47649b95a15c24a Mon Sep 17 00:00:00 2001 From: Jody Phelan Date: Mon, 12 Aug 2019 13:32:55 +0100 Subject: [PATCH] add external_db --- pathogenprofiler/bam.py | 7 +++++-- setup.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pathogenprofiler/bam.py b/pathogenprofiler/bam.py index 414fcc5..a4742b0 100644 --- a/pathogenprofiler/bam.py +++ b/pathogenprofiler/bam.py @@ -47,9 +47,12 @@ def call_variants(self,caller="GATK",gff_file=None,bed_file=None,call_method="op return bcf(self.variant_bcf_file,prefix=self.prefix) def gatk_gvcf(self,bed_file=None,low_dp_as_missing=False,max_dp=None,min_dp=10): add_arguments_to_self(self,locals()) - dict_file = self.ref_file.replace(".fasta","").replace(".fa","") - if nofile(dict_file+".dict"): + dict_file = self.ref_file.replace(".fasta","").replace(".fa","")+".dict" + if nofile(dict_file): run_cmd("gatk CreateSequenceDictionary -R %(ref_file)s" % vars(self)) + if nofile(self.ref_file+".fai"): + run_cmd("samtools faidx %(ref_file)s" % vars(self)) + self.gvcf_file = "%s.gvcf.gz" % self.prefix self.tmp_gvcf_file = "%s.tmp.gvcf.gz" % self.prefix self.bed_option = "-L %s " % self.bed_file if self.bed_file else "" diff --git a/setup.py b/setup.py index 412f09c..3c1a985 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setuptools.setup( name="pathogen-profiler", - version="1.5.0", + version="1.6.0", packages=["pathogenprofiler",], license="GPL3", long_description="Pathogen profiling tool",