Convert10Xfolders: Convert10Xfolders

View source: R/Seurat.Utils.R

Convert10XfoldersR Documentation

Convert10Xfolders

Description

This function takes a parent directory with a number of subfolders, each containing the standard output of 10X Cell Ranger. It (1) loads the (filtered) data matrices, (2) converts them to Seurat objects, and (3) saves them as .qs files

Usage

Convert10Xfolders(
  InputDir,
  regex = FALSE,
  folderPattern = c("filtered_feature", "raw_feature", "SoupX_decont")[1],
  suffix = strsplit(folderPattern, "_")[[1]][1],
  depth = 4,
  min.cells = 5,
  min.features = 200,
  normalize_data = TRUE,
  updateHGNC = TRUE,
  ShowStats = TRUE,
  writeCBCtable = TRUE,
  nthreads = .getNrCores(),
  preset = "high",
  ext = "qs",
  sort_alphanumeric = TRUE,
  save_empty_droplets = TRUE,
  ...
)

Arguments

InputDir

A character string specifying the input directory.

regex

A logical value. If TRUE, the folderPattern is treated as a regular expression. Default: FALSE.

folderPattern

A character vector specifying the pattern of folder names to be searched. Default: 'filtered_feature'.

suffix

A character string specifying the suffix of the files saved.

depth

An integer value specifying the depth of scan (i.e., how many levels below the InputDir). Default: 2.

min.cells

An integer value specifying the minimum number of cells. Default: 5.

min.features

An integer value specifying the minimum number of features. Default: 200.

normalize_data

Add normalized "data" layer?. Default: TRUE.

updateHGNC

A logical value indicating whether to update the HGNC. Default: TRUE.

ShowStats

A logical value indicating whether to show statistics. Default: TRUE.

writeCBCtable

A logical value indicating whether to write out a list of cell barcodes (CBC) as a tsv file. Default: TRUE.

sort_alphanumeric

sort files alphanumeric? Default: TRUE.

save_empty_droplets

save empty droplets? Default: TRUE.

save

Save .qs object? Default: TRUE.

Examples

## Not run: 
if (interactive()) Convert10Xfolders(InputDir)

## End(Not run)

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.