load_cellranger_data_h5: Make monocle3 cell_data_set using cellranger h5

Description Usage Arguments Value

View source: R/read_tenx.R

Description

This function reads a vector of cellranger "out" folders for .h5 files. This function will create a cds of the data using cellranger thresholds for filtering out droplets that do not contain cells. Optionally, this function can return the unfiltered data as well for further manipulation (ie adjustment of droplet thresholds) if desired.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
load_cellranger_data_h5(
  folders = NULL,
  samplenames = NULL,
  unfiltered = F,
  files = NULL,
  unfilt_files = NULL,
  empty.droplet.threshold = 15,
  expressed_genes = TRUE,
  cell_min = 1,
  aggregated = F,
  chemistry = "SC3Pv3",
  atac_feature = "peaks"
)

Arguments

folders

A vector of cellranger folders (full folder name is ideal). These must contain an "outs" subfolders with two files; 1) raw_feature_bc_matrix.h5, and 2) filtered_feature_bc_matrix.h5. For aggregated samples run with cellrangers 'aggregate' function, this folder should also contain the aggregation.csv file.

samplenames

An optional vector that corresponds to the names you would like to give to each element in filelist. This defaults to the the basename of the filelist element i.e.

unfiltered

This parameter, if true, returns a list containing 1) the filtered cds, 2) a list of unfiltered cds for each sample in 'folders'.

files

A vector of filtered h5 cellranger files. Not compatible with aggregated mode.

unfilt_files

A vector of unfiltered h5 cellranger files. Not compatible with aggregated mode. Will be ignored if unfiltered is FALSE.

empty.droplet.threshold

minimum number of umis per droplet to include in unfiltered output (default 15)

expressed_genes

If true, this option removes genes that do not have expression in at least a minumum number of cells (cell_min parameter)

cell_min

Minimum number of cells that a gene needs to be expressed for the gene to be included in the

aggregated

will read a cellranger aggregate folder, this is currently only supported for 1 folder. The 'aggregation.csv' file must be included in the 'outs' folder.

Value

a cell_data_set object or a list of items if unfiltered data is returned (see unfiltered)


scfurl/m3addon documentation built on Aug. 9, 2021, 5:30 p.m.