subsetPerSample: Subset per sample

subsetPerSampleR Documentation

Subset per sample

Description

Subset per sample

Usage

subsetPerSample(object, ...)

## S4 method for signature 'SingleCellExperiment'
subsetPerSample(
  object,
  minCells = 1L,
  assignAndSave = FALSE,
  envir = parent.frame(),
  dir = getwd()
)

Arguments

object

Object.

minCells

integer(1). Minimum number of cells required per sample.

assignAndSave

logical(1). Assign and save the individual datasets.

envir

environment. Where to assign the subsets. Only applicable when assignAndSave = TRUE.

dir

character(1). Output directory. Only applicable when assignAndSave = TRUE.

...

Additional arguments.

Value

  • assignAndSave = FALSE: Per sample objects in a list.

  • assignAndSave = TRUE: Subset file paths.

Note

Updated 2022-03-02.

Examples

data(SingleCellExperiment_splatter, package = "AcidTest")

## SingleCellExperiment ====
object <- SingleCellExperiment_splatter

## List mode (default).
list <- subsetPerSample(object, assignAndSave = FALSE)
names(list)

## Assign and save mode (useful for large datasets).
subsetPerSample(
    object = object,
    assignAndSave = TRUE,
    envir = parent.frame(),
    dir = "subsetPerSample"
)
sort(list.files("subsetPerSample"))

## Clean up.
unlink("subsetPerSample", recursive = TRUE)

acidgenomics/r-acidsinglecell documentation built on March 30, 2024, 5:39 a.m.