% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quantiseq.R
\name{deconvolute_quantiseq.default}
\alias{deconvolute_quantiseq.default}
\title{Use quanTIseq to Deconvolute a Gene Expression Matrix}
\usage{
deconvolute_quantiseq.default(
  mix.mat,
  arrays = FALSE,
  signame = "TIL10",
  tumor = FALSE,
  mRNAscale = TRUE,
  method = c("lsei", "hampel", "huber", "bisquare"),
  rmgenes = "unassigned"
)
}
\arguments{
\item{mix.mat}{Data frame or matrix. Gene expression matrix with gene symbols
on the first column and sample IDs on the first row. Expression data must
be on non-log scale (TPM for RNA-seq or expression values for microarrays).}

\item{arrays}{Logical. Whether expression data are from microarrays.
Default is FALSE. If TRUE, the rmgenes parameter is set to "none".}

\item{signame}{Character. Name of the signature matrix. Currently only
"TIL10" is available. Default is "TIL10".}

\item{tumor}{Logical. Whether expression data are from tumor samples.
If TRUE, signature genes with high expression in tumor samples are removed.
Default is FALSE.}

\item{mRNAscale}{Logical. Whether cell fractions must be scaled to account
for cell-type-specific mRNA content. Default is TRUE.}

\item{method}{Character. Deconvolution method: "hampel", "huber", "bisquare"
for robust regression, or "lsei" for constrained least squares.
Default is "lsei".}

\item{rmgenes}{Character. Genes to remove: "unassigned" (default), "default",
"none", or "path".}
}
\value{
Data frame with cell fractions for each sample.
}
\description{
Deconvolutes gene expression data to estimate immune cell fractions using
the quanTIseq method. Source code from https://github.com/FFinotello/quanTIseq.
}
\examples{
\dontrun{
quantiseq_data <- load_data("quantiseq_data")
if (!is.null(quantiseq_data)) {
  common_genes <- rownames(quantiseq_data$TIL10_signature)
  tpm_matrix <- as.data.frame(matrix(
    abs(rnorm(length(common_genes) * 2, mean = 5, sd = 2)),
    nrow = length(common_genes), ncol = 2
  ))
  rownames(tpm_matrix) <- common_genes
  colnames(tpm_matrix) <- paste0("Sample", 1:2)
  results <- deconvolute_quantiseq.default(mix.mat = tpm_matrix)
  if (!is.null(results)) head(results)
}
}
}
\references{
F. Finotello, C. Mayer, C. Plattner, G. Laschober, D. Rieder,
H. Hackl, A. Krogsdam, W. Posch, D. Wilflingseder, S. Sopper, M. Jsselsteijn,
D. Johnsons, Y. Xu, Y. Wang, M. E. Sanders, M. V. Estrada, P.
Ericsson-Gonzalez, J. Balko, N. F. de Miranda, Z. Trajanoski.
"quanTIseq: quantifying immune contexture of human tumors".
bioRxiv 223180. https://doi.org/10.1101/223180.
}
\author{
Finotello F, et al. (adapted for IOBR)
}
