Skip to content

SethMusker/vcf2conStruct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vcf2conStruct

R script to convert VCF format biallelic SNP data to the format required for the conStruct R package (https://github.com/gbradburd/conStruct)

Requires the following packages: vcfR, fields, dplyr, argparser

run install.packages('vcfR', 'fields', 'dplyr', 'argparser')

usage example: Rscript vcf2conStruct.R --vcf my_file.vcf.gz --metadatafile my_meta.txt --outname my_conStruct

OR: Rscript vcf2conStruct.R -v my_file.vcf.gz -m my_meta.txt -o my_conStruct

In the above example, the output will be saved as my_conStruct.RData. The object name will always be conStruct_object (after loading into R using load("my_conStruct.RData").

Requires a metadata file with no header with columns in this order: 'sample population longitude latitude' (can be tab or space delimited)

About

convert VCF biallelic SNP data to format required for conStruct R package (https://github.com/gbradburd/conStruct)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages