This function needs package vcfR, please install it.

gl.read.vcf(vcffile, ind.metafile = NULL, verbose = NULL)

Arguments

vcffile

A vcf file (works only for diploid data) [required].

ind.metafile

Optional file in csv format with metadata for each individual (see details for explanation) [default NULL].

verbose

Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2, unless specified using gl.set.verbosity].

Value

A genlight object.

Details

The ind.metadata file needs to have very specific headings. First a heading called id. Here the ids have to match the ids in the dartR object. The following column headings are optional. pop: specifies the population membership of each individual. lat and lon specify spatial coordinates (in decimal degrees WGS1984 format). Additional columns with individual metadata can be imported (e.g. age, gender).

Author

Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)

Examples

if (FALSE) { # \dontrun{
obj <- gl.read.vcf(system.file('extdata/test.vcf', package='dartR'))
} # }