Description Usage Arguments Value Examples
Creates a Seurat object containing only a subset of the cells in the original object. Takes either a list of cells to use as a subset, or a parameter (for example, a gene), to subset on.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | SubsetData(object, ...)
## S3 method for class 'Assay'
SubsetData(
object,
cells = NULL,
subset.name = NULL,
low.threshold = -Inf,
high.threshold = Inf,
accept.value = NULL,
...
)
## S3 method for class 'Seurat'
SubsetData(
object,
assay = NULL,
cells = NULL,
subset.name = NULL,
ident.use = NULL,
ident.remove = NULL,
low.threshold = -Inf,
high.threshold = Inf,
accept.value = NULL,
max.cells.per.ident = Inf,
random.seed = 1,
...
)
|
object |
An object |
... |
Arguments passed to other methods |
cells |
A vector of cell names to use as a subset. If NULL (default), then this list will be computed based on the next three arguments. Otherwise, will return an object consissting only of these cells |
subset.name |
Parameter to subset on. Eg, the name of a gene, PC_1, a column name in object@meta.data, etc. Any argument that can be retreived using FetchData |
low.threshold |
Low cutoff for the parameter (default is -Inf) |
high.threshold |
High cutoff for the parameter (default is Inf) |
accept.value |
Returns cells with the subset name equal to this value |
assay |
Assay to subset on |
ident.use |
Create a cell subset based on the provided identity classes |
ident.remove |
Subtract out cells from these identity classes (used for filtration) |
max.cells.per.ident |
Can be used to downsample the data to a certain max per cell ident. Default is INF. |
random.seed |
Random seed for downsampling |
Returns a Seurat object containing only the relevant subset of cells
1 2 3 4 5 | ## Not run:
pbmc1 <- SubsetData(object = pbmc_small, cells = colnames(x = pbmc_small)[1:40])
pbmc1
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.