Function to perform deconvolution based on single cell expression data
giotto object
spatial unit
feature type
method to use for deconvolution
expression values to use
base used for log normalization
name of cluster column
signature matrix for deconvolution
number of cells per spot
cut off (default = 2)
name to give to spatial deconvolution results
return giotto object
giotto object or deconvolution results
g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 4. read Giotto image information
#> python already initialized in this session
#> active environment : '/usr/bin/python3'
#> python version : 3.12
x <- findMarkers_one_vs_all(g,
cluster_column = "leiden_clus", min_feats = 20
)
#> using 'Scran' to detect marker feats. If used in published
#> research, please cite: Lun ATL, McCarthy DJ, Marioni JC (2016).
#> 'A step-by-step workflow for low-level analysis of single-cell RNA-seq
#> data with Bioconductor.'
#> F1000Res., 5, 2122. doi: 10.12688/f1000research.9501.2.
#> start with cluster 1
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
#> start with cluster 2
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
#> start with cluster 3
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
#> start with cluster 4
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
#> start with cluster 5
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
#> start with cluster 6
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
#> start with cluster 7
#> Warning: 'findMarkers' is deprecated.
#> Use 'scrapper::scoreMarkers.se' instead.
#> See help("Deprecated")
#> Warning: 'pairwiseTTests' is deprecated.
#> See help("Deprecated")
#> Warning: 'combineMarkers' is deprecated.
#> Use 'scrapper::summarizeEffects' instead.
#> See help("Deprecated")
sign_gene <- x$feats
sign_matrix <- matrix(rnorm(length(sign_gene) * 8, mean = 10),
nrow = length(sign_gene)
)
rownames(sign_matrix) <- sign_gene
colnames(sign_matrix) <- paste0("celltype_", unique(x$cluster))
#> Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent
runSpatialDeconv(gobject = g, sign_matrix = sign_matrix)
#> Error: package 'quadprog' is not yet installed
#>
#> To install:
#> install.packages(c("quadprog"))