Skip to contents

Calculate allele frequency difference for loci above difference threshold. For all allele frequency differences, set difference at 0

Usage

specFreqDiff(vcfR = NULL, pm = NULL, p1 = NULL, p2 = NULL, difference = 0)

Arguments

vcfR

data in vcfR format

pm

data.frame containing two columns, "id" and "pop". The ids must match those in the vcfR object, but don't need to be in the same order. Each sample must be assigned to a population

p1

(character) name of parental population 1

p2

(character) name of parental population 2

difference

(numeric) allele frequency difference threshold, must be between 0 and 1

Value

dataframe containing allele frequencies in parental pops and differences between them

Examples

#specFreqDiff(vcfR = example.vcfR, pm = example.popmap, p1 = 0, p2 = 20, difference = 1)