get_hap: generat haps from vcf

View source: R/vcf2hap.R

get_hapR Documentation

generat haps from vcf

Description

generate hap format from vcf.

Usage

get_hap(vcf,
        hapPrefix = "H",
        filter_Chr = FALSE,
        Chr = "scaffold_1",
        filter_POS = FALSE,
        startPOS = 104,
        endPOS = 9889,
        hyb_remove = TRUE,
        na.drop = TRUE)

Arguments

vcf

vcf

hapPrefix

hapPrefix, defalt is "H"

filter_Chr

filter vcf by Chrome or not, defalt is FALSE. If TRUE, the Chr is needed.

Chr

Needed for filter vcf by Chrom

filter_POS

filter vcf by Position or not, defalt is FALSE. If TRUE, startPOS and endPOS are needed.

startPOS, endPOS

Needed for filter vcf by position. startPOS must less than endPOS

hyb_remove

Remove accessions contains hybrid site or not. Defalt is TRUE.

na.drop

Drop Accessions contains unknown allele site or note. Defalt is TRUE

Value

data.frame, first four rows are fixed to meta information: CHR, POS, INFO, ALLELE Hap names were placed in col1, Accessions were placed at the last col.

Author(s)

Zhangrenl

Examples


data("quickHap_test")
# You can import your vcf data by `import_vcf()` here
hap <- get_hap(vcf,hyb_remove = TRUE, na.drop =TRUE)
hapResult <- hap_result(hap)
plotHapTable(hapResult)

ZhangRenL/quickHapR documentation built on June 17, 2022, 12:04 a.m.