randomSeqs: Random Sequence Generator Based on a Multinomial Model

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/randomSeqs.R

Description

This function computes random sequences based on the alphabet and word length of an input sequence based on a multinomial model.

Usage

1
randomSeqs(seq, sample_size)

Arguments

seq

a character vector storing a sequence as string for which random sequences shall be computed.

sample_size

a numeric value specifying the number of random sequences that shall be returned.

Details

This function enables you to create a test statistic for sequence comparisons that are based on a multinomial model assumption. When spexifying the sample_size argument a vector of strings of corresponding sample_size is being returned.

The random strings returned by randomSeqs have the same word length and are drawn from the same alphabet as the input sequence.

Value

a character vector of length sample_size storing the random string objects.

Author(s)

Hajk-Georg Drost

See Also

evalAlignment, randSeqDistr

Examples

1
2
3
4
5
6
7
# a nucleotide example
seq_example <- "ACCTGGAATTC"
randomSeqs(seq = seq_example, sample_size = 10)

# a protein example
seq_example <- "NPPAAM"
randomSeqs(seq = seq_example, sample_size = 10)

HajkD/seqstats documentation built on April 26, 2020, 8:03 p.m.