R/findBreakPoints.R

findBreakPoints <- function (seg, array) 
{
  states <- seg$state[,array]
  chr <- seg$genes$Chr
    bpoints <- c(1)
    for (i in 2:length(states)) {
        if (states[i] != states[i - 1] || chr[i] != chr[i -1])
            bpoints <- c(bpoints, i - 1, i)
    }
    bpoints <- c(bpoints, length(states))
    bpoints
}

Try the snapCGH package in your browser

Any scripts or data that you put into this service are public.

snapCGH documentation built on Nov. 8, 2020, 5:31 p.m.