powered by
Auxiliary function to invert minor alleles and to select those variants/loci exceeding a minimal cutoff value.
selectVariants(m, phased = FALSE, invertMinorAllele = TRUE, minVariants = 0)
A (sparse) input matrix. The input matrix is assumed to be oriented to contain the data for one individual per column.
Boolean flag to indicate if the input matrix is phased. Default is phased=FALSE.
phased=FALSE
Boolean flag to indicate if the minor allele should be inverted. Default is invertMinorAllele=TRUE.
invertMinorAllele=TRUE
Cutoff value for minimal number of variants for keeping a locus. Default is minVariants=0.
minVariants=0
The processed matrix with pruned variants/loci.
# NOT RUN { require(locStra) m <- matrix(sample(0:1,100,replace=TRUE),ncol=10) print(selectVariants(m)) # }
Run the code above in your browser using DataLab