parameters: (annotation_list)
return_statement: return worst
docstring: Takes list of VEP annotations [{'Consequence': 'frameshift', Feature: 'ENST'}, ...]
      Returns most severe annotation (as full VEP annotation [{'Consequence': 'frameshift', Feature: 'ENST'}])
      Also tacks on "major_consequence" for that annotation (i.e. worst_csq_from_csq)
docstring_summary: Takes list of VEP annotations [{'Consequence': 'frameshift', Feature: 'ENST'}, ...]
      Returns most severe annotation (as full VEP annotation [{'Consequence': 'frameshift', Feature: 'ENST'}])
      Also tacks on "major_consequence" for that annotation (i.e. worst_csq_from_csq)
docstring_tokens: Takes list of VEP annotations [ { Consequence : frameshift Feature : ENST } ... ] Returns most severe annotation ( as full VEP annotation [ { Consequence : frameshift Feature : ENST } ] ) Also tacks on major_consequence for that annotation ( i . e . worst_csq_from_csq )
function: def worst_csq_with_vep(annotation_list):
      """
      Takes list of VEP annotations [{'Consequence': 'frameshift', Feature: 'ENST'}, ...]
      Returns most severe annotation (as full VEP annotation [{'Consequence': 'frameshift', Feature: 'ENST'}])
      Also tacks on "major_consequence" for that annotation (i.e. worst_csq_from_csq)
      """
      if len(annotation_list) == 0:
          return None
      worst = max(annotation_list, key=annotation_severity)
      worst['major_consequence'] = worst_csq_from_csq(worst['Consequence'])
      return worst
function_tokens: def worst_csq_with_vep ( annotation_list ) : if len ( annotation_list ) == 0 : return None worst = max ( annotation_list , key = annotation_severity ) worst [ 'major_consequence' ] = worst_csq_from_csq ( worst [ 'Consequence' ] ) return worst