Haplotype-class: Class '"Haplotype"' in the Package 'haplotypes'

Haplotype-classR Documentation

Class "Haplotype" in the Package haplotypes

Description

S4 class to store haplotype information.

Objects from the Class

Objects can be created by calls of the form new("Haplotype", haplist, hapind, uniquehapind, sequence, d, freq, nhap), however use function haplotype instead.

Slots

haplist:

Object of class "list", containing the names of individuals that share the same haplotype.

hapind:

Object of class "list", containing the index of individuals that share the same haplotype.

uniquehapind:

Object of class "numeric", containing the index of the first occurrence of unique haplotypes.

sequence:

Object of class "matrix" if present, giving the DNA sequence matrix of unique haplotypes.

d:

Object of class "matrix", giving the absolute pairwise character difference matrix of unique haplotypes.

freq:

Object of class "numeric", giving the haplotype frequencies.

nhap:

Object of class "numeric", giving the total number of haplotypes.

Methods

as.dna

signature(x = "Haplotype"): if Haplotype object contains dna sequences, coerces an object of class Haplotype to an object of class Dna, else returns an error message.

as.list

signature(x = "Haplotype"): assigns slots of an object Haplotype to list elements.

grouping

signature(x = "Haplotype"): creates a matrix with haplotypes as rows, grouping factor (populations, species, etc.) as columns and abundance as entries.

hapreord

signature(x = "Haplotype"): reorders haplotypes according to the ordering factor.

length

signature(x = "Haplotype"): returns the number of haplotypes.

pieplot

signature(x = "Parsimnet", y = "Haplotype"): plot pie charts on statistical parsimony network.

pielegend

signature(x = "Parsimnet", y = "Haplotype"): add legends to pie charts produced using pieplot.

show

signature(object = "Haplotype"): displays the object briefly.

Author(s)

Caner Aktas, caktas.aca@gmail.com


haplotypes documentation built on July 26, 2023, 5:22 p.m.