Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Dec 5, 2014
1 parent 90edbc7 commit ec4ea29
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions workers/genotype_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ def insert_run(run, engine, connection, metadata):
if run.get('truth_vcf_path'):
vcfs.append({'uri': run['truth_vcf_path'], 'is_validation': True})

# do some validation involving the content of all the VCFs before modifying
# the database.
vcfs = filter(lambda v: not vcf_exists(connection, v['uri']), vcfs)
# Validate the contents of the VCFs before modifying the database.
vcfs = [v for v in vcfs if not vcf_exists(connection, v['uri'])]
for vcf in vcfs:
reader, header_text = load_vcf(vcf['uri'])
if vcf['is_validation'] and len(reader.samples) > 1:
Expand Down

0 comments on commit ec4ea29

Please sign in to comment.