4545
4646### Help
4747```
48+ Program: dupsifter
49+ Version: 1.1.1
50+ Contact: Jacob Morrison <jacob.morrison@vai.org>
51+
4852dupsifter [options] <ref.fa> [in.bam]
4953
5054Output options:
@@ -56,15 +60,23 @@ Input options:
5660 -W, --wgs-only process WGS reads instead of WGBS
5761 -l, --max-read-length INT maximum read length for paired end duplicate-marking [10000]
5862 -b, --min-base-qual INT minimum base quality [0]
63+ -B, --has-barcode reads in file have barcodes (see Note 4 for details)
5964 -r, --remove-dups toggle to remove marked duplicate
6065 -v, --verbose print extra messages
6166 -h, --help this help
67+ --version print version info and exit
6268
6369Note 1, [in.bam] must be name sorted. If not provided, assume the input is stdin.
6470Note 2, assumes either ALL reads are paired-end (default) or single-end.
6571 If a singleton read is found in paired-end mode, the code will break nicely.
6672Note 3, defaults to dupsifter.stat if streaming or (-o basename).dupsifter.stat
6773 if the -o option is provided. If -o and -O are provided, then -O will be used.
74+ Note 4, dupsifter first looks for a barcode in the CB SAM tag, then in the CR SAM tag, then
75+ tries to parse the read name. If the barcode is in the read name, it must be the last element
76+ and be separated by a ':' (i.e., @12345:678:9101112:1234_1:N:0:ACGTACGT). Any separators
77+ found in the barcode (e.g., '+' or '-') are treated as 'N's and the additional parts of the
78+ barcode are included up to a maximum length of 16 bases/characters. Barcodes are taken from
79+ read 1 in paired-end sequencing only.
6880```
6981
7082### Option Descriptions
@@ -77,6 +89,7 @@ Note 3, defaults to dupsifter.stat if streaming or (-o basename).dupsifter.stat
7789| -W | --wgs-only | none | Process WGS data instead of WGBS (see Documentation for differences in processing) |
7890| -l | --max-read-length | integer | Maximum read length (handles padding for reference genome windows) |
7991| -b | --min-base-qual | integer | Minimum bae quality (used in determiningg bisulfite strand if tags not provided) |
92+ | -B | --has-barcode | none | Use when reads have cell barcodes and you want to mark duplicates accordingly |
8093| -r | --remove-dups | none | Remove reads that are flagged as duplicates |
8194| -v | --verbose | none | Print extra messages when running |
8295| -h | --help | none | Print usage help message and exit |
@@ -120,6 +133,7 @@ categories (descriptions below):
120133 5 . Read 1 Leftmost in Pair?
121134 6 . Orientation
122135 7 . Single-End?
136+ 8 . Cell barcode
123137
124138Descriptions:
125139
@@ -132,6 +146,7 @@ Descriptions:
132146 forward-reverse, reverse-forward. For reference, forward-reverse is generally
133147 considered a "proper pair."
134148 - * Single-End?:* Is the read a single-end read?
149+ - * Cell barcode:* Described below
135150
136151PCR duplicates are found for single-end and paired-end reads using the same
137152set of categories, with a few minor notes. First, single-end reads and
@@ -182,6 +197,35 @@ example, the human genome from GENCODE contains over 600 contigs (both primary
182197chromosomes and additional contigs). Rather than having 600+ bins, there are
183198approximately 25 bins using the described method.
184199
200+ ### Cell Barcodes
201+
202+ Cell barcodes are commonly used in single-cell sequencing in order to multiplex
203+ many cells into a pool, primarily to increase throughput and to overcome
204+ sequencer input requirements. It also allows for streamlined processing, as many
205+ cells can be processed at once. These barcodes must be included when defining
206+ reads that are duplicates as two fragments may be from the same location in the
207+ genome, but be from two different cells. By default, dupsifter does not look for
208+ barcodes; however, an option is available (` -B|--has-barcode ` ) when duplicate
209+ marking data with barcodes. Dupsifter handles barcodes in the following way:
210+
211+ 1 . Looks for the ` CB ` SAM tag.
212+ 2 . If not found, look for the ` CR ` SAM tag.
213+ 3 . If neither are found, parse the read name. The barcode must be the last
214+ element in the name where the elements are separated by ` : ` .
215+ 4 . If a barcode can't be found in any of these locations, a warning is
216+ printed and a default value is used (thereby negating any benefits of
217+ using barcodes).
218+
219+ In all three cases, up to 16 bases are packed into a single integer for defining
220+ the barcode. If your barcode is longer than 16 bases, it will be truncated to a
221+ length of 16. Additionally, separators (only ` + ` and ` - ` allowed) are treated as
222+ Ns and count towards the maximum length of 16.
223+
224+ <!-- Room for improvement: -->
225+ <!-- - Allow barcodes longer than 16 base pairs. -->
226+ <!-- - Handle barcodes with dual indexes. -->
227+ <!-- - Include UMI capabilities. -->
228+
185229### Bisulfite Strand Determination
186230The bisulfite strand for a read (both single-end and paired-end reads) is
187231determined with the following priority:
0 commit comments