vcf2gpop: Convert a vcf df to a genepop file

Description Usage Arguments Value Examples

View source: R/gwscaR_utility.R

Description

Convert a vcf df to a genepop file

Usage

1
vcf2gpop(vcf, pop.list = NULL, pop.map = NULL, gpop.name)

Arguments

vcf

A data.frame in vcf format

pop.list

A list of population names (the individuals must have names containing the population names)

pop.map

A data frame with col 1 = ID names and col 2 = pop names

gpop.name

A name for the output genepop file

Value

gpop A dataframe in genepop format

Examples

1
2
3
4
5
vcf.file<-system.file("extdata", "example.vcf.txt",package = "gwscaR")
vcf<-parse.vcf(vcf.file)
gpop<-vcf2gpop(vcf,
    pop.list=c("FEM","PRM","OFF"),
    gpop.name="out.genepop")

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