Description Usage Arguments Value See Also Examples
Simulate a single sequence based from a Markov Model. These are referred to as simulated sequences and used compute the background rates and False Discovery Rates.
1 2 |
object |
Markov Model |
nsim |
Length of the sequence to simulate. Can be a vector, in which case multiple sequences of the specified length will be simulated. |
seed |
A random number seed. Either |
pointer.only |
If |
... |
Not used; for S3 compatibility |
MS object containing a single sequence with nsim bases.
build.mm
for details on Markov models,
ms
for details on MS objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | require("rtfbs")
exampleArchive <- system.file("extdata", "NRSF.zip", package="rtfbs")
seqFile <- "input.fas"
unzip(exampleArchive, seqFile)
# Read in FASTA file "input.fas" from the examples into an
# MS (multiple sequences) object
ms <- read.ms(seqFile);
# Build a 3rd order Markov Model to represent the sequences
# in the MS object "ms". The Model will be a list of
# matrices corrisponding in size to the order of the
# Markov Model
mm <- build.mm(ms, 3);
# Generate a sequence 1000 bases long using the supplied
# Markov Model and random numbers
v <- simulate.ms(mm, 1000);
unlink("input.fas")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.