annotateAb: Annotate antigens with identifiers

View source: R/annotateAb.R

annotateAbR Documentation

Annotate antigens with identifiers

Description

This is a wrapper for the default annotation pipeline using the functions makeQueryTable and searchAliases. It works by first transforming antigen names using a series of regular expressions, then looking for exact matches of these in the gene_aliases table, and finally removing entries where multiple genes were matched.

Usage

annotateAb(x, id_cols = NA, control_col = NA)

Arguments

x

A data.frame or tibble. Must include a column named "Antigen" containing the antigen names

id_cols

(character(n), default NA) Name(s) of columns use to identify each row in x.

control_col

(character(1), default NA) Name of a logical column in x indicating whether an antigen is an isotype control. Isotype controls will not be matched.

Details

If using this function, we recommend you check the results as the default matching functions may not suit every data set. In particular, check the results for HLA, TCR or Ig antigens.

Value

x, with additional identifier columns including the database in which the matching entry was found.

Author(s)

Helen Lindsay

Examples

# This example shows searching for alternative ways of writing the
# same antigen.
df <- data.frame(Antigen = c("CD279", "CD279 (PD-1)", "CD279_PD1",
"CD279(PD-1)", "PD-1 (CD279)","PD1 (CD279)"))
annotateAb(df)

HelenLindsay/AbNames documentation built on June 6, 2023, 1:18 p.m.