tajimas_d: Tajima's D

Description Usage Arguments Details Value

View source: R/popgen.R

Description

tajimas_d uses the PopGenome package to calculate Tajima's D across an interval.

Usage

1
2
3
4
5
tajimas_d(vcf_path = paste0(path.package("cegwas"), "/"),
  vcf_name = paste0("WI.", vcf_version, ".impute.vcf.gz"),
  chromosome = "II", interval_start = 11021073, interval_end = 12008179,
  window_size = 300, slide_distance = 100, samples = colnames(snps[,
  5:ncol(snps)]), outgroup = "N2", site_of_interest = 11875145)

Arguments

vcf_path

character value of the directory path where tabix-indexed VCF file is

vcf_name

character value corresponding to tabix-indexed VCF file name

chromosome

character value corresponding to chromosome of interest. This should be the same chromosome name that is present in the VCF file

interval_start

numeric value start of interval of interest

interval_end

numeric value end of interval of interest

window_size

size of window to calculate Tajima's D in SNPs (default = 300)

slide_distance

number of SNPs to shift window (default = 100)

samples

character vector of strains to use for analysis (default is 152 strain list present in cegwas package)

outgroup

character value corresponding to strain (or strains) to serve as reference (default value is "N2")

site_of_interest

numeric value, if specified adds a line to the plot at this position.

Details

This is the detail section if you want to fill out in the future

Value

Outputs a list, where the first element is a dataframe containing Tajima's D calculations and the second is a ggplot2 object visualizing Tajima's D across the interval


AndersenLab/cegwas documentation built on March 6, 2020, 1:10 a.m.