Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/DataUtilities.R
Convert an object of hlaSNPGenoClass
to a file of
PLINK PED format.
1 | hlaGeno2PED(geno, out.fn)
|
geno |
a genotype object of |
out.fn |
the file name of output ped file |
Two files ".map" and ".ped" are created.
None.
Xiuwen Zheng
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 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="")],
max.resolution="4-digit", 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))
hlaGeno2PED(train.geno, "test")
# delete the temporary files
unlink(c("test.map", "test.ped"), force=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.