parse_hla_dataset: Convert data.frame with HLA typing information to tibble...

Description Usage Arguments Value Author(s) Examples

View source: R/parseHLADataset.R

Description

Converts a data.frame that contains the HLA typing informatiOn to a tibble object. It also removes samples with missing allele group information.

Usage

1

Arguments

hladata

a data.frame with the HLA typing information from all samples.

Value

a tibble object with the HLA information for each sample.

Author(s)

Santiago Medina

Examples

 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)

NCBI-Hackathons/Integrating-HLA-typing-methods-and-RNA-seq documentation built on Nov. 23, 2019, 1:57 a.m.