Skip to contents

Annotate maf and maf-like files using information about protein change or HGVSg. You can annotated with tumor types indicated (oncotree codes), or without.

Usage

annotate_mutations(
  mutations,
  annotate_by = c("protein_change", "hgvsg"),
  return_simple = TRUE,
  return_query_params = FALSE
)

Arguments

mutations

a mutations file in MAF, or similar format

annotate_by

Can indicate whether to annotate by "protein_change" or "hgvsg (see oncoKB API docs for more info). "Default is protein_change

return_simple

Default is TRUE where only a set of the most common columns are returned from oncoKB annotator see oncokbR::output_dictionary for more information on what is returned. If FALSE all raw columns are returned from API.

return_query_params

If TRUE, the specific parameters used to query the API are returned in new columns. This can be useful for troubleshooting the annotator. Default is FALSE.

Value

an annotated mutations file

Examples

mutations <- oncokbR::blca_mutation[1:10, ]

# Annotate without tumor type -----
x <- annotate_mutations(mutations)
#>  No "tumor_type" found in data. No treatment-level annotations will be returned.

# Annotate with tumor type -----

# Annotate by HGVSg
z <- annotate_mutations(oncokbR::mutations_hgvsg, annotate_by =  "hgvsg")
#>  No "tumor_type" found in data. No treatment-level annotations will be returned.