Type: | Package |
Title: | E-Statistics for Seurat Objects |
Version: | 0.1.0 |
Author: | Stefan Peidli |
Maintainer: | Stefan Peidli <stefanpeidli@gmail.com> |
Description: | R version of 'scperturb' tool for single-cell perturbation analysis. Contains wrappers for performing E-statistics for Seurat objects. More details on the method can be found in Peidli et al. (2023) <doi:10.1101/2022.08.20.504663> and in Székely and Rizzo (2004). |
License: | MIT + file LICENSE |
URL: | https://github.com/sanderlab/scPerturb/tree/master/package_r |
BugReports: | https://github.com/sanderlab/scPerturb/issues |
Depends: | R (≥ 3.5.0) |
Imports: | Seurat, dplyr, rdist, energy, stats |
Encoding: | UTF-8 |
Language: | en-US |
RoxygenNote: | 7.2.3 |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2023-03-01 12:11:57 UTC; stefanpeidli |
Repository: | CRAN |
Date/Publication: | 2023-03-01 20:10:02 UTC |
edist
Description
Computes pairwise E-distances on a Seurat object. Computes E-distance between all groups in a Seurat object in space given by reduction.
Usage
edist(
seurat_object,
groupby = "perturbation",
reduction = "pca",
sample_correction = FALSE,
verbose = TRUE
)
Arguments
seurat_object |
An object of class Seurat. |
groupby |
An object of class character. Points to the column in the Seurat object's meta data that contains the group labels. |
reduction |
An object of class character. The reduction / embedding in seurat_object that is used to compute the E-distance in. |
sample_correction |
An object of class logical. If TRUE, the E-distances are corrected for sample size. Will make it not a proper distance, leads to negative values. |
verbose |
An object of class logical. If TRUE, prints messages. Default is TRUE. |
Value
Returns an object of class data.frame. For each group contains the E-test p-value and the E-distance to control group.
Examples
# Add some code illustrating how to use the function
etest
Description
Performs E-testing on a Seurat object. Computes E-test statistics for each group in a Seurat object, using the E-distance in space given by reduction to the group defined by control.
Usage
etest(
seurat_object,
groupby = "perturbation",
control = "control",
reduction = "pca",
verbose = TRUE,
permutations = 1000
)
Arguments
seurat_object |
An object of class Seurat. |
groupby |
An object of class character. Points to the column in the Seurat object's meta data that contains the group labels. |
control |
An object of class character. The group that is used as the control. |
reduction |
An object of class character. The reduction / embedding in seurat_object that is used to compute the E-distance in. |
verbose |
An object of class logical. If TRUE, prints messages. Default is TRUE. |
permutations |
An object of class integer. The number of permutations used to compute the p-value. Default is 1000. |
Value
Returns an object of class data.frame. For each group contains the E-test p-value and the E-distance to control group.
Examples
# Add some code illustrating how to use the function