R/Consensustme.R

Defines functions Consensustme

Documented in Consensustme

#' ConsensusTME
#'
#' @param bulkdata  A matrix with genes in rows and samples in columns.
#' @param tumortype It isone of “ACC”, “BLCA”, “BRCA”, “CESC”, “CHOL”, “COAD”, “DLBC”, “ESCA”,
#' “GBM”, “HNSC”, “KICH”, “KIRC”, “KIRP”, “LGG”, “LIHC”, “LUAD”, “LUSC”, “MESO”, “OV”, “PAAD”,
#'  “PCPG”, “PRAD”, “READ”, “SARC”, “SKCM”, “STAD”, “TGCT”, “THCA”, “THYM”, “UCEC”, “UCS”, “UVM”,
#'   “Unfiltered”.
#' @param SubMethod It is one of “ssgsea”, “gsva”, “plage”, “zscore”, “singScore”.
#'
#' @importFrom ConsensusTME consensusTMEAnalysis
#'
#' @return  A data frame of Mixed cellular fractions.
#' @export
#' @examples
#'
#' Bulk <- Bulk_GSE60424
#' res <- Consensustme(bulkdata = Bulk,
#'                     tumortype = "OV",
#'                     SubMethod = "ssgsea")
#'
#'


Consensustme <- function(bulkdata, tumortype = "OV", SubMethod = "ssgsea"){


  resulit <- ConsensusTME::consensusTMEAnalysis(as.matrix(bulkdata),
                                                cancerType =  tumortype,
                                                statMethod = SubMethod )

  Consensustme <- t(resulit)

  Consensustme_res <- as.data.frame(Consensustme)

  return(Consensustme_res)

}
libcell/deconvBench documentation built on Sept. 24, 2022, 12:36 p.m.