Learn R Programming

recoup (version 1.0.2)

profileMatrix: Calculate final profile matrices for plotting

Description

This function fills the profile field in the main input argument in recoup function by calculating profile matrices from coverages which will be used for plotting.

Usage

profileMatrix(input, flank, binParams, rc = NULL)

Arguments

input
an input list as in recoup but with the ranges the coverage fields of each member filled (e.g. after using preprocessRanges and coverageRef).
flank
see the flank argument in the main recoup function.
binParams
see the binParams argument in the main recoup function.
rc
fraction (0-1) of cores to use in a multicore system. It defaults to NULL (no parallelization).

Value

  • Same as input with the profile fields filled.

Examples

Run this code
# Load some data
data("recoup_test_data",package="recoup")
# Do some work
testGenomeRanges <- makeGRangesFromDataFrame(df=test.genome,
    keep.extra.columns=TRUE)
test.input <- coverageRef(
    test.input, 
    genomeRanges=testGenomeRanges, 
    region="tss",
    flank=c(2000,2000)
)
test.input <- profileMatrix(
    test.input,
    flank=c(2000,2000),
    binParams=list(flankBinSize=50,regionBinSize=150,
        sumStat="mean",smooth=TRUE),
    rc=0.5
)

Run the code above in your browser using DataLab