sketchData: Downsampling single cell data using geometric sketching...

View source: R/utilities.R

sketchDataR Documentation

Downsampling single cell data using geometric sketching algorithm

Description

USERs need to install the python package 'pip install geosketch' (https://github.com/brianhie/geosketch)

Usage

sketchData(object, percent, idents = NULL, do.PCA = TRUE, dimPC = 30)

Arguments

object

A data matrix (should have row names; samples in rows, features in columns) or a Seurat object.

When object is a PCA or UMAP space, please set 'do.PCA = FALSE'

When object is a data matrix (cells in rows and genes in columns), it is better to use the highly variable genes. PCA will be done on this input data matrix.

percent

the percent of data to sketch

idents

A vector of identity classes to keep for sketching

do.PCA

whether doing PCA on the input data

dimPC

the number of components to use

Value

A vector of cell names to use for downsampling


sqjin/CellChat documentation built on Nov. 10, 2023, 4:29 a.m.