vcf2hap: Generat Haps from VCF

View source: R/hap2vcf.R

vcf2hapR Documentation

Generat Haps from VCF

Description

Generate hapResult from vcfR object A simple filter by position was provided in this function, however it's prefer to filter VCF (vcfR object) through filter_vcf().

Usage

vcf2hap(
  vcf,
  hapPrefix = "H",
  filter_Chr = FALSE,
  filter_POS = FALSE,
  pad = 3,
  hetero_remove = TRUE,
  na_drop = TRUE,
  ...
)

Arguments

vcf

vcfR object imported by import_vcf()

hapPrefix

prefix of hap names, default as "H"

filter_Chr

not used

filter_POS

not used

pad

The number length in haplotype names should be extend to.

hetero_remove

whether remove accessions contains hybrid site or not. Default as TRUE

na_drop

whether remove accessions contains unknown allele site or not Default as TRUE.

...

Parameters not used

Value

object of hapResult class

Author(s)

Zhangrenl

See Also

extract genotype from vcf: vcfR::extract_gt_tidy(), import vcf files: import_vcf() (preferred) and vcfR::read.vcfR(), filter vcf according position and annotations: filter_vcf()

Examples

data("geneHapR_test")
hapResult <- vcf2hap(vcf)

geneHapR documentation built on May 29, 2024, 11:59 a.m.