Skip to contents
library(GDSCtools)
#> 
library(purrr)

Introduction

This vignette demonstrates how to load in multiple samples from CellRanger output folders as Seurat objects using GDSCtools

The workflow includes:

  1. Loading in CellRanger out files as Seurat objects.

First, designate the path to the CellRanger files, the sample names stored within that folder, and the corresponding IDs you wish to name the samples.

purrr::map is used to apply the GDSCtools::read_10x_GEX function to all the samples in the input directory, returning a list of Seurat objects. The resulting objects are pre-filtered based on min.cells and min.features.


sample_dir <- "/path/to/data/"
samples    <- c("S1", "S2", "S3")
idents     <- c("CondA", "CondB", "CondC")

seurat_list <- map(samples, idents, ~ read_10x_GEX(
                   sampleDir    = sample_dir,
                   sample       = .x,
                   ident        = .y,
                   min.cells    = 10,
                   min.features = 100))