hap_summary: Summary Hap Results

View source: R/vis_hapVisualization.R

hap_summaryR Documentation

Summary Hap Results

Description

A function used for summarize hapResult to visualization and calculation.

Usage

hap_summary(hap,
            hapPrefix = "H",
            file = file)

Arguments

hap

object of hapResult class, generated by vcf2hap() or seqs2hap or import_hap()

hapPrefix

prefix of hap names, default as "H"

file

file path where to save the hap summary result. If missing, nothing will be saved to disk.

Details

It is suggested to use the result of vcf2hap() or seqs2hap() as input directly. However the user can import previously hap result from local file with import_hap()

Value

hapSummary, first four rows are fixed to meta information: CHR, POS, INFO, ALLELE Hap names were placed in first column, Accessions and freqs were placed at the last two columns.

Note

If the user have changed the default hapPrefix in vcf2hap() or seqs2hap(), then the parameter hapPrefix is needed. Furthermore, a multi-letter prefix of hap names is possible.

Examples

data("geneHapR_test")
hapSummary <- hap_summary(hapResult, hapPrefix = "H")

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