Learn R Programming

VLF (version 1.1)

MODE: Modal Sequence

Description

Calculates the nucleotide sequence that occurs most often in a matrix of sequences.

Usage

MODE(freq, seqlength)

Value

A vector containing the first modal sequence.

Arguments

freq

Frequenct matrix for nucleotides.

seqlength

Length of nucleotide sequence.

Author

Taryn B. T. Athey and Paul D. McNicholas

Details

The argument freq can be calculated using the function ffrequency.matrix.function.

Examples

Run this code
if (FALSE) data(birds)
species.names <- birds[,2]
specimen.Number <- nrow(birds)
rownames(birds) <- species.names
Nuc.count <- count.function(birds, specimen.Number, 648)
frequency.matrix <- ffrequency.matrix.function(Nuc.count, 648)
birdSpec.freq <- specimen.frequencies(frequency.matrix, birds, specimen.Number, species.names, 648)
nucleotide.modalSequence <- MODE(frequency.matrix, 648)

Run the code above in your browser using DataLab