Description Usage Arguments Details Value Author(s) References See Also Examples
These utility functions generate data for simulation studies including fake ORFs and expression values.
1 2 3 4 |
n |
number of ORFs or sequences. |
b.Init |
parameters of mutation and selection of format
|
phi.Obs |
an object of format |
AA.prob |
proportion of amino acids. |
orf.length |
lengths of ORFs. |
orf.names |
names of ORFs. |
model |
model to be simulated. |
Phi |
expression values (potentially true expression). |
sigmaW.lim |
std of measurement errors (between Phi and phi.Obs). |
bias.Phi |
bias (in log scale) for observed phi. |
param |
as in |
simu.orf() generates ORFs or sequences based on the b.Init
and phi.Obs.
If phi.Obs is omitted, then standard log normal random variables
are instead).
If AA.prob is omitted, then uniform proportion is assigned.
If orf.length is omitted, then 10 to 20 codons are randomly
assigned.
If orf.names is omitted, then "ORF1" to "ORFn" are assigned.
simu.phi.Obs() generates phi.Obs by adding normal random
errors to Phi, and errors have mean 0 and standard deviation
sigmaW.lim.
simu.mixnormerr() generates Phi according to the param,
and adds normal random errors to Phi.
simu.orf() returns a list of format seq.data.
simu.phi.Obs() returns a vector of format phi.Obs.
simu.mixnormerr() returns a list contains three vectors of length
n: one for expected gene expression Phi, one for observed
gene expression phi.Obs, and one for the component id id.K.
Wei-Chen Chen wccsnow@gmail.com.
https://github.com/snoweye/cubfits/
read.seq(), read.phi.df(),
write.seq(), write.phi.df(), and
mixnormerr.optim().
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
suppressMessages(library(cubfits, quietly = TRUE))
set.seed(1234)
# Generate sequences.
da.roc <- simu.orf(length(ex.train$phi.Obs), b.Init$roc,
phi.Obs = ex.train$phi.Obs, model = "roc")
names(da.roc) <- names(ex.train$phi.Obs)
write.fasta(da.roc, names(da.roc), "toy_roc.fasta")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.