sequences2transmatrix: Transition matrix from sequence(s)

View source: R/rMethods.R

sequences2transmatrixR Documentation

Transition matrix from sequence(s)

Description

Calculates the transition matrix by counting occurences of tuples in given vector list

Usage

sequences2transmatrix(sequences)

Arguments

sequences

Sequences to be analyzed, as list of numeric vectors

Details

The transition matrix will be structured so that the lowest score corresponds to the first column and row and the highest score corresponds to the last column and row. Note that the resulting matrix is not stochastic because it can occur rows filled up with only 0 for not observed score in Min Value Max Value interval.

Value

A list object containing

Transition Matrix

Transition Matrix

Min Value

minimal score found in supplied sequences

Max Value

maximal score found in supplied sequences

Examples

seq = sample(-1:1, size = 20, replace = TRUE)
seq2 = sample(-6:1, size = 20, replace = TRUE)
seq3 = sample(3:6, size = 50, replace = TRUE)
sequences2transmatrix(list(seq, seq2, seq3))

localScore documentation built on May 17, 2022, 5:09 p.m.