Learn R Programming

monocle3 (version 1.0.0)

load_cellranger_data: 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.

Value

a new cell_data_set object

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/<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

Examples

Run this code
# NOT RUN {
# Load from a Cell Ranger output directory
gene_bc_matrix <- load_cellranger_data("/home/user/cellranger_output")
# }

Run the code above in your browser using DataLab