View source: R/DataUtilities.R
hlaGenoSwitchStrand | R Documentation |
Determine the ordered pair of A and B alleles, using the allele information
provided by template
.
hlaGenoSwitchStrand(target, template,
match.type=c("Position", "Pos+Allele", "RefSNP+Position", "RefSNP"),
same.strand=FALSE, verbose=TRUE)
target |
an object of |
template |
a genotypic object of |
match.type |
|
same.strand |
|
verbose |
show information, if TRUE |
The A/B pairs of target
are determined using the information from
template
.
Return a hlaSNPGenoClass
object consisting of the SNP
intersect between target
and template
.
Xiuwen Zheng
hlaMakeSNPGeno
, hlaGenoSubset
summary(HapMap_CEU_Geno)
# A/C A/G C/T G/T
# 136 655 632 141
# import a PLINK BED file
bed.fn <- system.file("extdata", "HapMap_CEU.bed", package="HIBAG")
fam.fn <- system.file("extdata", "HapMap_CEU.fam", package="HIBAG")
bim.fn <- system.file("extdata", "HapMap_CEU.bim", package="HIBAG")
hapmap.ceu <- hlaBED2Geno(bed.fn, fam.fn, bim.fn, assembly="hg19")
summary(hapmap.ceu)
# A/C A/G A/T C/G C/T G/T
# 332 1567 64 111 1510 348
# combine two datasets together
geno <- hlaGenoSwitchStrand(HapMap_CEU_Geno, hapmap.ceu)
summary(geno)
# There are 1564 SNPs in common.
# The allele pairs of 763 SNPs need to be switched.
# A/C A/G C/T G/T
# 104 505 496 109
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.