Skip to content

LarsenLab/hlaR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

CRAN install

install.packages("hlaR")
library(hlaR)

https://emory-larsenlab.shinyapps.io/hlar_shiny/

Usage example

Allele clean and mis-match

- clean

library(hlaR)
clean <- read.csv(system.file("extdata/example", "HLA_Clean_test.csv", package = "hlaR"))
clean1 <- CleanAllele(clean$recipient_a1, clean$recipient_a2)
clean2 <- CleanAllele(clean$donor_a1, clean$donor_a2)

- mis-match

dat <- read.csv(system.file("extdata/example", "HLA_Clean_test.csv", package = "hlaR"))
mm1 <- EvalAlleleMism(dat$donor_a1, dat$donor_a2, dat$recipient_a1, dat$recipient_a2)
mm1
mm2 <- EvalAlleleMism(dat$donor_b1, dat$donor_b2, dat$recipient_b1, dat$recipient_b2)
mm2

imputation

dat <- read.csv(system.file("extdata/example", "Haplotype_test.csv", package = "hlaR"))
re <- ImputeHaplo(dat_in = dat)

eplet mis-match

- MHC class I

dat <- read.csv(system.file("extdata/example", "MHC_I_test.csv", package = "hlaR"), sep = ",", header = TRUE)
eplet_mm1_v2 <- CalEpletMHCI(dat, ver = 2)
single_detail <- eplet_mm1_v2$single_detail
overall_count <- eplet_mm1_v2$overall_count

eplet_mm1_v3 <- CalEpletMHCI(dat, ver = 3)
single_detail <- eplet_mm1_v3$single_detail
overall_count <- eplet_mm1_v3$overall_count

- MHC class II

dat <- read.csv(system.file("extdata/example", "MHC_II_test.csv", package = "hlaR"), sep = ",", header = TRUE)
eplet_mm2_v2 <- CalEpletMHCII(dat, ver = 2)
single_detail <- eplet_mm2_v2$single_detail
risk <- eplet_mm2_v2$dqdr_risk
overall_count <- eplet_mm2_v2$overall_count
eplet_mm2_v3 <- CalEpletMHCII(dat, ver = 3)
single_detail <- eplet_mm2_v3$single_detail
overall_count <- eplet_mm2_v3$overall_count
risk <- eplet_mm2_v3$dqdr_risk

other functionalities

- count of mis-match

hla_mm_cnt <- read.csv(system.file("extdata/example", "HLA_MisMatch_count_test.csv", package = "hlaR"))
classI <- CountAlleleMism(hla_mm_cnt, c("mism_a", "mism_b"))
classII <- CountAlleleMism(hla_mm_cnt, c("mism_drb1", "mism_dqa", "mism_dqb"))

- topN most frequent recipient/donor alleles

dat <- read.csv(system.file("extdata/example", "HLA_MisMatch_test.csv", package = "hlaR"))
don <- c("donor.a1", "donor.a2")
rcpt <- c("recipient.a1", "recipient.a2")
re <- CalAlleleTopN(dat_in = dat, nms_don = don, nms_rcpt = rcpt, top_n = 2)
re

- frequency(freq count > 1) of donor mis-match alleles to recipients

dat <- read.csv(system.file("extdata/example", "HLA_MisMatch_test.csv", package = "hlaR"))
don <- c("donor.a1", "donor.a2")
rcpt <- c("recipient.a1", "recipient.a2")
re <- CalAlleleMismFreq(dat_in = dat, nms_don = don, nms_rcpt = rcpt)
re

ToDo CRAN 1.0.1

  • high risk if DQ > 15 instead of betwee(15,31)
  • use regex for hal clean function

Releases

No releases published

Packages

No packages published