From e124e43fccdeb0f822760819a0e3fea514669c92 Mon Sep 17 00:00:00 2001 From: Jody Phelan Date: Mon, 20 Jan 2020 17:19:30 +0000 Subject: [PATCH] fix csq_load issue --- pathogenprofiler/vcf.py | 5 +++-- tbprofiler/__init__.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pathogenprofiler/vcf.py b/pathogenprofiler/vcf.py index a51aad1..c445524 100644 --- a/pathogenprofiler/vcf.py +++ b/pathogenprofiler/vcf.py @@ -80,6 +80,9 @@ def load_csq(self, ann_file = None): continue for i in range(4,len(row)-4,5): + if row[i+1] == ".": continue + if row[i+1][0] == "@": continue + sample = row[i] infos = [x.split("|") for x in row[i+1].split(",") if x!="."] + [x.split("|") for x in row[i+2].split(",") if x!="."] info = None @@ -92,8 +95,6 @@ def load_csq(self, ann_file = None): ad = [int(x) if x!="." else 0 for x in row[i+4].split(",")] if row[i+4]!="." else [0,100] adr = {alleles[i]:d/sum(ad) for i,d in enumerate(ad)} - if row[i+1] == ".": continue - if row[i+1][0] == "@": continue if info[-1] == "pseudogene": continue gene_name = info[1] gene_id = info[2] if info[2]!="" else gene_name diff --git a/tbprofiler/__init__.py b/tbprofiler/__init__.py index b2d3c2b..01e11bc 100644 --- a/tbprofiler/__init__.py +++ b/tbprofiler/__init__.py @@ -4,4 +4,4 @@ from .collate import * import os _ROOT = os.path.abspath(os.path.dirname(__file__)) -_VERSION = "2.8.3" +_VERSION = "2.8.4"