adaptBackground: Adapt background for a simulated 4C-seq sample

Description Usage Arguments Value Author(s) Examples

Description

This helper function adapts the already simulated background for a simulated 4C-seq sample. The read count for blind fragments is reduced by a given factor (default: 0.2), coverage around the viewpoint is reduced to a certain rate (optional), and the general background read count per fragment is reduced with higher distance from the experiment's viewpoint (optional).

Usage

1
2
adaptBackground(simTable, vpStart, vpRegionDist = 1000000, vpCovRate = 0.95,
 blindFactor = 0.2, useNormDist = FALSE, minVal = 1000)

Arguments

simTable

virtual simulation fragment library, with background

vpStart

position of the experiment's viewpoint

vpRegionDist

length of adapted region

vpCovRate

coverage rate of background around viewpoint (default: 0.95)

blindFactor

factor for blind fragment read count (default: 0.2)

useNormDist

if TRUE, fragments with higher distance from viewpoint will receive fewer reads (to blend transition from near-cis to cis)

minVal

minimum read count of fragments to be considered for near-cis adaption

Value

Data frame with adapted simulated background reads

Author(s)

Carolin Walter

Examples

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

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