View source: R/DataUtilities.R
hlaBED2Geno | R Documentation |
To convert a PLINK BED file to an object of hlaSNPGenoClass
.
hlaBED2Geno(bed.fn, fam.fn, bim.fn, rm.invalid.allele=FALSE,
import.chr="xMHC", assembly="auto", verbose=TRUE)
bed.fn |
binary file, genotype information |
fam.fn |
family, individual information, etc |
bim.fn |
extended MAP file: two extra cols = allele names |
rm.invalid.allele |
if TRUE, remove SNPs with non-standard alleles (except A,G,C,T) |
import.chr |
the chromosome, "1" .. "22", "X", "Y", "XY", "MT", "xMHC", or "", where "xMHC" implies the extended MHC on chromosome 6, and "" for all SNPs; "6" for all SNPs on chromosome 6 for HLA; "19" for all SNPs on chromosome 19 for KIR |
assembly |
the human genome reference: "hg18", "hg19" (default), "hg38"; "auto" refers to "hg19"; "auto-silent" refers to "hg19" without any warning |
verbose |
if TRUE, show information |
Return an object of hlaSNPGenoClass
.
Xiuwen Zheng
hlaGeno2PED
, hlaGDS2Geno
# 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)
# Or
hapmap.ceu <- hlaBED2Geno(bed.fn, fam.fn, bim.fn, assembly="hg19",
rm.invalid.allele=TRUE, import.chr="6")
summary(hapmap.ceu)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.