hap2hmp: Convert hapResult object to hapmap (hmp) format, for interact...

View source: R/hap2hmp.R

hap2hmpR Documentation

Convert hapResult object to hapmap (hmp) format, for interact with other packages

Description

Convert hapResult object to hapmap (hmp) format, for interact with other packages

Usage

hap2hmp(hap)

hmp2hap(hmp, hapPrefix = "H", hetero_remove = TRUE, na_drop = TRUE, ...)

Arguments

hap

object of "hapResult" class

hmp

object of "data.frame" class in hapmap format

hapPrefix

prefix of haplotype names

hetero_remove

whether remove accessions contains hyb-sites, Character not A T C G

na_drop

whether drop accessions contains missing data ("N", "NA", ".")

...

Arguments passed on to table2hap

x

a data.frame contains variants information. The first file column are fix as Chrome name, position, reference nuclieotide, alter nuclieotide and INFO. Accession genotype should be in followed columns. "-" will be treated as Indel. "." and "N" will be treated as missing data. Heterozygotes should be "A/T", "AAA/A"

pad

The number length in haplotype names should be extend to.

Value

a data.frame in hapmap format.

Examples


data("geneHapR_test")
hmp <- hap2hmp(hapResult)
hap <- hmp2hap(hmp)


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