load_cellranger_data: Load data from the 10x Genomics Cell Ranger pipeline

View source: R/load_cellranger_data.R

load_cellranger_dataR Documentation

Load data from the 10x Genomics Cell Ranger pipeline

Description

Loads cellranger data into a cell_data_set object. Note that if your dataset is from version 3.0 and contains non-Gene-Expression data (e.g. Antibodies or CRISPR features), only the Gene Expression data is returned.

Usage

load_cellranger_data(
  pipestance_path = NULL,
  genome = NULL,
  barcode_filtered = TRUE,
  umi_cutoff = 100
)

Arguments

pipestance_path

Path to the output directory produced by Cell Ranger

genome

The desired genome (e.g., 'hg19' or 'mm10')

barcode_filtered

Load only the cell-containing barcodes

umi_cutoff

Numeric, desired cutoff to include a cell. Default is 100.

Details

  • the pipestance_path argument takes the name of a Cell Ranger output directory, in which it looks for the required data files, for example, pipestance_path=10x_data

  • for Cell Ranger version 2 data, load_cellranger_data expects to find the required files barcodes.tsv, genes.tsv, and matrix.mtx in the directories as

    • 10x_data/outs/filtered_gene_bc_matrices//barcodes.tsv

    • 10x_data/outs/filtered_gene_bc_matrices//genes.tsv

    • 10x_data/outs/filtered_gene_bc_matrices//matrix.mtx

    where is the name of a genome. load_cellranger_data expects to find either a single genome directory in 10x_data/outs/filtered_gene_bc_matrices or a genome directory with the name given with the genome argument.

  • for Cell Ranger version 3 data, load_cellranger_data expects to find the required files barcodes.tsv.gz, features.tsv.gz, and matrix.mtx.gz in the directories as

    • 10x_data/outs/filtered_feature_bc_matrix/barcodes.tsv.gz

    • 10x_data/outs/filtered_feature_bc_matrix/features.tsv.gz

    • 10x_data/outs/filtered_feature_bc_matrix/matrix.mtx.gz

  • if any of the files is not in the expected directory, load_cellranger_data will terminate with an error

Value

a new cell_data_set object

Examples

  
    cell_ranger_data <- system.file("extdata", "cell_ranger_3", package = "monocle3")
    gene_bc_matrix <- load_cellranger_data(cell_ranger_data)
  


cole-trapnell-lab/monocle3 documentation built on March 27, 2024, 8:59 a.m.