Description Usage Arguments Value Author(s) Examples
View source: R/nucleoSimFunctions.R
Generate a synthetic nucleosome map, a map with complete sequences covering the nucleosome regions, using the distribution selected by the user. The distribution is used to assign the start position to the sequences associated with the nucleosomes. The user has choice between three different distributions: Normal, Student and Uniform.
The synthetic nucleosome map creation is separated into 3 steps :
1. Adding wellpositioned nucleosomes following specified parameters. The nucleosomes are all positioned at equidistance. Assigning sequences of variable length to each nucleosome using a normal distribution and specified variance.
2. Deleting some wellpositioned nucleosomes following specified parameters. Each nucleosome has an equal probability to be selected.
3. Adding fuzzy nucleosomes following an uniform distribution ad specified parameters. Assigning sequences of variable length to each nucleosome using the specified distribution and parameters. The sequence length is always following a normal distribution.
This function is a modified version of the syntheticNucMap() function from Bioconductor nucleR package (Flores and Orozco, 2011).
1 2 3 4  syntheticNucMapFromDist(wp.num, wp.del, wp.var, fuz.num, fuz.var,
max.cover = 100, nuc.len = 147, len.var = 10, lin.len = 20,
rnd.seed = NULL, as.ratio = FALSE, distr = c("Uniform", "Normal",
"Student"))

wp.num 
a nonnegative 
wp.del 
a nonnegative 
wp.var 
a nonnegative 
fuz.num 
a nonnegative 
fuz.var 
a nonnegative 
max.cover 
a positive 
nuc.len 
a nonnegative 
len.var 
a nonnegative 
lin.len 
a nonnegative 
rnd.seed 
a single value, interpreted as an 
as.ratio 
a 
distr 
the name of the distribution used to generate the nucleosome
map. The choices are : 
an list
of class
"syntheticNucMap" containing the
following elements:
call
the matched call.
wp.starts
a vector
of integer
, the start
positions of all wellpositioned nucleosome regions. The central
position of the nucleosome is calculated as wp.starts + round(nuc.len/2).
wp.nreads
a vector
of integer
, the number of
sequences associated to each wellpositioned nucleosome.
wp.reads
a IRanges
containing the wellpositioned
nucleosome sequences.
fuz.starts
a vector
of integer
, the
start position of all the fuzzy nucleosomes.
fuz.nreads
a vector
of integer
, the number
of sequences associated to each fuzzy nucleosome.
fuz.reads
a IRanges
containing the fuzzy nucleosome
sequences.
syn.reads
a IRanges
containing all the synthetic
nucleosome sequences (from both fuzzy and wellpositioned nucleosomes).
nuc.len
a numeric
the nucleosome length.
The following elements will be only returned if as.ratio=TRUE
:
ctr.reads
a IRanges
containing the naked DNA
(control) sequences.
syn.ratio
a Rle
containing the calculated ratio
between the nucleosome coverage and the control coverage.
Rawane Samb, Astrid Deschenes
1 2 3 4 5 6 7 8 9 10 11 12  ## Generate a synthetic map with 20 wellpositioned nucleosomes and 10 fuzzy
## nucleosomes using a Normal distribution with a variance of 30 for the
## wellpositioned nucleosomes, a variance of 40 for the fuzzy nucleosomes
## and a seed of 15.
syntheticNucMapFromDist(wp.num = 20, wp.del = 0, wp.var = 30,
fuz.num = 10, fuz.var = 40, rnd.seed = 15,
distr = "Normal")
## Same output but with ratio
syntheticNucMapFromDist(wp.num = 20, wp.del = 0, wp.var = 30,
fuz.num = 10, fuz.var = 40,
rnd.seed = 15, as.ratio = TRUE, distr = "Normal")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.