After processing vcf data in vcfR, one will likely proceed to an analysis step.
Within R, three obvious choices are:
pegas,
adegenet
and poppr.
The package pegas uses objects of type loci.
The function vcfR2loci calls extract.gt to create a matrix of genotypes which is then converted into an object of type loci.
The packages adegenet and poppr use the genind object.
The function vcfR2genind uses extract.gt to create a matrix of genotypes and uses the adegenet function df2genind to create a genind object.
The package poppr additionally uses objects of class genclone which can be created from genind objects using poppr::as.genclone.
A genind object can be converted to a genclone object with the function poppr::as.genclone.
The function vcfR2genlight calls the 'new' method for the genlight object.
This method implements multi-threading through calls to the function parallel::mclapply
.
Because 'forks' do not exist in the windows environment, this will only work for windows users when n.cores=1.
In the Unix environment, users may increase this number to allow the use of multiple threads (i.e., cores).
The parameter ... is used to pass parameters to other functions.
In vcfR2genind
it is used to pass parameters to adegenet::df2genind
.
For example, setting check.ploidy=FALSE
may improve the performance of adegenet::df2genind
, as long as you know the ploidy.
See ?adegenet::df2genind
to see these options.