random_seq: Generate random bstr sequences of desired lengths.

Description Usage Arguments Examples

Description

Generate random bstr sequences of desired lengths.

Usage

1
2
3
4
5
bstr_rand_seq(n, length, pattern = "[A-Za-z]", seed)

dstr_rand_seq(n, length, pattern = "[ATGC]", seed)

pstr_rand_seq(n, length, pattern = "[ARNDCQEGHILKMFPSTWYVX]", seed)

Arguments

n

single integer, nubmer of sequences

length

integer vector, desired sequence lengths

pattern

character vector specifying character classes

seed

a single integer. specify seeds.

Examples

1
2
3
4
5
6
7
8
bstr_rand_seq(3, 20, seed = 1)
bstr_rand_seq(3, 5:7, c("[a-c]", "[A-C]", "[1-3]"), seed = 1)

dstr_rand_seq(3, 20, seed = 1)
dstr_rand_seq(3, 5:7, c("[atcg]", "[ATCG]", "[N.]"), seed = 1)

pstr_rand_seq(3, 20, seed = 1)
pstr_rand_seq(3, 5:7, c("[arnd]", "[ARND]", "[X.]"), seed = 1)

t-arae/bstringr documentation built on March 18, 2021, 3:08 a.m.