ReadAndFilter10xData: Read and Filter 10X files.

View source: R/Seurat_III.R

ReadAndFilter10xDataR Documentation

Read and Filter 10X files.

Description

Reads in 10X files using Read10X and filters abberent cells using PerformEmptyDropletFiltering and returns a Seurat object.

Usage

ReadAndFilter10xData(
  dataDir,
  datasetId,
  datasetName = NULL,
  emptyDropNIters = 10000,
  emptyDropsFdrThreshold = 0.001,
  storeGeneIds = TRUE,
  emptyDropsLower = 100,
  useEmptyDropsCellRanger = FALSE,
  nExpectedCells = 8000,
  useSoupX = FALSE,
  previouslyFilteredMatrix = NULL
)

Arguments

dataDir

Either the directory holding raw count data (generally the raw_feature_bc_matrix), or the parent 'outs' dir from cellranger

datasetId

This will be used as a prefix for barcodes, and stored in metadata. Also used as the project name for the Seurat object.

datasetName

An optional print-friendly name that will be stored in metadata

emptyDropNIters

The number of iterations to use with PerformEmptyDrops()

emptyDropsFdrThreshold

The FDR threshold to call cells in emptyDrops()

storeGeneIds

If true, a map to translate geneId and name (by default rownames will use gene name)

emptyDropsLower

Passed directly to emptyDrops(). The lower bound on the total UMI count, at or below which all barcodes are assumed to correspond to empty droplets.

useEmptyDropsCellRanger

If TRUE, will use DropletUtils emptyDropsCellRanger instead of emptyDrops

nExpectedCells

Only applied if emptyDropsCellRanger is selected. Passed to n.expected.cells argument

useSoupX

If true, SoupX will be run against the run input data, instead of emptyDrops

previouslyFilteredMatrix

An optional filepath to a pre-filtered count matrix in h5 format. If non-null, this file will be read instead of dataDir. Empty drops and/or soupX will be skipped.

Value

A Seurat object.


bimberlabinternal/CellMembrane documentation built on Dec. 25, 2024, 8:10 a.m.