getTpFp: Calculate the number of true positives and false positives

Description Usage Arguments Value Author(s) Examples

Description

Calculate the number of true positives and false positives among candidate breakpoints

Usage

1
getTpFp(candidates, trueBkp, tol, relax = -1)

Arguments

candidates

Breakpoints found by the methods

trueBkp

True breakpoints

tol

Tolerance on the position of candidate breakpoints called true

relax

Controls the way multiple breapoints within tolerance area are recorded.

1

count one true positive if there is at least one breakpoint within tolerance area

0

count one true positive only if there is exactly one breakpoint within tolerance area

-1

count only one true positive if there is exactly one breakpoint within tolerance area; other breakpoints are counted as false positives

Value

A list with elements:

TP

The number of true positives

FP

The number of false positives

Author(s)

Morgane Pierre-Jean and Pierre Neuvial

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## load known real copy number regions
affyDat <- loadCnRegionData(dataSet="GSE29172", tumorFraction=0.7)

## generate a synthetic CN profile
K <- 10
len <- 2e4
sim <- getCopyNumberDataByResampling(len, K, minLength=100, regData=affyDat)
datS <- sim$profile

## (group-)fused Lasso segmentation
res <- PSSeg(data=datS, K=2*K, method="GFLars", stat="c", profile=TRUE)

## results of the initial (group-)fused lasso segmentation
getTpFp(res$initBkp, sim$bkp, tol=10, relax=-1)
getTpFp(res$initBkp, sim$bkp, tol=10, relax=0)
getTpFp(res$initBkp, sim$bkp, tol=10, relax=1)
plotSeg(datS, breakpoints=list(sim$bkp, res$initBkp))

## results after pruning (group-)fused Lasso candidates by dynamic programming)
getTpFp(res$bestBkp, sim$bkp, tol=10, relax=-1)
getTpFp(res$bestBkp, sim$bkp, tol=10, relax=0)
getTpFp(res$bestBkp, sim$bkp, tol=10, relax=1)
plotSeg(datS, breakpoints=list(sim$bkp, res$bestBkp))

jointseg documentation built on May 2, 2019, 5:20 p.m.