Given a data.frame containing Antigen/Antibody names, reformat the names into possible gene names and return the data.frame in long format.
Arguments
- 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.