View source: R/makeQueryTable.R
makeQueryTable | R Documentation |
Given a data.frame containing Antigen/Antibody names, reformat the names into possible gene names and return the data.frame in long format.
makeQueryTable(
df,
ab = "Antigen",
id = "ID",
control_col = NA,
fun = NA,
verbose = TRUE
)
df |
A data.frame or tibble. |
ab |
(character(1), default: "Antigen") Name of column in df containing antibody names |
id |
(default: "ID") Name of column in df containing IDs for each row. |
control_col |
(character(1), default: NA) Optional name of a logical column indicating whether an antibody is an isotype control. If present, controls will be removed to avoid spurious matches as they usually do not react against human genes. |
fun |
Optional custom function for formatting antigen names. Must take an argument "ab" giving the column name (as above) as its only argument. Other arguments can be prefilled e.g. with purrr::partial. |
verbose |
(logical, default: TRUE) If TRUE, prints a message when starting |
A tibble with columns containing the original ID, "name", the name of the formatting method that was applied, and "value", the result of applying the formatting method to the original antigen. The value "Antigen" in the name column contains the original antigen value, with some minor formatting such as converting Greek symbols to Latin characters.
Helen Lindsay
df <- data.frame(Antigen = c("KLRG1 (MAFA)", "KLRG1", "CD3 (CD3E)",
"HLA.A.B.C", "HLA-A/B/C", "NKAT2",
"CD66a.c.e", "CD66a_c_e", "CD11a/CD18 (LFA-1)"),
ID = LETTERS[1:9])
makeQueryTable(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.