atac

The atac command exposes the functionality of alevin-fry for processing RAD files containing scATAC-seq data. The atac command sets the mode of alevin-fry, and this command itself takes one of several various sub-commands (generate-permit-list and sort being the primary ones).

generate-permit-list (atac)

This command takes as input an output directory containing a RAD file (created by piscem), and it determines what cell barcodes should be associated with “true” cells, which should be corrected to some “true” barcode, and which should simply be ignored / discarded.

This command has 4 required arguments; the path to an input directory --input, the path to an output directory --output-dir (which will be created if it doesn’t exist), and a path to the barcode permit-list file. The functioning of this argument is as follows:

  • --unfiltered-pl <plist>: This option accepts a list of all possible barcodes for the technology. Exact observations occurring at least --min-reads times are retained as present cells. Other observed barcodes are resolved against the retained cells by the shared correction engine. ATAC defaults to Hamming-1, Unique correction; --cell-bc-correction frequency enables abundance resolution with a 90% default confidence, --cell-bc-confidence changes that threshold, and --cell-bc-neighborhood selects the neighbourhood. See Barcode correction.

output

The generate-permit-list command outputs a number of different files in the output directory. Not all files are relevant to users of alevin-fry, but the files are described here.

  1. The file bin_lens.bin is a binary file that records the lengths of the bins used for creating temporary files for sorting.

  2. The file bin_recs.bin is a binary file that encodes where records should be routed during the sorting phase.

  3. The file permit_freq.bin stores read counts aggregated by corrected retained barcode.

  4. The file permit_map.bin preserves the historical serialized correction map for compatibility.

  5. The versioned file correction_plan.bin contains GPL’s accepted observed-barcode decisions. Both ATAC collation and sorting apply this plan directly and fall back to permit_map.bin only for older GPL output.

  6. The file generate_permit_list.json records the run and its resolved correction policy and statistics.

sort (atac)

This command takes as input the directory containing the original RAD file (created by piscem) and the output directory generated by the generate-permit-list command above. It parses the input RAD file, buckets and then sorts the records by genomic location, and produces a globally-sorted BED file for downstream analysis. The process is highly multi-threaded, and the number of threads can be chosen by passing the appropriate argument to the --threads command. The output BED file can optionally be compressed if the --compress flag is passed to the sort command. The output of the sort command id described below.

output

The sort command outputs the following files:

  1. The sort.json file is a JSON file containing information about how the sort command was run.

  2. The map.bed file (or map.bed.gz if the --compress flag was passed) contains the output filed in BED format that can be provided to a peak caller like MACS.