filter.var | R Documentation |
Filter (query) genotype by variation
Functon to test that a column of the genotypic matrix is a snp. Using default values for min.freqs this function tests if a site is a SNP. This function is used internally in several other functions.
filter.var(alignment.site, min.freqs = c(2, 1, 0, 0))
alignment.site |
Character vector containing alleles for each individual at a site. |
min.freqs |
Numerical vector with minimum frequency of the most common allele, minimum frequency of the second most common allele, ect.. The length of this vector determines how many individuals must have non-missing data. |
TRUE if site meets criteria specified by min.freqs, otherwise false.
library(misc.wrappers)
# Path to VCF with SNPs
vcf.path <- file.path(system.file("extdata", package = "misc.wrappers"), "simK4.vcf.gz")
# Path to file with longitude and latitude of sampling locality of each individual
coords.path <- file.path(system.file("extdata", package = "misc.wrappers"), "simK4_coords.txt")
# Run tess3r 30 times each for K=1-10
runtess(x=vcf.path,coords=coords.path,kmax=10,reps=30,save.as="tess3r_simK4.pdf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.