R/analysis.R

Defines functions rnbi.total.analysis

Documented in rnbi.total.analysis

#' rnbi.total.analysis
#' return the list of RnBeads analysis found in the given path
#'
#' Takes in a results directory and returns a list of analysis found in that directories
#' @param wd A path to the rnbeads analysis folder
#' @return list of analysis found
#' @export


rnbi.total.analysis <- function(wd) {

  choices <- list.files(path = wd)


  total.analysis.list <- list()
  counter <- 1

  for (i in 1:length(choices)) {

    # if index.html file exist in the directory than it is considered as an RnBeads analysis
    if ( file.exists( isolate({ paste(wd,choices[i],'index.html',sep="/") }) ) )
    {
      total.analysis.list[counter] <- choices[i]
      counter <- counter + 1

    }
  }
  return(total.analysis.list)

}
m-raheel/ShinyBeads documentation built on May 23, 2019, 9:34 a.m.