View source: R/DataUtilities.R
hlaGenoSubset | R Documentation |
To get a subset of genotypes from a hlaSNPGenoClass
object.
hlaGenoSubset(genoobj, samp.sel=NULL, snp.sel=NULL, snp.id=NULL)
genoobj |
a genotype object of |
samp.sel |
a logical vector, or an integer vector of indices |
snp.sel |
a logical vector, or an integer vector of indices |
snp.id |
SNP IDs to be selected, or NULL |
genoobj$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 |
optional, human genome information |
Xiuwen Zheng
hlaMakeSNPGeno
, hlaGenoCombine
summary(HapMap_CEU_Geno)
geno <- hlaGenoSubset(HapMap_CEU_Geno,
snp.sel = (hlaGenoMFreq(HapMap_CEU_Geno)>0.10))
summary(geno)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.