simpleGetSet: Get and set some reusable objects from a recoup object

Description Usage Arguments Value Author(s) Examples

Description

The getr and setr functions are used to get several reusable/changeable objects of recoup or replcace them (e.g. when the user wishes to change some ggplot or ComplexHeatmap parameters manually in a plot, or change the heatmap profile ordering mode).

Usage

1
2
3
    getr(obj, key = c("design", "profile", "heatmap", 
        "correlation", "orderBy", "kmParams", "plotParams"))
    setr(obj, key, value = NULL)

Arguments

obj

a list object created from recoup.

key

one of "design", "profile", "heatmap", "correlation", orderBy, kmParams, plotParams. For "profile", "heatmap", the respective plots are retrieved or changed according to which function is called. For setr it can (and preferably) be a named list of arguments to be changed in the recoup list object. The list names are the same as above. For the rest, see the main recoup man page.

value

a valid ggplot or HeatmapList object created from recoupProfile or recoupHeatmap recoupCorrelation when changing plots. Values for all other types are also checked for validity.

Value

For getr, the object asked to be retrieved. For setr, the obj with the respective slots filled or replaced with value.

Author(s)

Panagiotis Moulos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Load some data
data("recoup_test_data",package="recoup")

# Calculate coverages
test.tss <- recoup(
    test.input,
    design=NULL,
    region="tss",
    type="chipseq",
    genome=test.genome,
    flank=c(2000,2000),
    selector=NULL,
    plotParams=list(plot=FALSE,profile=TRUE,
        heatmap=TRUE,device="x11"),
    rc=0.1
)

# Plot coverage profiles

# Get the curve profile plot
pp <- getr(test.tss,"profile")

# Change some ggplot parameter
pp <- pp + 
    theme(axis.title.x=element_text(size=14))
    
# Store the new plot
test.tss <- setr(test.tss,"profile",pp)
## or even better
# test.tss <- setr(test.tss,list(profile=pp))

recoup documentation built on Nov. 8, 2020, 6:47 p.m.