parseRegion: Parses a ROC change-point region string

Description Usage Arguments Value Author(s) See Also Examples

View source: R/parseRegion.R

Description

Parses a ROC change-point region string in the format '<sample>:Chr<chr>@<start>-<stop>,cp=<pos>+/-<width>,s=<state0>/<state1>', where <sample> is a sample name, <chr> is an index, <start>, <stop> and <pos> (<width>) are genomic locations (lengths) (in units of Mb), and <state0> and <state1> are integers specifying the genomic state of the two segments flanking the change point at <pos>.

Usage

1
parseRegion(region, xScale=1e+06, ...)

Arguments

region

A character string.

xScale

A positive numeric specifying the unit length.

...

Not used.

Value

Returns a named list.

Author(s)

Henrik Bengtsson

See Also

makeTruth().

Examples

1
2
3
4
5
6
7
8
9
reg <- parseRegion("TCGA-23-1027:Chr2@108-140,cp=124+/-0.5,s=0/1")
str(reg)

stateFcn <- makeTruth(reg)
print(reg)

data <- data.frame(chromosome=2, x=seq(from=122e6, to=126e6, by=0.2e6))
data$state <- stateFcn(data)
print(data)

HenrikBengtsson/aroma.cn.eval documentation built on Dec. 9, 2019, 12:16 p.m.