Permalink
Browse files

Edit check_allele endpoint to use PredictionClass

  • Loading branch information...
amberzw committed Sep 13, 2017
1 parent 1b1e32c commit af5d96025ecd2795c6369be2ae9d273ee7cb8c76
Showing with 1 addition and 4 deletions.
  1. +1 −4 utils/pvacapi/controllers/staging.py
@@ -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

0 comments on commit af5d960

Please sign in to comment.