get_genotypes.Rd
Get genotypes matrix (counts of reference allele) from a GenABEL gwaa-data, vcfR object or an object imported using seqminer
get_genotypes(x, ind_names = NULL, marker_names = NULL)
x | a gwaa-data, a vcfR object or a genotype matrix loaded using seqminer |
---|---|
ind_names | names of individuals to extract |
marker_names | names of markers to extract |
genotype matrix ind x marker with counts of the reference allele
if marker_names is not provided, all markers present in x will be returned similarly, if ind_names is not present all individuals will be returned NOTE: beware that the genotype matrix returned contains counts of a reference allele which NOT NECESSARILY is the minor allele. Use gwasim::validate_maf() to be sure you are working with the minor alllele counts. Also, note that removing individuals may change allele frequencies and thus different alllele will be considered minor.
Marcin Kierczak <marcin.kierczak@scilifelab.se>