hlaAlleleSubset: Get a subset of HLA types

Description Usage Arguments Value Author(s) See Also Examples

Description

Get a subset of HLA types from an object of hlaAlleleClass.

Usage

1
hlaAlleleSubset(hla, samp.sel=NULL)

Arguments

hla

an object of hlaAlleleClass

samp.sel

a logical vector, or an integer vector of indices

Value

Return hlaAlleleClass.

Author(s)

Xiuwen Zheng

See Also

hlaAllele, hlaAlleleDigit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# load HLA types and SNP genotypes
data(HLA_Type_Table, package="HIBAG")

head(HLA_Type_Table)
dim(HLA_Type_Table)  # 60 13

# make a "hlaAlleleClass" object
hla.id <- "A"
hla <- hlaAllele(HLA_Type_Table$sample.id,
	H1 = HLA_Type_Table[, paste(hla.id, ".1", sep="")],
	H2 = HLA_Type_Table[, paste(hla.id, ".2", sep="")],
	locus=hla.id, assembly="hg19")
summary(hla)

subhla <- hlaAlleleSubset(hla, 1:100)
summary(subhla)

HIBAG documentation built on May 2, 2019, 4:50 p.m.