Simple creation of a CopyNumberRegions object

Description

Simple creation of a CopyNumberRegions object containing a single region.

Usage

1
cnr(start, stop=NULL, mean=1, chromosome=1, xScale=1e+06, ...)

Arguments

start, stop

Two numerics specifying the start and stop location of the region. If stop is NULL, then start[2] is used instead.

mean

A numeric specifying the mean level of the region.

chromosome

An integer specifying the chromosome ID.

xScale

The default scaling parameter used for start and stop, which is then also used for plotting genomic locations.

...

Additional arguments passed to CopyNumberRegions.

Value

Return an CopyNumberRegions object.

Author(s)

Henrik Bengtsson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Build up a tumor CN profile
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pT <- cnr(1,1000, 2) +
     cnr(400,500) +
     cnr(600,800) +
     cnr(600,700) +
     cnr(100,200) - cnr(850,900);
print(pT);


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Simulate CN signals from this profile
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cn <- simulateRawCopyNumbers(pT, n=2000, sd=1/2);
print(cn);


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Plot
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
plot(cn, col="#aaaaaa", ylim=c(0,5));
drawLevels(pT, col="#ff0000", lwd=3);

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.