Find the signature genes for each group of cell/spots based on coembedding distance and expression ratio.

find.signature.genes(
  seu,
  distce.assay = "distce",
  ident = NULL,
  expr.prop.cutoff = 0.1,
  assay = NULL,
  genes.use = NULL
)

Arguments

seu

a Seurat object with coembedding in the reductions slot wiht component name reduction.

distce.assay

an optional character, specify the assay name that constains distance matrix beween cells/spots and features, default as `distce` (distance of coembeddings).

ident

an optional character in columns of metadata, specify the group of cells/spots. Default as NULL, use Idents as the group.

expr.prop.cutoff

an optional postive real ranging from 0 to 1, specify cutoff of expression proportion of features, default as 0.1.

assay

an optional character, specify the assay in seu, default as NULL, representing the default assay in seu.

genes.use

an optional string vector, specify genes as the signature candidates.

Value

return a list with each component a data.frame object having two columns: `distance` and `expr.prop`.

Details

In each data.frame object of the returned value, the row.names are gene names, and these genes are sorted by decreasing order of `distance`. User can define the signature genes as top n genes in distance and that the `expr.prop` larger than a cutoff. We set the cutoff as 0.1.

References

None

See also

None

Examples

library(Seurat)
#> Warning: package ‘Seurat’ was built under R version 4.1.3
#> Attaching SeuratObject
#> Attaching sp
data(pbmc3k_subset)
pbmc3k_subset <- pdistance(pbmc3k_subset, reduction='ncfm')
#> Calculate co-embedding distance...
df_list_rna <- find.signature.genes(pbmc3k_subset)
#> 
  |                                                  | 0 % ~calculating  
  |++++++                                            | 11% ~01s          
  |++++++++++++                                      | 22% ~00s          
  |+++++++++++++++++                                 | 33% ~00s          
  |+++++++++++++++++++++++                           | 44% ~00s          
  |++++++++++++++++++++++++++++                      | 56% ~00s          
  |++++++++++++++++++++++++++++++++++                | 67% ~00s          
  |+++++++++++++++++++++++++++++++++++++++           | 78% ~00s          
  |+++++++++++++++++++++++++++++++++++++++++++++     | 89% ~00s          
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s