Description Usage Arguments Value Examples
View source: R/heterozygosity.R
compute_het
returns results from heterozygosity check
1 2 | compute_het(x, output = c("marker_names", "marker_heterozygosity"),
het_threshold = 0, na_coding = "??")
|
x |
A matrix. Genotype names are stored in rows whereas marker names are stored in columns. No missing values are allowed. |
output |
Character vector with output options. |
het_threshold |
Numeric or complex vector specifying the heterozygosity threshold. |
na_coding |
Scalar providing the encoding of missing elements. |
If output
is "marker_names" a character vector with marker
names that have passed the quality check will be returned. If output
is "marker_heterozygosity" a numeric vector with the heterozygosity at each
marker locus will be returned.
1 2 3 4 5 6 7 8 | # Load a matrix with SNP genotypes encoded as numeric values
data(imp_snps)
# Return the names of all markers with a heterozygosity of less than 10%.
compute_het(imp_snps, output = "marker_names", het_threshold = 0.1)
# Return the heterozygosity at each locus.
compute_het(imp_snps, output = "marker_heterozygosity", het_threshold = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.