hlaHaploSubset: Get a subset of haplotypes

Description Usage Arguments Details Value Author(s) See Also

Description

To get a subset of haplotypes from a hlaSNPHaploClass object.

Usage

1
hlaHaploSubset(haploobj, samp.sel=NULL, snp.sel=NULL)

Arguments

haploobj

a haplotype object of hlaSNPHaploClass

samp.sel

a logical vector, or an integer vector of indices

snp.sel

a logical vector, or an integer vector of indices

Details

haploobj$haplotype is a numeric matrix, with an entry value 0 standing for B (ZERO A allele), 1 for A (ONE A allele) and others for missing values (missing genotypes are usually set to be NA).

Value

Return a hlaSNPHaploClass object, and it is a list:

haplotype

a haplotype matrix, “# of SNPs” - by - “2 x # 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”

Author(s)

Xiuwen Zheng

See Also

hlaMakeSNPGeno, hlaMakeSNPHaplo, hlaGenoSubset, hlaGenoCombine


HIBAG documentation built on May 2, 2019, 4:50 p.m.