Description Usage Arguments Details Value Author(s) See Also Examples
To select SNPs in the flanking region of a specified HLA locus.
1 2 | hlaFlankingSNP(snp.id, position, hla.id, flank.bp=500*1000,
assembly=c("auto", "hg18", "hg19", "unknown"))
|
snp.id |
a vector of SNP IDs |
position |
a vector of positions |
hla.id |
the name of HLA locus |
flank.bp |
the size of flanking region on each side in basepair |
assembly |
the human genome reference: "hg19" (default), "hg18", "auto" refers to "hg19" |
hla.id
is "A", "B", "C", "DRB1", "DRB5", "DQA1", "DQB1", "DPB1" or
"any".
Return allele frequecies.
Xiuwen Zheng
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # load HLA types and SNP genotypes
data(HLA_Type_Table, package="HIBAG")
data(HapMap_CEU_Geno, package="HIBAG")
# 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")
# training genotypes
region <- 500 # kb
snpid <- hlaFlankingSNP(HapMap_CEU_Geno$snp.id, HapMap_CEU_Geno$snp.position,
hla.id, region*1000, assembly="hg19")
train.geno <- hlaGenoSubset(HapMap_CEU_Geno,
snp.sel = match(snpid, HapMap_CEU_Geno$snp.id),
samp.sel = match(hla$training$value$sample.id, HapMap_CEU_Geno$sample.id))
summary(train.geno)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.