R/getGCinwindows.R

Defines functions getGCinwindows

Documented in getGCinwindows

getGCinwindows <-
function(sequence, windowlength){
  gcvector <- numeric()
  q <- 1
  condition <- T
  chromosome <- sequence[[1]]
  
  while(condition){
    gcvector <- c(gcvector, GC(chromosome[q:(q+(windowlength-1))]))
    q <- q + windowlength
    if((length(chromosome)-q) <= windowlength){
      condition <- F
    }
  }
    
  gcvector <- c(gcvector, GC(chromosome[q:length(chromosome)]))
  return(gcvector)
}

Try the CNOGpro package in your browser

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

CNOGpro documentation built on May 2, 2019, 5:57 a.m.