Description Usage Arguments Value Author(s) Examples
View source: R/parseHLADataset.R
Converts a data.frame that contains the HLA typing informatiOn to a tibble object. It also removes samples with missing allele group information.
1 | parse_hla_dataset(hladata)
|
hladata |
a |
a tibble
object with the HLA information for each sample.
Santiago Medina
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Create a data.frame as demo
demo <- data.frame(SampleName=c("DEMO1", "DEMO1", "DEMO2", "DEMO2"),
AlleleName=c(1, 2, 1, 2), GeneName=c("A", "A", "A", "A"),
AlleleGroup=c("02", "02", "03", "03"), Protein=c("01", "01", "01", "02"),
SynSubst=c("01", "02", "01", "01"), NonCoding=c("01", "01", NA, NA),
Suffix=c(NA, NA, NA, NA))
## Convert the data.frame to a tibble object
HLAClustRView:::parse_hla_dataset(demo)
## Create a data.frame with missing information
demoMissing <- data.frame(SampleName=c("DEMO1", "DEMO1", "DEMO2", "DEMO2"),
AlleleName=c(1, 2, 1, 2), GeneName=c("A", "A", "A", "A"),
AlleleGroup=c("02", "02", NA, "03"), Protein=c("01", "01", "01", "02"),
SynSubst=c("01", "02", "01", "01"), NonCoding=c("01", "01", NA, NA),
Suffix=c(NA, NA, NA, NA))
## Convert the data.frame to a tibble object
HLAClustRView:::parse_hla_dataset(demoMissing)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.