% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R, R/methods_SE.R
\docType{methods}
\name{deconvolve_cellularity}
\alias{deconvolve_cellularity}
\alias{deconvolve_cellularity,spec_tbl_df-method}
\alias{deconvolve_cellularity,tbl_df-method}
\alias{deconvolve_cellularity,tidybulk-method}
\alias{deconvolve_cellularity,SummarizedExperiment-method}
\alias{deconvolve_cellularity,RangedSummarizedExperiment-method}
\title{Get cell type proportions from samples}
\usage{
deconvolve_cellularity(
  .data,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL,
  reference = NULL,
  method = "cibersort",
  prefix = "",
  action = "add",
  ...
)

\S4method{deconvolve_cellularity}{spec_tbl_df}(
  .data,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL,
  reference = NULL,
  method = "cibersort",
  prefix = "",
  action = "add",
  ...
)

\S4method{deconvolve_cellularity}{tbl_df}(
  .data,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL,
  reference = NULL,
  method = "cibersort",
  prefix = "",
  action = "add",
  ...
)

\S4method{deconvolve_cellularity}{tidybulk}(
  .data,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL,
  reference = NULL,
  method = "cibersort",
  prefix = "",
  action = "add",
  ...
)

\S4method{deconvolve_cellularity}{SummarizedExperiment}(
  .data,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL,
  reference = NULL,
  method = "cibersort",
  prefix = "",
  action = "add",
  ...
)

\S4method{deconvolve_cellularity}{RangedSummarizedExperiment}(
  .data,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL,
  reference = NULL,
  method = "cibersort",
  prefix = "",
  action = "add",
  ...
)
}
\arguments{
\item{.data}{A `tbl` (with at least three columns for sample, feature and transcript abundance) or `SummarizedExperiment` (more convenient if abstracted to tibble with library(tidySummarizedExperiment))}

\item{.sample}{The name of the sample column}

\item{.transcript}{The name of the transcript/gene column}

\item{.abundance}{The name of the transcript/gene abundance column}

\item{reference}{A data frame. The methods cibersort and llsr can accept a custom rectangular dataframe with genes as rows names, cell types as column names and gene-transcript abundance as values. For exampler tidybulk::X_cibersort. The transcript/cell_type data frame of integer transcript abundance. If NULL, the default reference for each algorithm will be used. For llsr will be LM22.}

\item{method}{A character string. The method to be used. At the moment Cibersort (default), epic and llsr (linear least squares regression) are available.}

\item{prefix}{A character string. The prefix you would like to add to the result columns. It is useful if you want to reshape data.}

\item{action}{A character string. Whether to join the new information to the input tbl (add), or just get the non-redundant tbl with the new information (get).}

\item{...}{Further parameters passed to the function Cibersort}
}
\value{
A consistent object (to the input) including additional columns for each cell type estimated

A consistent object (to the input) including additional columns for each cell type estimated

A consistent object (to the input) including additional columns for each cell type estimated

A consistent object (to the input) including additional columns for each cell type estimated

A `SummarizedExperiment` object

A `SummarizedExperiment` object
}
\description{
deconvolve_cellularity() takes as input A `tbl` (with at least three columns for sample, feature and transcript abundance) or `SummarizedExperiment` (more convenient if abstracted to tibble with library(tidySummarizedExperiment)) and returns a consistent object (to the input) with the estimated cell type abundance for each sample
}
\details{
`r lifecycle::badge("maturing")`

This function infers the cell type composition of our samples
(with the algorithm Cibersort; Newman et al., 10.1038/nmeth.3337).

Underlying method:
CIBERSORT(Y = data, X = reference, ...)
}
\examples{

library(dplyr)

# Subsetting for time efficiency
tidybulk::se_mini |> deconvolve_cellularity(cores = 1)


}
