Description Usage Arguments Value Author(s) See Also Examples
View source: R/DataUtilities.R
To convert a PLINK BED file to an object of hlaSNPGenoClass
.
1 2 | 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 invalid alleles |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 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)
|
HIBAG (HLA Genotype Imputation with Attribute Bagging)
Kernel Version: v1.3
Supported by Streaming SIMD Extensions (SSE2) [64-bit]
Open "/usr/local/lib/R/site-library/HIBAG/extdata/HapMap_CEU.bed" in the individual-major mode.
Open "/usr/local/lib/R/site-library/HIBAG/extdata/HapMap_CEU.fam".
Open "/usr/local/lib/R/site-library/HIBAG/extdata/HapMap_CEU.bim".
Import 3932 SNPs within the xMHC region on chromosome 6.
SNP genotypes:
90 samples X 3932 SNPs
SNPs range from 28694391bp to 33426848bp on hg19
Missing rate per SNP:
min: 0, max: 0.1, mean: 0.0888861, median: 0.1, sd: 0.0298489
Missing rate per sample:
min: 0, max: 0.869786, mean: 0.0888861, median: 0.00101729, sd: 0.261554
Minor allele frequency:
min: 0, max: 0.5, mean: 0.210453, median: 0.191358, sd: 0.155144
Allelic information:
A/C A/G A/T C/G C/T G/T
332 1567 64 111 1510 348
Open "/usr/local/lib/R/site-library/HIBAG/extdata/HapMap_CEU.bed" in the individual-major mode.
Open "/usr/local/lib/R/site-library/HIBAG/extdata/HapMap_CEU.fam".
Open "/usr/local/lib/R/site-library/HIBAG/extdata/HapMap_CEU.bim".
Import 5316 SNPs from chromosome 6.
SNP genotypes:
90 samples X 5316 SNPs
SNPs range from 25651262bp to 33426848bp on hg19
Missing rate per SNP:
min: 0, max: 0.1, mean: 0.0882054, median: 0.1, sd: 0.030674
Missing rate per sample:
min: 0, max: 0.863619, mean: 0.0882054, median: 0.00131678, sd: 0.259735
Minor allele frequency:
min: 0, max: 0.5, mean: 0.201867, median: 0.179012, sd: 0.155475
Allelic information:
A/C A/G A/T C/G C/T G/T
471 2102 83 134 2046 480
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.