setSoupProfile: Set soup profile

View source: R/setProperties.R

setSoupProfileR Documentation

Set soup profile

Description

Manually sets or updates the soup profile for a SoupChannel object.

Usage

setSoupProfile(sc, soupProfile)

Arguments

sc

A SoupChannel object.

soupProfile

A data.frame with columns est containing the fraction of soup for each gene, counts containing the total counts for each gene and with row names corresponding to the row names of sc$toc.

Value

An updated SoupChannel object with the soup profile set.

Examples

#Suppose only table of counts is available
toc = Seurat::Read10X(system.file('extdata','toyData','filtered_gene_bc_matrices','GRCh38',
                                  package='SoupX'))
#Suppress calculating soup profile automatically
sc = SoupChannel(toc,toc,calcSoupProfile=FALSE)
#And add manually
rowSums = Matrix::rowSums
soupProf = data.frame(row.names = rownames(toc),est=rowSums(toc)/sum(toc),counts=rowSums(toc))
sc = setSoupProfile(sc,soupProf)

constantAmateur/SoupX documentation built on Nov. 2, 2022, 10:16 a.m.