Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/DataUtilities.R
To create a hlaSNPGenoClass
object (SNP genotypic object).
1 2 | hlaMakeSNPGeno(genotype, sample.id, snp.id, snp.position,
A.allele, B.allele, assembly="auto")
|
genotype |
a genotype matrix, “# of SNPs” - by - “# of individuals” |
sample.id |
a vector of sample IDs |
snp.id |
a vector of SNP IDs |
snp.position |
a vector of SNP positions |
A.allele |
a vector of A alleles in the SNP list |
B.allele |
a vector of B alleles in the SNP list |
assembly |
the human genome reference: "hg18", "hg19" (default), "hg38"; "auto" refers to "hg19"; "auto-silent" refers to "hg19" without any warning |
genotype
is a numeric matrix, with an entry value 0 standing for
BB (ZERO A allele), 1 for AB (ONE A allele), 2 for AA (TWO A alleles) and
others for missing values (missing genotypes are usually set to be NA).
Return a hlaSNPGenoClass
object, and it is a list:
genotype |
a genotype matrix, “# of SNPs” - by - “# of individuals” |
sample.id |
a vector of sample IDs |
snp.id |
a vector of SNP IDs |
snp.position |
a vector of SNP positions in basepair |
snp.allele |
a vector of characters with the format of “A allele/B allele” |
assembly |
the human genome reference |
Xiuwen Zheng
1 2 3 4 5 6 7 8 9 10 11 | summary(HapMap_CEU_Geno)
allele <- strsplit(HapMap_CEU_Geno$snp.allele, "/")
A.allele <- sapply(allele, function(x) { x[1] })
B.allele <- sapply(allele, function(x) { x[2] })
geno <- hlaMakeSNPGeno(HapMap_CEU_Geno$genotype, HapMap_CEU_Geno$sample.id,
HapMap_CEU_Geno$snp.id, HapMap_CEU_Geno$snp.position, A.allele, B.allele,
assembly="hg19")
summary(geno)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.