Permalink
Browse files

get method no longer used. Return sample data attributes with __getat…

…tribute__
  • Loading branch information...
ian1roberts committed Jul 17, 2012
1 parent cf714f8 commit f8113321cc5dd536706731f828735ea750c5b7ba
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/vcf_melt
View
@@ -39,7 +39,7 @@ for record in reader:
for sample in record.samples:
row = [sample.sample]
- row += [flatten(sample.data.get(x, None)) for x in formats]
+ row += [flatten(sample.data.__getattribute__(x)) for x in formats]
@superbobry

superbobry Jul 31, 2012

Direct use of a magic method here can be replaced with getattr.

row += [record.FILTER or '.']
row += fixed
row += info_row

0 comments on commit f811332

Please sign in to comment.