DOKK / manpages / debian 11 / bbmap / dedupe.sh.1.en
DEDUPE.SH(1) User Commands DEDUPE.SH(1)

dedupe.sh - Simplifies assemblies by removing duplicate or contained

dedupe.sh in=<file or stdin> out=<file or stdout>

Accepts one or more files containing sets of sequences (reads or scaffolds). Removes duplicate sequences, which may be specified to be exact matches, subsequences, or sequences within some percent identity. Can also find overlapping sequences and group them into clusters. Please read bbmap/docs/guides/DedupeGuide.txt for more information.

An example of running Dedupe for clustering short reads:

dedupe.sh in=x.fq am=f ac=f fo c pc rnc=f mcs=4 mo=100 s=1 pto cc qin=33 csf=stats.txt pattern=cluster_%.fq dot=graph.dot

Input may be fasta or fastq, compressed or uncompressed. Output may be stdout or a file. With no output parameter, data will be written to stdout. If 'out=null', there will be no output, but statistics will still be printed. You can also use 'dedupe <infile> <outfile>' without the 'in=' and 'out='.

A single file or a comma-delimited list of files.
Destination for all output contigs.
Clusters will be written to individual files, where the '%' symbol in the pattern is replaced by cluster number.
Optional; removed duplicates will go here.
(clusterstatsfile) Write a list of cluster names and sizes.
(graph) Write a graph in dot format. Requires 'fo' and 'pc' flags.
(t) Set number of threads to use; default is number of logical processors.
(ow) Set to false to force the program to abort rather than overwrite an existing file.
(ss) Set to 'f' to suppress display of processing speed.
(ms) Ignore contigs/scaffolds shorter than this.
If true, forces fastq input to be paired and interleaved.
Set to 1 (lowest) through 9 (max) to change compression level; lower compression is faster.

(sn) Store scaffold names (set false to save memory).
#addpairnum=f
Add .1 and .2 to numeric id of read1 and read2.
(sq) Store quality values for fastq assemblies (set false to save memory).
(un) Ensure all output scaffolds have unique names. Uses more memory.
(ngn) Label dot graph nodes with read numbers rather than read names.
Sort output (otherwise it will be random). Options:
length: Sort by length
quality: Sort by quality
name: Sort by name
id: Sort by input order
Sort in ascending order.
Output sequences in input order. Equivalent to sort=id ascending.
(rnc) Rename contigs to indicate which cluster they are in.
(ple) Print the length of contigs in edges.

(arc) Absorb reverse-complements as well as normal orientation.
(am) Absorb exact matches of contigs.
(ac) Absorb full containments of contigs.
#absorboverlap=f
(ao) Absorb (merge) non-contained overlaps of contigs (TODO).
(fo) Find overlaps between contigs (containments and non-containments). Necessary for clustering.
(uo) If true, all copies of duplicate reads will be discarded, rather than keeping 1.
(requirematchingnames) If true, both names and sequence must match.
(jni) Do alignments in C code, which is faster, if an edit distance is allowed. This will require compiling the C code; details are in /jni/README.txt.

(sstc) Number of subsets used to process the data; higher uses less memory.
(sst) Only process reads whose ((ID%subsetcount)==subset).

(c) Group overlapping contigs into clusters.
(preventtransitiveoverlaps) Do not look for new edges between nodes in the same cluster.
(mcs) Do not output clusters smaller than this.
(pickbestrepresentative) Only output the single highest-quality read per cluster.

(pc) Run the cluster processing phase, which performs the selected operations in this category. For example, pc AND cc must be enabled to perform cc.
(fmj) Remove redundant overlaps between the same two contigs.
(rc) Remove all cycles so clusters form trees.
(canonicizeclusters) Flip contigs so clusters have a single orientation.
(fixcanoncontradictions) Truncate graph at nodes with canonization disputes.
(fixoffsetcontradictions) Truncate graph at nodes with offset disputes.
(maxspanningtree) Remove cyclic edges, leaving only the longest edges that form a tree.

(ex) Only allow exact symbol matches. When false, an 'N' will match any symbol.
(tuc) Convert input bases to upper-case; otherwise, lower-case will not match.
(s) Allow up to this many mismatches (substitutions only, no indels). May be set higher than maxedits.
(e) Allow up to this many edits (subs or indels). Higher is slower.
(mid) Absorb contained sequences with percent identity of at least this (includes indels).
(mlp) Smaller contig must be at least this percent of larger contig's length to be absorbed.
(mop) Overlap must be at least this percent of smaller contig's length to cluster and merge.
(mo) Overlap must be at least this long to cluster and merge.
(dr) When non-zero, overlaps will only be formed between reads with a depth ratio of at most this. Should be above 1. Depth is determined by parsing the read names; this information can be added by running KmerNormalize (khist.sh, bbnorm.sh, or ecc.sh) with the flag 'rename'
Seed length used for finding containments and overlaps. Anything shorter than k will not be found.
(nam) Number of prefixes/suffixes to index per contig. Higher is more sensitive, if edits are allowed.
Set to true to search for matches using kmers containing Ns. Can lead to extreme slowdown in some cases.
#ignoreaffix1=f
(ia1) Ignore first affix (for testing).
#storesuffix=f
(ss) Store suffix as well as prefix. Automatically set to true when doing inexact matches.

Set to qtrim=rl to trim leading and trailing Ns.
Quality trim level.
(ftl) If positive, trim bases to the left of this position (exclusive, 0-based).
(ftr) If positive, trim bases to the right of this position (exclusive, 0-based).

Dedupe supports amino acid space via the 'amino' flag. This also changes the default kmer length to 10. In amino acid mode, all flags related to canonicity and reverse-complementation are disabled, and nam (numaffixmaps) is currently limited to 2 per tip.

This will set Java's memory usage, overriding autodetection.
-Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs. The max is typically 85% of physical memory.
This flag will cause the process to exit if an out-of-memory exception occurs. Requires Java 8u92+.
Disable assertions.

Written by Brian Bushnell and Jonathan Rood (Last modified November 20, 2017)

Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.

This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.

April 2019 dedupe.sh 38.43