Skip to content

Commit

Permalink
bias_test try except: Exception is AttributeError not KeyError when i…
Browse files Browse the repository at this point in the history
…nput is GATK
  • Loading branch information
ian1roberts committed Jul 17, 2012
1 parent 6e91990 commit 119f19d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vcf/filters.py
Expand Up @@ -138,11 +138,12 @@ def __call__(self, record):
def bias_test(self, calls):
calls = [x for x in calls if x.called]
#TODO: single genotype assumption
print calls
try:
# freebayes
ra = robjects.IntVector([x['RO'][0] for x in calls])
aa = robjects.IntVector([x['AO'][0] for x in calls])
except KeyError:
except AttributeError:
# GATK
ra = robjects.IntVector([x['AD'][0] for x in calls])
aa = robjects.IntVector([x['AD'][1] for x in calls])
Expand Down

0 comments on commit 119f19d

Please sign in to comment.