run_haplotyping() performs density-based clustering of SNPs in region of interest to identify Marker Groups. Individuals are classified by haplotype combination based on shared combinations of Marker Group alleles. Returns a haplotyping object (HapObject), which can be used as input to build clustering tree for epsilon optimization using clustree_viz(), and can be visualized with reference to phenotype and metadata using crosshap_viz().
Usage
run_haplotyping(
vcf,
LD,
pheno,
metadata = NULL,
epsilon = c(0.2, 0.4, 0.6, 0.8, 1),
MGmin = 30,
minHap = 9,
hetmiss_as = "allele",
het_phenos = FALSE,
keep_outliers = FALSE
)
Arguments
- vcf
Input VCF for region of interest.
- LD
Pairwise correlation matrix of SNPs in region (e.g. from PLINK).
- pheno
Input numeric phenotype data for each individual.
- metadata
Metadata input (optional).
- epsilon
Epsilon values for clustering SNPs with DBscan.
- MGmin
Minimum SNPs in marker groups, MinPts parameter for DBscan.
- minHap
Minimum nIndividuals in a haplotype combination.
- hetmiss_as
If hetmiss_as = "allele", heterozygous-missing SNPs './N' are recoded as 'N/N', if hetmiss_as = "miss", the site is recoded as missing.
- het_phenos
When FALSE, phenotype associations for SNPs are calculated from reference and alternate allele individuals only, when TRUE, heterozygous individuals are included assuming additive allele effects.
- keep_outliers
When FALSE, marker group smoothing is performed to remove outliers.