haplotype_variants {HaploVar} | R Documentation |
Identify Haplotype Variants
Description
This function requires a VCF and an LD matrix. It will then define local haplotypes and identify the variants for each haplotype. The output can be formatted in six ways, to be compatible with a wide range of GWAS and genomic selection tools.
Usage
haplotype_variants(
vcf,
LD,
epsilon = 0.6,
MGmin = 30,
minFreq = 2,
hetmiss_as = "allele",
keep_outliers = FALSE,
format = 1
)
Arguments
vcf |
A VCF file. |
LD |
A LD matrix file. |
epsilon |
Affects haplotype size. It is a parameter of the DBSCAN clustering tool. The default is 0.6. |
MGmin |
The minimum number of SNPs within a cluster for it to be defined as a haplotype.The default is 30. |
minFreq |
The minimum number of individuals a haplotype variant must be present in to be considered a valid haplotype variant. The default is 2. |
hetmiss_as |
Affects how missing data is handled for all instances where one allele in a genotype is missing.If hetmiss_as = "allele" the genotype is assumed to be heterozygous. If hetmiss_as = "miss" the genotype is treated as NA. |
keep_outliers |
If FALSE removes SNPs, that are determined to be outliers. |
format |
The output format. There are six different output formats (1,2,3,4,5,6). |
Value
A table of haplotype genotypes in your chosen format.