HOME  ›   pipelines
If your question is not answered here, please email us at:  ${email.software}

10x Genomics
Chromium Single Cell ATAC

Single-Library Analysis with cellranger-atac count

Cell Ranger ATAC's pipelines analyze sequencing data produced from Chromium Single Cell ATAC libraries. This involves the following steps:

  1. Run cellranger-atac mkfastq on the Illumina® BCL output folder to generate FASTQ files.

  2. Run cellranger-atac count on each library that was demultiplexed by cellranger-atac mkfastq.

For the following example, assume that the Illumina® BCL output is in a folder named /sequencing/140101_D00123_0111_AHAWT7ADXX.

Run cellranger-atac mkfastq

First, follow the instructions on running cellranger-atac mkfastq to generate FASTQ files. For example, if the flow cell serial number was HAWT7ADXX, then cellranger-atac mkfastq will output FASTQ files in HAWT7ADXX/outs/fastq_path.

Run cellranger-atac count

To generate single cell accessibility counts for a single library, run cellranger-atac count with the following arguments. For a complete list of command-line arguments, run cellranger-atac count --help.

These are the required command line arguments (also available through cellranger-atac count --help):

ArgumentDescription
--id=IDRequired. A unique run ID string (e.g., sample345). The name is arbitrary and will be used to name the directory containing all pipeline-generated files and outputs. Only letters, numbers, underscores, and hyphens are allowed (maximum of 64 characters).
--reference=PATHPath to folder containing a Cell Ranger ATAC or Cell Ranger ARC reference.
--fastqsEither:
Path of the fastq_path folder generated by cellranger-atac mkfastq
e.g. /home/jdoe/runs/HAWT7ADXX/outs/fastq_path. This contains a directory hierarchy that cellranger-atac count will automatically traverse.
- OR -
Any folder containing FASTQ files, for example if the FASTQ files were generated by a service provider and delivered outside the context of the mkfastq output directory structure.
Can take multiple comma-separated paths, which is helpful if the same library was sequenced on multiple flow cells.
Doing this will treat all reads from the library, across flow cells, as one sample.
We do not support combining analyses from multiple libraries for this version.

Additional optional parameters are available:

OptionDescription
--description=TEXTSample description to embed in output files [default: ]
--sampleSample name as specified in the sample sheet supplied to cellranger-atac mkfastq.
Can take multiple comma-separated values, which is helpful if the same library was sequenced on multiple flow cells and the sample name used (and therefore FASTQ file prefix) is not identical between them.
Doing this will treat all reads from the library, across flow cells, as one sample.
Allowable characters in sample names are letters, numbers, hyphens, and underscores.
--description=TEXTSample description to embed in output files [default: ]
--project=TEXT Name of the project folder within a mkfastq or bcl2fastq- generated folder to pick FASTQs from
--lanes=NUMS... Only use FASTQs from selected lanes
--force-cells=NUM Define the top N barcodes with the most fragments overlapping peaks as cells and override the cell calling algorithm. N must be a positive integer <= 20,000. Use this option if the number of cells estimated by Cell Ranger ATAC is not consistent with the barcode rank plot
--peaks=BED Override peak caller: specify peaks to use in downstream analyses from supplied 3-column BED file. The supplied peaks file must be sorted by position and not contain overlapping peaks; comment lines beginning with # are allowed
--dim-reduce=STR Dimensionality reduction mode for clustering. Note: plsa has been temporarily restricted to run in single-threaded mode due to technical considerations. This could lead to a longer wall time for execution as compared to v1.2. Multi- threading will be restored in a subsequent release [default: lsa] [possible values: lsa, pca, plsa]
--subsample-rate Downsample to preserve this fraction of reads
--jobmode=MODEJob manager to use. Valid options: local (default), sge, lsf, slurm, or path to a .template file. Consult the Cluster Mode page for details on configuring the pipeline to use a compute cluster [default: local]
--localcores=NUMSet max cores the pipeline may request at one time. Only applies to local jobs
--localmem=NUMSet max memory (GB) the pipeline may request at one time. Only applies to local jobs
--localvmem=NUMSet max virtual address space in GB for the pipeline. Only applies to local jobs
--mempercore=NUMReserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much memory available. Only applies to cluster jobmodes
--maxjobsSet max jobs submitted to cluster at one time. Only applies to cluster jobmodes
--jobintervalSet delay between submitting jobs to cluster, in ms. Only applies to cluster jobmodes
--overrides=PATHThe path to a JSON file that specifies stage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and --localmem.
--uiport=PORTServe web UI at http://localhost:PORT
After determining these input arguments, run cellranger-atac:
$ cd /home/jdoe/runs
$ cellranger-atac count --id=sample345 \
                        --reference=/opt/refdata-cellranger-arc-GRCh38-2020-A-2.0.0 \
                        --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \
                        --sample=mysample \
                        --localcores=8 \
                        --localmem=64

