View source: R/file_loading_functions.R
load_vcftools_stats | R Documentation |
This function will read a (possibly gzipped) VCFtools results file from windowed Fst analysis (.windowed.weir.fst), nucleotide diversity analysis (.windowed.pi), or Tajima's D (.Tajima.D) and return a tibble containing just the scaffold, position, and statistic.
load_vcftools_stats(
file,
stat = "mean_fst",
min_sites = 0,
position = "midpoint"
)
file |
VCFtools results file. Can be gzipped. |
stat |
Name of the column to use as statistic. This will be mean_fst, weighted_fst, pi, tajimas_d, ... |
min_sites |
Minimum number of sites required to keep a window |
position |
Coordinate to use as position: start, end, or midpoint |
A three-column tibble containing scaffold, bin position, and statistic
a <- system.file("extdata", "test.vcftools_pi.txt.gz",
package = "gwplotting")
b <- load_vcftools_stats( a, stat = 'pi' )
b
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.