R/listTCGAcohorts.R

Defines functions listTCGAcohorts

Documented in listTCGAcohorts

#' This function prints available cohorts within The Cancer Genome Atlas
#' project.
#'
#' @param ... empty
#' @importFrom TCGAbiolinks getGDCprojects
#' @return character vector with TCGA cohorts in the following format: TCGA-XXXX
#' @examples
#' \dontrun{listTCGAcohorts()}
#' @export

listTCGAcohorts <- function(...) {

  projects <- TCGAbiolinks::getGDCprojects()$project_id
  projects <- projects[grepl('^TCGA', projects, perl = TRUE)]

  return(projects)

}
kkolmus/MolecularAnalyzeR documentation built on Dec. 21, 2021, 6:46 a.m.