selectVariants {locStra} | R Documentation |
Auxiliary function to invert minor alleles and to select those variants/loci exceeding a minimal cutoff value.
Description
Auxiliary function to invert minor alleles and to select those variants/loci exceeding a minimal cutoff value.
Usage
selectVariants(m, phased = FALSE, invertMinorAllele = TRUE, minVariants = 0)
Arguments
m |
A (sparse) input matrix. The input matrix is assumed to be oriented to contain the data for one individual per column. |
phased |
Boolean flag to indicate if the input matrix is phased. Default is |
invertMinorAllele |
Boolean flag to indicate if the minor allele should be inverted. Default is |
minVariants |
Cutoff value for minimal number of variants for keeping a locus. Default is |
Value
The processed matrix with pruned variants/loci.
Examples
require(locStra)
m <- matrix(sample(0:1,100,replace=TRUE),ncol=10)
print(selectVariants(m))
[Package locStra version 1.9 Index]