Skip to content

Commit

Permalink
Edit check_allele endpoint to use PredictionClass
Browse files Browse the repository at this point in the history
  • Loading branch information
amberzw committed Sep 13, 2017
1 parent 1b1e32c commit af5d960
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions utils/pvacapi/controllers/staging.py
Expand Up @@ -423,10 +423,7 @@ def check_allele(allele):
"""Checks if the requested allele is supported by pVAC-Seq or not"""
data = current_app.config['storage']['loader']()
if 'allele_file' not in current_app.config:
allele_file = tempfile.TemporaryFile('w+')
subprocess.call(['pvacseq', 'valid_alleles'], stdout=allele_file)
current_app.config['allele_file'] = allele_file
current_app.config['allele_file'].seek(0)
current_app.config['allele_file'] = list(PredictionClass.all_valid_allele_names())
for line in current_app.config['allele_file']:
if line.strip() == allele:
return True
Expand Down

0 comments on commit af5d960

Please sign in to comment.