fst.two.vcf: Calculate pairwise fst between two separate vcf files

Description Usage Arguments Value

View source: R/gwscaR_fsts.R

Description

Calculate pairwise fst between two separate vcf files

Usage

1
fst.two.vcf(vcf1.row, vcf2, match.index, cov.thresh = 0.2)

Arguments

vcf1.row

A row of a data.frame containing genotype information in vcf format

vcf2

A data.frame containing genotype information in vcf format (for another set of individuals/samples)

match.index

The name of the column that should be used to pair the two vcfs (I usually create a new column in which Chrom and Pos are concatenated)

cov.thresh

A coverage threshold specifying the proportion of individuals that should be included in each population. The default is 0.2

Value

A data.frame with the columns: Chrom Pos Hs1 = expected heterozygosity in population 1 (vcf1) Hs2 = expected heterozygosity in population 2 (vcf2) Hs = weighted average expected heterozygosity within populations Ht = expected heterozygosity among populations Fst= Fst NumAlleles=The number of alleles (2 for biallelic loci) Num1=number of individuals genotyped & included in Fst calculations in population 1 (vcf1) Num2=number of individuals genotyped & included in Fst calculations in population 2 (vcf2) @export


spflanagan/gwscaR documentation built on Nov. 14, 2019, 9:16 p.m.