Hi,
Background: We developed an RShiny web interface SeuratWizard for seurat v2 (guided clustering workflow) and I am currently trying to migrate it to v3.
For the subset function, is there a way to use a variable containing the subset name. For example:
var1 = "name"
subset(x = object, subset = var1 > low & var1 < high)
Could be a simple oversight on my part. Appreciate the help
Much like R's subset function, subset.Seurat is designed for interactive use only. While we currently don't offer a programmatic way to subset Seurat objects based on feature expression, this can be accomplished relatively easily using which and FetchData
expr <- FetchData(object = object, vars = var1)
object[, which(x = expr > low & expr < high)]
Yes this works well. Thanks for the explanation.
Most helpful comment
Much like R's
subsetfunction,subset.Seuratis designed for interactive use only. While we currently don't offer a programmatic way to subset Seurat objects based on feature expression, this can be accomplished relatively easily usingwhichandFetchData