Adding new columns to this data frame
You can use ifelse():

anno_maf$COSMIC &lt;- ifelse(anno_maf$Hugo_Symbol %in% your_gene_list,
                          yes = "yes",
                          no = "no")