segmentData: Binarize Data

Description Usage Arguments Value Examples

Description

Binarizes Data (-1, 0, +1) according to given cutoff list

Usage

1
segmentData(data, cutoffs, effectsize = c(0, 0))

Arguments

data

inputdata

cutoffs

cutoffs, calculated e.g. with findCutoffs()

effectsize

minimal required effectsize as vector (loss, gain)

Value

binarized values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
candMatrix <- data.frame(
smp1=c(-0.097, -1.208,-0.134, 1.732),
smp2=c(-0.006, 0.004, 0.004, -0.001),
smp3=c(0.050, 0.008, 0.008,0.046 ))
rownames(candMatrix) <- c(
"chr1:15865", "chr1:110230252",
"chr1:110254692", "chr3:45838226"
)
cutoffs <- data.frame(
rn=c(
"chr1:15865", "chr1:110230252",
"chr1:110254692", "chr3:45838226"
),
i=c(1,2,3,1),
cutoffLoss=c(-0.85,NA,NA,-0.05),
cutoffGain=c(NA,NA,NA,NA),
cutoffLossWP=c(-0.80, -0.83, -0.83, NA), 
cutoffGainWP=c(NA,NA,NA,NA),
baseline=c(0.01,0.01,0.01,0.01)
)
segmentData(candMatrix, cutoffs)

mknoll/cnAnalysis450k documentation built on May 23, 2019, 2:01 a.m.