R/extractCoords.R

Defines functions extractCoords

Documented in extractCoords

extractCoords <-
  function(coords.M)
  {
    M <- length(coords.M)
    A <- 3 # Should be three components
    split <- "[:-]"
    l <- strsplit(coords.M, split = split)
    stopifnot(all(sapply(l, length) == A))
    X.AM <- matrix(unlist(l), A, M)
    df.MA <- data.frame(t(X.AM), stringsAsFactors = FALSE)
    colnames(df.MA) <- c('chrom', 'chromStart', 'chromEnd')
    df.MA
  }

Try the DMRcate package in your browser

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

DMRcate documentation built on Jan. 17, 2021, 2 a.m.