random_sq | R Documentation |
Generates an sq
object with specified
number of sequences of given length and alphabet.
random_sq(n, len, alphabet, sd = NULL, use_gap = FALSE)
n |
[ |
len |
[ |
alphabet |
[ |
sd |
[ |
use_gap |
[ |
Letter '*' is not used in generating ami sequences. If parameter
sd
is passed, then all generated negative values are replaced with 0s.
An object of class sq
with type as specified.
Functions from input module:
import_sq()
,
read_fasta()
,
sq()
# Setting seed for reproducibility
set.seed(16)
# Generating random sequences
random_sq(10, 10, "ami_bsc")
random_sq(25, 18, "rna_bsc", sd = 6)
random_sq(50, 8, "dna_ext", sd = 3)
random_sq(6, 100, "ami_bsc", use_gap = TRUE)
# Passing whole alphabet instead of type
random_sq(4, 12, c("Pro", "Gly", "Ala", "Met", "Cys"))
# Generating empty sequences (why would anyone though)
random_sq(8, 0, "rna_ext")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.