Learn R Programming

immunogenetr (version 0.3.0)

GLstring_gene_copies_combine: GLstring_gene_copies_combine

Description

A function for combining two columns of typing from the same locus into a single column in the appropriate GL string format.

Usage

GLstring_gene_copies_combine(.data, columns, sample_column = "sample")

Value

A data frame with the specified columns combined into a single column for each locus, in GL string format.

Arguments

.data

A data frame

columns

The names of the columns in the data frame that contain typing information to be combined

sample_column

The name of the column that identifies samples in the data frame. Default is "sample".

Examples

Run this code
library(dplyr)
HLA_typing_1 %>%
  mutate(across(A1:B2, ~ HLA_prefix_add(.))) %>%
  GLstring_gene_copies_combine(c(A1:B2), sample_column = patient)

Run the code above in your browser using DataLab