Description Usage Arguments Value Examples
View source: R/breakpoint.density.r
Compare two different sets of breakpoints
1 | match.breaks(brk1, brk2, maxgap = 1e+05, verbose = FALSE, plot = TRUE)
|
brk1 |
(S4) an object of class breaks as returned by 'svc.breaks' or 'cnv.breaks' |
brk2 |
(S4) an object of class breaks as returned by 'svc.breaks' or 'cnv.breaks' to compare against brk1 |
maxgap |
(numeric) distance (base pairs) limit for breakpoints to be considered colocalized |
verbose |
(logical) |
an object containing co-localizing breakpoints from two input 'breaks'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Obtain breakpoints from segmentation data
cnv <- validate.cnv(segdat_lung_ccle)
brk1 <- cnv.breaks(cnv)
## Obtain breakpoints from SV calls data
sv <- validate.svc(svdat_lung_ccle)
brk2 <- svc.breaks(svc)
common.brk <- match.breaks(brk1, brk2)
## average percentage of colocalizing breaks
restab <- data.frame(common.breaks$restab)[order(common.breaks$restab$total.brk2),]
m2 <- sprintf("%.1f",100*mean(restab$matched.brk2/restab$total.brk2))
## Plot the proportion of SV breakpoints that have colocalizing CNV breakpoints
barplot(rbind(restab$matched.brk2, restab$total.brk2 - restab$matched.brk2),
border=NA,las=2,xlab="",horiz=FALSE,cex.main=.7,cex.names=.4, names=rownames(restab))
legend("top",paste("SV breaks matched by CNV breaks\n","Average = ",m2,"%",sep=""),bty='n')
grid(ny=NULL,nx=NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.