vcf2eigenstrat
vcf2eigenstrat.Rd
converts vcfR format data to Eigenstrat infiles
in part based on vcfR2migrate function (vcfR package)
Usage
vcf2eigenstrat(
vcf,
ind_pop,
keep_pop,
sex = "U",
rel_pos = 0,
inc_missing = TRUE,
out_file = "eigenstrat_infile"
)
Details
This function converts the vcfR object to a Eigenstrat formatted input files When list of sexes is not provided, lists all individuals as unknown When relative position on chromosome (cM distance or similar) is not provides, list as 0 The function will remove indels, and multiallelic loci, and optionally loci with missing data
Examples
vcf2eigenstrat(vcf = my_vcf, ind_pop = ind_pop, keep_pop = keepers, sex = list_of_sex, rel_pos = marker_cM_map, inc_missing = TRUE, out_file = "Eigenstrat")
#> Error: object 'my_vcf' not found
vcf2eigenstrat(my_vcf, ind_pop, keepers, out_file = "Eigenstrat")
#> Error: object 'my_vcf' not found
vcf2eigenstrat(my_vcf, ind_pop, keepers)
#> Error: object 'my_vcf' not found