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


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.


  pipestance_path = NULL,
  genome = NULL,
  barcode_filtered = TRUE,
  umi_cutoff = 100



Path to the output directory produced by Cell Ranger


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


Load only the cell-containing barcodes


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


  • 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/<genome>/barcodes.tsv

    • 10x_data/outs/filtered_gene_bc_matrices/<genome>/genes.tsv

    • 10x_data/outs/filtered_gene_bc_matrices/<genome>/matrix.mtx

    where <genome> 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


a new cell_data_set object


    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 May 24, 2022, 5:25 p.m.