This function takes FASTQ files from cellranger mkfastq and performs alignment, filtering, barcode counting, and UMI counting.

  group = c("sudo", "docker"),
  sample = NULL,
  expect.cells = NULL,
  force.cells = NULL,
  nosecondary = TRUE,
  chemistry = "auto",
  r1.length = NULL,
  r2.length = NULL,
  lanes = NULL,
  localcores = NULL,
  localmem = NULL,
  version = "3"



a character string. Two options: sudo or docker, depending to which group the user belongs


path to the Cell Ranger compatible transcriptome reference e.g. for a human and mouse mixture sample, use refdata-cellranger-hg19-and-mm10-1.2.0


path of the fastq path folder in fastq folder the fastq must have the format SAMPLENAME_S1_L001_R1_001.fastq.gz


fastq name, if fastq name is subject1_S1_L001_R1_001.fastq.gz sample is subject1


optional setting the number of recovered cells. Default: 3000 cells.


optional to force pipeline to use this number of cells, bypassing the cell detection algorithm. Use this if the number of cells estimated by Cell Ranger is not consistent with the barcode rank plot.


optional flag, default TRUE, to skip secondary analysis of the gene-barcode matrix (dimensionality reduction, clustering and visualization). Set this if you plan to use cellranger reanalyze or your own custom analysis.


optional assay configuration. One of: auto for autodetection (default), threeprime for Single Cell 3end, fiveprime for Single Cell 5end, SC3Pv1 for Single Cell 3end v1, SC3Pv2 for Single Cell 3end v2, SC5P-PE for Single Cell 5end paired-end (both R1 and R2 are used for alignment), SC5P-R2 for Single Cell 5end R2-only (where only R2 is used for alignment).


optional hard-trim the input R1 sequence to this length. Note that the length includes the Barcode and UMI sequences so do not set this below 26 for Single Cell 3end v2 or Single Cell 5end. This and --r2-length are useful for determining the optimal read length for sequencing.


optional hard-trim the input R2 sequence to this length.


optional, lanes associated with this sample


restricts cellranger to use specified number of cores to execute pipeline stages. By default, cellranger will use all of the cores available on your system.


restricts cellranger to use specified amount of memory, in GB, to execute pipeline stages. By default, cellranger will use 90% of the memory available on your system. Please note that cellranger requires at least 16 GB of memory to run all pipeline stages.


a character string indicating the path of the scratch folder


cellranger version: 2 or 3. version 3 handle better the counts table generation.


a folder called results_cellranger, more info on the structure of this folder at . In /somewhewre_in_your_computer/results_cellranger/outs/filtered_gene_bc_matrices the cells counts matrices results_cellranger.cvs and results_cellranger.txt are saved for further use.


if (FALSE) { home <- getwd() library(rCASC) setwd("/data/genomes/cellranger_hg19mm10") #getting the human and mouse cellranger index system("wget") untar("refdata-cellranger-hg19-and-mm10-2.1.0.tar.gz") setwd(home) # 100 cells 1:1 Mixture of Fresh Frozen Human (HEK293T) and Mouse (NIH3T3) Cells system("wget") untar("hgmm_100_fastqs.tar") home=paste(home,"/fastqs",sep="") cellrangerCount(group="docker", transcriptome.folder="/data/genomes/cellranger_hg19mm10/refdata-cellranger-hg19_and_mm10-2.1.0", fastq.folder=getwd(), expect.cells=100, nosecondary=TRUE, scratch.folder="/data/scratch", version="2") sraDownload(group = "docker", = "SRR7762358", data.folder = getwd(), scratch.folder = "/data/scratch", threads = 8) system("mv ./SRR7762358/SRR7762358.fastq.gz ./SRR7762358/SRR7762358_S1_L001_R1_001.fastq.gz") cellrangerCount(group="docker", transcriptome.folder="/data/genomes/refdata-cellranger-GRCh38-3.0.0", fastq.folder=getwd(), sample="SRR7762358", nosecondary=TRUE, scratch.folder="/data/scratch", version="3") }