BBNORM.SH(1)
π BBNORM.SH β bestie edition π
okay so this is a page from the User Commands manual, and honestly? it's giving β¨kmer magicβ¨. welcome to bbnorm.sh, bestie, let's get into it π«Ά
πΈ NAME πΈ
bbnorm.sh β the kmer-based error-correction and normalization tool π
β¨ SYNOPSIS β¨
bbnorm.sh in=<input> out=<reads to keep> outt=<reads to toss>
hist=<histogram output>
π¦ DESCRIPTION π¦
So what does it even do? It normalizes read depth based on kmer counts, periodt. It can also error-correct, bin reads by kmer depth, and generate a kmer depth histogram β like, it does a lot π
BUT. Real talk. Tadpole has superior error-correction to BBNorm π so if you're here specifically for error correction, know that.
Please read bbmap/docs/guides/BBNormGuide.txt for more information β it's lowkey required reading, no cap.
π OPTIONS π
π Input parameters
in=nullβ the primary input, your main character. Usein2for paired reads in a second file.in2=nullβ second input file, for when your paired reads live in two separate files.extra=nullβ extra files that get used for input (building the hash table) but not for output. iykyk.fastareadlen=2^31β breaks up FASTA reads longer than this. super useful when you're processing scaffolded genomes π§¬tablereads=-1β use at most this many reads when building the hashtable (-1means all of them, go wild).kmersample=1β process every *n*th kmer and skip the rest.readsample=1β process every *n*th read and skip the rest.interleaved=autoβ may be set totrueorfalseto force the input read file to override autodetection of the input file as paired interleaved.qin=autoβ ASCII offset for input quality. May be33(Sanger),64(Illumina), orauto.
π Output parameters
out=<file>β file for normalized or corrected reads. Useout2for paired reads in a second file.outt=<file>β also known asouttoss. File for reads that were excluded from the primary output. bye bestie πreads=-1β only process this number of reads, then quit (-1means all).sampleoutput=tβ use sampling on output as well as input (not used if sample rates are1).keepall=fβ set totrueto keep all reads (like, if you just want error correction and nothing else).zerobin=fβ set totrueif you want kmers with a count of0to go in the0bin instead of the1bin in histograms.
Default is false, to prevent confusion about how there can be 0-count kmers. The reason is that based on the minq and minprob settings, some kmers may be excluded from the bloom filter. (mystery solved π)
tmpdir=β this will specify a directory for temp files (only needed for multipass runs). If null, they will be written to the output directory.usetempdir=tβ allows enabling/disabling of temporary directory; if disabled, temp files will be written to the output directory.qout=autoβ ASCII offset for output quality. May be33(Sanger),64(Illumina), orauto(same as input).rename=fβ rename reads based on their kmer depth.
π₯ Hashing parameters
k=31β kmer length (values under32are most efficient, but arbitrarily high values are supported).bits=32β bits per cell in bloom filter; must be2,4,8,16, or32. Maximum kmer depth recorded is2^cbits. Automatically reduced to16in 2-pass.
Large values decrease accuracy for a fixed amount of memory, so use the lowest number you can that will still capture highest-depth kmers. fr fr.
hashes=3β number of times each kmer is hashed and stored. Higher is slower.
Higher is MORE accurate if there is enough memory, and LESS accurate if there is not enough memory. the duality of man π
prefilter=fβtrueis slower, but generally more accurate; filters out low-depth kmers from the main hashtable. The prefilter is more memory-efficient because it uses 2-bit cells.prehashes=2β number of hashes for prefilter.prefilterbits=2β also known aspbits. Bits per cell in prefilter.prefiltersize=0.35β fraction of memory to allocate to prefilter.buildpasses=1β more passes can sometimes increase accuracy by iteratively removing low-depth kmers.minq=6β ignore kmers containing bases with quality below this.minprob=0.5β ignore kmers with overall probability of correctness below this.threads=autoβ also known ast. Spawn exactly X hashing threads (default is number of logical processors). Total active threads may exceed X due to I/O threads.rdk=tβ also known asremoveduplicatekmers. Whentrue, a kmer's count will only be incremented once per read pair, even if that kmer occurs more than once.
π Normalization parameters
fixspikes=fβ also known asfs. Do a slower, high-precision bloom filter lookup of kmers that appear to have an abnormally high depth due to collisions.target=100β also known astgt. Target normalization depth. NOTE: All depth parameters control kmer depth, not read depth. π
For kmer depth Dk, read depth Dr, read length R, and kmer size K:
Dr=Dk*(R/(R-K+1))
maxdepth=-1β also known asmax. Reads will not be downsampled when below this depth, even if they are above the target depth.mindepth=5β also known asmin. Kmers with depth below this number will not be included when calculating the depth of a read.minkmers=15β also known asmgkpr. Reads must have at least this many kmers over min depth to be retained. Akamingoodkmersperread.percentile=54.0β also known asdp. Read depth is by default inferred from the 54th percentile of kmer depth, but this may be changed to any number1-100.uselowerdepth=tβ also known asuld. For pairs, use the depth of the lower read as the depth proxy.deterministic=tβ also known asdr. Generate random numbers deterministically to ensure identical output between multiple runs. May decrease speed with a huge number of threads.passes=2β also known asp.1pass is the basic mode.2passes (default) allows greater accuracy, error detection, better contol of output depth. (yes, "contol" β that's the original spelling, we keep it verbatim bestie π)
π Error detection parameters
hdp=90.0β also known ashighdepthpercentile. Position in sorted kmer depth array used as proxy of a read's high kmer depth.ldp=25.0β also known aslowdepthpercentile. Position in sorted kmer depth array used as proxy of a read's low kmer depth.tossbadreads=fβ also known astbr. Throw away reads detected as containing errors.requirebothbad=fβ also known asrbb. Only toss bad pairs if both reads are bad.errordetectratio=125β also known asedr. Reads with a ratio of at least this much between their high and low depth kmers will be classified as error reads.highthresh=12β also known asht. Threshold for high kmer. A high kmer at this or above are considered non-error.lowthresh=3β also known aslt. Threshold for low kmer. Kmers at this and below are always considered errors.
π Error correction parameters
ecc=fβ set totrueto correct errors. NOTE: Tadpole is now preferred for ecc as it does a better job. just saying πecclimit=3β correct up to this many errors per read. If more are detected, the read will remain unchanged.errorcorrectratio=140β also known asecr. Adjacent kmers with a depth ratio of at least this much between will be classified as an error.echighthresh=22β also known asecht. Threshold for high kmer. A kmer at this or above may be considered non-error.eclowthresh=2β also known aseclt. Threshold for low kmer. Kmers at this and below are considered errors.eccmaxqual=127β do not correct bases with quality above this value.aec=fβ also known asaggressiveErrorCorrection. Sets more aggressive values ofecr=100,ecclimit=7,echt=16,eclt=3.cec=fβ also known asconservativeErrorCorrection. Sets more conservative values ofecr=180,ecclimit=2,echt=30,eclt=1,sl=4,pl=4.meo=fβ also known asmarkErrorsOnly. Marks errors by reducing quality value of suspected errors; does not correct anything.mue=tβ also known asmarkUncorrectableErrors. Marks errors only on uncorrectable reads; requiresecc=t.overlap=fβ also known asecco. Error correct by read overlap.
π§ Depth binning parameters
lowbindepth=10β also known aslbd. Cutoff for low depth bin.highbindepth=80β also known ashbd. Cutoff for high depth bin.outlow=<file>β pairs in which both reads have a median belowlbdgo into this file.outhigh=<file>β pairs in which both reads have a median abovehbdgo into this file.outmid=<file>β all other pairs go into this file.
β Histogram parameters
hist=<file>β specify a file to write the input kmer depth histogram.histout=<file>β specify a file to write the output kmer depth histogram.histcol=3β also known ashistogramcolumns. Number of histogram columns,2or3.pzc=fβ also known asprintzerocoverage. Print lines in the histogram with zero coverage.histlen=1048576β max kmer depth displayed in histogram. Also affects statistics displayed, but does not affect normalization.
π Peak calling parameters
peaks=<file>β write the peaks to this file. Default is stdout.minHeight=2β also known ash. Ignore peaks shorter than this.minVolume=5β also known asv. Ignore peaks with less area than this.minWidth=3β also known asw. Ignore peaks narrower than this.minPeak=2β also known asminp. Ignore peaks with an X-value below this.maxPeak=BIGβ also known asmaxp. Ignore peaks with an X-value above this.maxPeakCount=8β also known asmaxpc. Print up to this many peaks (prioritizing height).
β 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 (Last modified October 19, 2017) π«Ά
Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems, or post at: http://seqanswers.com/forums/showthread.php?t=41057
This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
and that's the whole page, bestie π this was bbnorm.sh version 38.43, from April 2019 β slay, periodt, go normalize something β¨πΈπ¦
π¦ where this page comes from
- debian bookworm: bbmap 39.01+dfsg-2 Β· BSD-3-Clause
- debian trixie: bbmap 39.20+dfsg-2 Β· BSD-3-Clause
- ubuntu jammy: bbmap 38.95+dfsg-1 Β· BSD-3-Clause
- ubuntu noble: bbmap 39.06+dfsg-1 Β· BSD-3-Clause
- ubuntu questing: bbmap 39.20+dfsg-2
- ubuntu resolute: bbmap 39.20+dfsg-3 Β· BSD-3-Clause
- ubuntu stonking: bbmap 39.20+dfsg-3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms