define_haplotypes {HaploVar}R Documentation

Define Haplotypes

Description

This function requires a VCF and an LD matrix. It will then define local haplotypes and return a list of tables. Each table within the list represents one haplotype. These haplotype tables display the SNP genotypes within the haplotype.

Usage

define_haplotypes(
  vcf,
  LD,
  epsilon = 0.6,
  MGmin = 30,
  hetmiss_as = "allele",
  keep_outliers = FALSE
)

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.

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.

Value

A list of haplotype tables.


[Package HaploVar version 0.1.1 Index]