WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions. A function to estimate heterozygosity and the number of private alleles from a vcf file.
Source:R/Div_Stats.R
Div_stats.Rd
WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions. A function to estimate heterozygosity and the number of private alleles from a vcf file.
Arguments
- VCF
Character string indicating the name of the vcf file to be used in analysis.
- pops
Character string indicating the name of the population assignment file. This file should have four columns and be in the same order as your vcf file. The first column named Sample indicates the sample name. The second column named Population indicates the population assignment of each individual. The third column named Longitude indicates the longitude of the sample. The fourth column named Latitude indicates the latitude of the sample.
- ploidy
Numeric. The ploidy of the data.
- write
Boolean. Whether or not to write the output to a file in the current working directory.
- prefix
Character string that will be appended to file output.
Value
A list containing the estimated diversity statistics, model output from linear regression of these statistics against latitude, and model plots.
Examples
# \donttest{
data("HornedLizard_Pop")
data("HornedLizard_VCF")
Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop,
ploidy = 2, write = FALSE)# }
#> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot.
#> Registered S3 method overwritten by 'GGally':
#> method from
#> +.gg ggplot2
#> Registered S3 method overwritten by 'genetics':
#> method from
#> [.haplotype pegas
#> Formatting has finished, moving onto calculations
#> Heterozygosity calculated, moving to private alleles
#> Private Alleles have been calculated, moving onto plotting
#> Calculations have finished, the packages used to perform file formatting and calculations were
#> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles