DEDUPE.SH(1)

✨ dedupe.sh β€” the manual page bestie edition ✨

okay so this is the manual for dedupe.sh, and no cap it's genuinely iconic β€” it takes your sequences and yeets the duplicates out. Let's get into it πŸ’…


πŸ’– NAME πŸ’–

dedupe.sh β€” simplifies assemblies by removing duplicate or contained... (that's literally where the original description cuts off, bestie, it just ends mid-sentence, and I refuse to invent the rest 🫢)


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: it takes one or more files that contain sets of sequences β€” reads or scaffolds, either one, it's flexible like that ✨ β€” and it removes duplicate sequences. And "duplicate" here is doing a lot of work, because you can tell it what counts:

  • exact matches β€” literally identical, periodt
  • subsequences β€” one thing living inside another
  • sequences within some percent identity β€” close enough counts

It can also find overlapping sequences and group them into clusters πŸ‘‘

Please read bbmap/docs/guides/DedupeGuide.txt for more information β€” fr fr, go read it, it's giving homework but the useful kind.


🌈 EXAMPLES 🌈

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= β€” so cute, so convenient πŸ’–


✨ OPTIONS ✨

πŸŽ€ I/O parameters πŸŽ€

  • in=<file,file> β€” A single file, or a comma-delimited list of files. Feed it a whole buffet if you want.
  • out=<file> β€” Destination for all output contigs. Where the keepers go πŸ’…
  • pattern=<file> β€” Clusters will be written to individual files, where the % symbol in the pattern is replaced by cluster number. So % is like, the placeholder main character.
  • outd=<file> β€” Optional; removed duplicates will go here. The rejects get their own little room πŸ™ˆ
  • csf=<file> β€” (clusterstatsfile) Write a list of cluster names and sizes.
  • dot=<file> β€” (graph) Write a graph in dot format. Requires fo and pc flags β€” no flags, no graph, that's the rule.
  • threads=auto β€” (t) Set number of threads to use; default is number of logical processors.
  • overwrite=t β€” (ow) Set to false to force the program to abort rather than overwrite an existing file. Respect the existing file, bestie.
  • showspeed=t β€” (ss) Set to f to suppress display of processing speed.
  • minscaf=0 β€” (ms) Ignore contigs/scaffolds shorter than this. Tiny ones get filtered βœ‚οΈ
  • interleaved=auto β€” If true, forces fastq input to be paired and interleaved.
  • ziplevel=2 β€” Set to 1 (lowest) through 9 (max) to change compression level; lower compression is faster.

🧚 Output format parameters 🧚

  • storename=t β€” (sn) Store scaffold names (set false to save memory).
  • #addpairnum=f β€” Add .1 and .2 to numeric id of read1 and read2.
  • storequality=t β€” (sq) Store quality values for fastq assemblies (set false to save memory).
  • uniquenames=t β€” (un) Ensure all output scaffolds have unique names. Uses more memory β€” that's the tradeoff, babe.
  • numbergraphnodes=t β€” (ngn) Label dot graph nodes with read numbers rather than read names.
  • sort=f β€” 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
  • ascending=f β€” Sort in ascending order.
  • ordered=f β€” Output sequences in input order. Equivalent to sort=id ascending.
  • renameclusters=f β€” (rnc) Rename contigs to indicate which cluster they are in.
  • printlengthinedges=f β€” (ple) Print the length of contigs in edges.

πŸ’œ Processing parameters πŸ’œ

  • absorbrc=t β€” (arc) Absorb reverse-complements as well as normal orientation.
  • absorbmatch=t β€” (am) Absorb exact matches of contigs.
  • absorbcontainment=t β€” (ac) Absorb full containments of contigs.
  • #absorboverlap=f β€” (ao) Absorb (merge) non-contained overlaps of contigs (TODO) β€” so like, not done yet, don't count on it πŸ’€
  • findoverlap=f β€” (fo) Find overlaps between contigs (containments and non-containments). Necessary for clustering.
  • uniqueonly=f β€” (uo) If true, all copies of duplicate reads will be discarded, rather than keeping 1.
  • rmn=f β€” (requirematchingnames) If true, both names and sequence must match.
  • usejni=f β€” (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.

🌸 Subset parameters 🌸

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

πŸ‘‘ Clustering parameters πŸ‘‘

  • cluster=f β€” (c) Group overlapping contigs into clusters.
  • pto=f β€” (preventtransitiveoverlaps) Do not look for new edges between nodes in the same cluster.
  • minclustersize=1 β€” (mcs) Do not output clusters smaller than this.
  • pbr=f β€” (pickbestrepresentative) Only output the single highest-quality read per cluster.

πŸ“ Cluster postprocessing parameters πŸ“

  • processclusters=f β€” (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 β€” both, not one, okurrr.
  • fixmultijoins=t β€” (fmj) Remove redundant overlaps between the same two contigs.
  • removecycles=t β€” (rc) Remove all cycles so clusters form trees.
  • cc=t β€” (canonicizeclusters) Flip contigs so clusters have a single orientation.
  • fcc=f β€” (fixcanoncontradictions) Truncate graph at nodes with canonization disputes.
  • foc=f β€” (fixoffsetcontradictions) Truncate graph at nodes with offset disputes.
  • mst=f β€” (maxspanningtree) Remove cyclic edges, leaving only the longest edges that form a tree.

πŸ’… Overlap Detection Parameters πŸ’…

  • exact=t β€” (ex) Only allow exact symbol matches. When false, an N will match any symbol.
  • touppercase=t β€” (tuc) Convert input bases to upper-case; otherwise, lower-case will not match.
  • maxsubs=0 β€” (s) Allow up to this many mismatches (substitutions only, no indels). May be set higher than maxedits β€” yes really.
  • maxedits=0 β€” (e) Allow up to this many edits (subs or indels). Higher is slower 😭
  • minidentity=100 β€” (mid) Absorb contained sequences with percent identity of at least this (includes indels).
  • minlengthpercent=0 β€” (mlp) Smaller contig must be at least this percent of larger contig's length to be absorbed.
  • minoverlappercent=0 β€” (mop) Overlap must be at least this percent of smaller contig's length to cluster and merge.
  • minoverlap=200 β€” (mo) Overlap must be at least this long to cluster and merge.
  • depthratio=0 β€” (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.
  • k=31 β€” Seed length used for finding containments and overlaps. Anything shorter than k will not be found.
  • numaffixmaps=1 β€” (nam) Number of prefixes/suffixes to index per contig. Higher is more sensitive, if edits are allowed.
  • hashns=f β€” Set to true to search for matches using kmers containing Ns. Can lead to extreme slowdown in some cases β€” like, be careful, bestie πŸ’€
  • #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.

⭐ Other Parameters ⭐

  • qtrim=f β€” Set to qtrim=rl to trim leading and trailing Ns.
  • trimq=6 β€” Quality trim level.
  • forcetrimleft=-1 β€” (ftl) If positive, trim bases to the left of this position (exclusive, 0-based).
  • forcetrimright=-1 β€” (ftr) If positive, trim bases to the right of this position (exclusive, 0-based).

🧬 Note on Proteins / Amino Acids 🧬

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.

β˜• Java Parameters β˜•

  • -Xmx β€” 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.
  • -eoom β€” This flag will cause the process to exit if an out-of-memory exception occurs. Requires Java 8u92+.
  • -da β€” Disable assertions.

🌟 AUTHOR 🌟

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 β€” he genuinely wants to know, bestie 🫢

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


okay and that's the whole thing, no notes πŸ’– this is dedupe.sh version 38.43, dated April 2019 β€” go forth and dedupe, you absolute icon πŸ‘‘βœ¨