#' Deconvolution Methods of TIMER
#' TICPE helps users to Estimate of cellular fractions by 23 cancer types gene-markers
#' from The Cancer Genome Atlas (TCGA).
#' for cell type deconvolution.
#' @param bulkdata A matrix with genes in rows and samples in columns.
#' @param tumortype 23 cancer types from The Cancer Genome Atlas (TCGA).
#' @importFrom immunedeconv deconvolute
#' @return Mixed cell composition estimation ratio data frame
#' @export
#'
#'
#' @examples
#'
#' Bulk <- Bulk_GSE60424
#' res <- Timer(bulkdata=Bulk,
#' tumor = TRUE,
#' tumortype = "brca")
#'
#'
Timer <- function(bulkdata,
tumortype = "brca") {
indi <- rep(tumortype, time = ncol(bulkdata))
res <- immunedeconv::deconvolute(gene_expression = bulkdata,
method = "timer",
indications = indi,
tumor = TRUE,
arrays = FALSE,
column = "gene_symbol",
rmgenes = NULL,
scale_mrna = TRUE,
expected_cell_types = NULL)
res <- t(res)
colnames(res) <- res[1, ]
res_Timer <- as.data.frame(res[-1, ])
return(res_Timer)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.