## Tag BAM

### Description

This Drop-seq tool extracts bases from the cell/molecular barcode encoding read, and creates a new BAM tag with those bases on the g​enome read.​ We use the BAM tag XM for molecular barcodes, and XC for cell barcodes.

This program is run once per barcode extraction to add a tag. On the first iteration, the cell barcode is extracted from bases determined in the first parameter (default: 1-12). On the second iteration, the molecular barcode is extracted from bases determined by the base range for molecular barcode parameter (default 13-20) of the barcode read.

The tool also tags the reads in which the quality drops below the base quality threshold. The number of bases that fall below the threshold is marked in the XQ tag. This information can be used later on in the filtering tools.

For more details, please check the Drop-seq manual.

### Parameters

- Base range for cell barcode [1-12]
- Base range for molecule barcode [13-20]
- Base quality [10]

### Output

- unaligned_tagged.bam : Tagged BAM
- summary_cell.txt : Summary of the cell barcode tagging
- summary_molecular.txt : Summary of the molecular barcode tagging