Learn R Programming

nucleoSim (version 1.0.2)

syntheticNucReadsFromMap: Generate a synthetic nucleosome map containing forward and reverse reads

Description

Generate a synthetic nucleosome map using a synthetic nucleosome map. This function is using a modified version of the syntheticNucMap() function from Bioconductor nucleR package (Flores and Orozco, 2011).

Usage

syntheticNucReadsFromMap(syntheticNucMap, read.len = 40, offset)

Arguments

syntheticNucMap
a list of class "syntheticNucMap"
read.len
a positive integer, the length of each of the paired-end reads. Default = 40.
offset
a non-negatvie integer,the number of bases used to offset all nucleosomes and reads. This is done to ensure that all nucleosome positions and read alignments are of positive values.

Value

  • a list of class "syntheticNucReads" containing the following elements:
    • callthe matched call.
    • dataIPadata.framewith the chromosome name, the starting and ending positions and the direction of all forward and reverse reads for all well-positioned and fuzzy nucleosomes. Paired-end reads are identified with an unique id.
    • wpadata.framewith the positions of all the well-positioned nucleosomes, as well as the number of paired-reads associated to each one.
    • fuzadata.framewith the positions of all the fuzzy nucleosomes, as well as the number of paired-reads associated to each one.
    • pairedadata.framewith the starting and ending positions of the reads used to generate the paired-end reads. Paired-end reads are identified with an unique id.

Examples

Run this code
## Generate a synthetic map with 20 well-positioned + 10 fuzzy nucleosomes
## using a Normal distribution with a variance of 30 for the well-positioned
## nucleosomes, a variance of 40 for the fuzzy nucleosomes and a seed of 15
## Because of the fixed seed, each time is going to be run, the results
## are going to be the seed
syntheticMap <- syntheticNucMapFromDist(wp.num = 20, wp.del = 0,
wp.var = 30, fuz.num = 10, fuz.var = 40,
rnd.seed = 335, as.ratio = FALSE, distr = "Uniform")

res <- nucleoSim:::syntheticNucReadsFromMap(syntheticMap, read.len = 45,
offset = 1000)

Run the code above in your browser using DataLab