addPeaks: Add predefined peaks to a simulated 4C-seq sample

Description Usage Arguments Value Author(s) Examples

Description

This helper function adds predefined regions of higher signal (peaks) in near-cis to a 4C-seq sample. Random noise as well as modifiers for blind fragments can be added.

Usage

1
2
3
addPeaks(simTable, randomPeaks, vpStart, maxVPArea = 7500, sdVP = 2000, 
vpRegionDist = 100000, minRandomVPPeak = -500, maxRandomVPPeak = 500, 
chanceRandom = 0.8, differenceRandom = 0.2)

Arguments

simTable

virtual simulation fragment library

randomPeaks

list of peaks to be simulated: ID (e.g. number), mean (genomic coordinate), max (maximum signal for the peak in question), sd (standard deviation, "width")

vpStart

viewpoint position

maxVPArea

height of viewpoint peak (with possible exception of actual viewpoint fragment)

sdVP

width of viewpoint peak

vpRegionDist

length of near-cis region where randomly generated peaks are simulated

minRandomVPPeak

minimum for randomly chosen summand to fragment read count (can be negative)

maxRandomVPPeak

maximum for randomly chosen summand to fragment read count (can be negative)

chanceRandom

chance for occurrence of random summands

differenceRandom

parameter to manipulate peak heights per peak: (1-dR) <= max <= (1+dR)

Value

Data frame with added intervals of higher signal (peaks) in near-cis

Author(s)

Carolin Walter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    if(interactive()) {
        simTableFile <- system.file("extdata", "simTable_bg.csv", 
            package="Basic4CSim")
        simTable = read.csv(simTableFile, sep = "\t", header = TRUE)
        vpStart = 69999869
        set.seed(42)
        randomPeaks = makeRandomPeaks(peakNumber=6, vpStart)
        simTable = addPeaks(simTable, randomPeaks, vpStart)
        head(simTable)
    }

walter-ca/Basic4CSim documentation built on May 28, 2019, 12:34 a.m.