parameters: (row_number_to_feature)
return_statement: return row_number_to_annotation
docstring: Submit mutation events to OncoKB.org and return OncoKB annotations.
docstring_summary: Submit mutation events to OncoKB.org and return OncoKB annotations.
docstring_tokens: Submit mutation events to OncoKB . org and return OncoKB annotations .
function: def fetch_and_map_oncokb_annotations(row_number_to_feature):
      """Submit mutation events to OncoKB.org and return OncoKB annotations."""
      id_to_rownumber = {}
      for row_number, feature in row_number_to_feature.items():
          id_to_rownumber[feature[INTERNAL_ID]] = row_number
      payload_list = create_request_payload(row_number_to_feature)
      annotations = libImportOncokb.fetch_oncokb_annotations(payload_list, libImportOncokb.DEFAULT_ONCOKB_URL + "/annotate/mutations/byProteinChange")
      row_number_to_annotation = {}
      id_to_annotation = {annotation[ONCOKB_QUERY][ONCOKB_ID]: annotation for annotation in annotations}
      for row_number, feature in row_number_to_feature.items():
          if feature[INTERNAL_ID] in id_to_annotation:
              row_number_to_annotation[row_number] = id_to_annotation[feature[INTERNAL_ID]]
      return row_number_to_annotation
function_tokens: def fetch_and_map_oncokb_annotations ( row_number_to_feature ) : id_to_rownumber = { } for row_number , feature in row_number_to_feature . items ( ) : id_to_rownumber [ feature [ INTERNAL_ID ] ] = row_number payload_list = create_request_payload ( row_number_to_feature ) annotations = libImportOncokb . fetch_oncokb_annotations ( payload_list , libImportOncokb . DEFAULT_ONCOKB_URL + "/annotate/mutations/byProteinChange" ) row_number_to_annotation = { } id_to_annotation = { annotation [ ONCOKB_QUERY ] [ ONCOKB_ID ] : annotation for annotation in annotations } for row_number , feature in row_number_to_feature . items ( ) : if feature [ INTERNAL_ID ] in id_to_annotation : row_number_to_annotation [ row_number ] = id_to_annotation [ feature [ INTERNAL_ID ] ] return row_number_to_annotation