load_vcftools_stats: Load a VCFtools results file.

Description Usage Arguments Value Examples

View source: R/file_loading_functions.R

Description

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.

Usage

1
2
load_vcftools_stats(file, stat = "mean_fst", min_sites = 0,
  position = "midpoint")

Arguments

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

Value

A three-column tibble containing scaffold, bin position, and statistic

Examples

1
2
3
4
a <- system.file("extdata", "test.vcftools_pi.txt.gz",
                 package = "gwplotting")
b <- load_vcftools_stats( a, stat = 'pi' )
b

nwvankuren/genomics-plotting documentation built on April 14, 2021, 1:18 a.m.