Following a set of preflight checks to validate input arguments, cellranger-atac count pipeline stages will begin to run:

Martian Runtime - 4.0.7
 
Running preflight checks (please wait)...

By default, cellranger-atac will use all of the cores available on your system to execute pipeline stages. You can specify a different number of cores to use with the --localcores option; for example, --localcores=16 will limit cellranger-atac to using up to sixteen cores at once. Similarly, --localmem will restrict the amount of memory (in GB) used by cellranger-atac.

The pipeline will create a new folder named with the sample ID you specified (e.g. /home/jdoe/runs/sample345) for its output. If this folder already exists, cellranger-atac will assume it is an existing pipestance and attempt to resume running it.

Output files

A successful cellranger-atac count run should conclude with a message similar to this:

Outputs:
- Per-barcode fragment counts & metrics:        /home/jdoe/runs/sample345/outs/singlecell.csv
- Position sorted BAM file:                     /home/jdoe/runs/sample345/outs/possorted_bam.bam
- Position sorted BAM index:                    /home/jdoe/runs/sample345/outs/possorted_bam.bam.bai
- Summary of all data metrics:                  /home/jdoe/runs/sample345/outs/summary.json
- HTML file summarizing data & analysis:        /home/jdoe/runs/sample345/outs/web_summary.html
- Bed file of all called peak locations:        /home/jdoe/runs/sample345/outs/peaks.bed
- Raw peak barcode matrix in hdf5 format:       /home/jdoe/runs/sample345/outs/raw_peak_bc_matrix.h5
- Raw peak barcode matrix in mex format:        /home/jdoe/runs/sample345/outs/raw_peak_bc_matrix
- Directory of analysis files:                  /home/jdoe/runs/sample345/outs/analysis
- Filtered peak barcode matrix in hdf5 format:  /home/jdoe/runs/sample345/outs/filtered_peak_bc_matrix.h5
- Filtered peak barcode matrix in mex format:   /home/jdoe/runs/sample345/outs/filtered_peak_bc_matrix
- Barcoded and aligned fragment file:           /home/jdoe/runs/sample345/outs/fragments.tsv.gz
- Fragment file index:                          /home/jdoe/runs/sample345/outs/fragments.tsv.gz.tbi
- Filtered tf barcode matrix in hdf5 format:    /home/jdoe/runs/sample345/outs/filtered_tf_bc_matrix.h5
- Filtered tf barcode matrix in mex format:     /home/jdoe/runs/sample345/outs/filtered_tf_bc_matrix
- Loupe Browser input file:                     /home/jdoe/runs/sample345/outs/cloupe.cloupe
- csv summarizing important metrics and values: /home/jdoe/runs/sample345/outs/summary.csv
- Annotation of peaks with genes:               /home/jdoe/runs/sample345/outs/peak_annotation.tsv
- Peak-motif associations:                      /home/jdoe/runs/sample345/outs/peak_motif_mapping.bed
 
Pipestance completed successfully!

The output of the pipeline will be contained in a folder named with the sample ID you specified (e.g. sample345). The subfolder named outs/ will contain the main pipeline output files:

File NameDescription
singlecell.csvPer-barcode fragment counts & metrics
possorted_bam.bamPosition sorted BAM file
possorted_bam.bam.baiPosition sorted BAM index
summary.jsonSummary of all data metrics
web_summary.htmlHTML file summarizing data & analysis
peaks.bedBed file of all called peak locations
raw_peak_bc_matrix.h5Raw peak barcode matrix in hdf5 format
raw_peak_bc_matrixRaw peak barcode matrix in mex format
analysisDirectory of analysis files
filtered_peak_bc_matrix.h5Filtered peak barcode matrix in hdf5 format
filtered_peak_bc_matrixFiltered peak barcode matrix
fragments.tsv.gzBarcoded and aligned fragment file
fragments.tsv.gz.tbiFragment file index
filtered_tf_bc_matrix.h5Filtered tf barcode matrix in hdf5 format
filtered_tf_bc_matrixFiltered tf barcode matrix in mex format
cloupe.cloupeLoupe Browser input file
summary.csvsummary metrics in CSV form
peak_annotation.tsvPeak-gene associations based on genome proximity
peak_motif_mapping.bedPeak motif associations. Note that one peak could be associated with multiple transcription factor motifs.

Once cellranger-atac count has successfully completed, you can browse the resulting summary HTML file in any supported web browser, open the .cloupe file in Loupe Browser, or refer to the Understanding Output section to explore the data by hand.