getDNAMatrix: Build a DNA distance matrix

View source: R/Sequence.R

getDNAMatrixR Documentation

Build a DNA distance matrix

Description

getDNAMatrix returns a Hamming distance matrix for IUPAC ambiguous DNA characters with modifications for gap, c("-", "."), and missing, c("?"), character values.

Usage

getDNAMatrix(gap = -1)

Arguments

gap

value to assign to characters in the set c("-", ".").

Value

A matrix of DNA character distances with row and column names indicating the character pair. By default, distances will be either 0 (equivalent), 1 (non-equivalent or missing), or -1 (gap).

See Also

Creates DNA distance matrix for seqDist. See getAAMatrix for amino acid distances.

Examples

# Set gap characters to Inf distance
# Distinguishes gaps from Ns
getDNAMatrix()

# Set gap characters to 0 distance
# Makes gap characters equivalent to Ns
getDNAMatrix(gap=0)


alakazam documentation built on Sept. 30, 2023, 9:07 a.m.