random_seq.Rd
Generate random bstr sequences of desired lengths.
bstr_rand_seq(n, length, pattern = "[A-Za-z]", seed) dstr_rand_seq(n, length, pattern = "[ATGC]", seed) astr_rand_seq(n, length, pattern = "[ARNDCQEGHILKMFPSTWYVX]", seed)
n | single integer, nubmer of sequences |
---|---|
length | integer vector, desired sequence lengths |
pattern | character vector specifying character classes |
seed | a single integer. specify seeds. |
bstr_rand_seq(3, 20, seed = 1)#> class: bstr,character #> number of sequences: 3 #> [1] no name 1 : NTdvKuxigDKJjToZlzTo 20 #> [2] no name 2 : wLhGNUATtRZfZJripFlV 20 #> [3] no name 3 : qhocbpBYmkYsWMDFQaiV 20#> class: bstr,character #> number of sequences: 3 #> [1] no name 1 : abbca 5 #> [2] no name 2 : CCBBAA 6 #> [3] no name 3 : 1323233 7dstr_rand_seq(3, 20, seed = 1)#> class: dstr,bstr,character #> number of sequences: 3 #> [1] no name 1 : CCGTATTGGAAAGCTCGTCT 20 #> [2] no name 2 : TAGACCACTCCGCATGTAGC 20 #> [3] no name 3 : TGTGGTACGGCTCAAACGGC 20#> class: dstr,bstr,character #> number of sequences: 3 #> [1] no name 1 : ccgta 5 #> [2] no name 2 : TTGGAA 6 #> [3] no name 3 : .N.N.NN 7astr_rand_seq(3, 20, seed = 1)#> class: astr,bstr,character #> number of sequences: 3 #> [1] no name 1 : GIPXFWXQQCFERKTMSYIT 20 #> [2] no name 2 : XFQDGKAKWIMPMEVRTDSK 20 #> [3] no name 3 : VQTNNTAMSRMWLGCDHMQK 20#> class: astr,bstr,character #> number of sequences: 3 #> [1] no name 1 : ddnra 5 #> [2] no name 2 : RRNNAA 6 #> [3] no name 3 : .X.X.XX 7