Skip to content

Commit

Permalink
fix csq_load issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jody Phelan committed Jan 20, 2020
1 parent c1f7c5f commit e124e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pathogenprofiler/vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tbprofiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit e124e43

Please sign in to comment.