# Generate sequence from Markov Model

### Description

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.

### Usage

1 2 |

### Arguments

`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 |

### Value

MS object containing a single sequence with nsim bases.

### See Also

`build.mm`

for details on Markov models,
`ms`

for details on MS objects

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
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);
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.