BBRename
This is an alias script that redirects to rename.sh using pushd
/popd
directory resolution and BASH_SOURCE[0]
symlink handling. It provides identical functionality to rename.sh for backwards compatibility.
Automatic Redirect
The bbrename.sh script is a simple wrapper that calls rename.sh with all the same parameters.
You will be automatically redirected to the complete RENAME documentation in 3 seconds.
If you are not redirected automatically: Click here to go to RENAME documentation
About This Tool
The rename tool (accessible via both rename.sh and bbrename.sh) renames sequencing reads using the jgi.RenameReads
class with multiple concurrent processing strategies:
- Sequential numbering: Uses
ConcurrentReadInputStream
andConcurrentReadOutputStream
to rename reads to<prefix>_<number>
format with thread-safe counter incrementing - Insert size renaming: Calculates insert sizes via
Read.insertSizeMapped()
method and integrates withFASTQ.PARSE_CUSTOM
for custom header generation - Coordinate-based renaming: Uses
IlluminaHeaderParser2.parse()
andappendCoordinates()
methods to extract and reformat Illumina coordinate information - Header trimming: Implements
trim()
andtrimBeforeSymbol()
methods with configurable left/right character removal and symbol-based trimming usinglastIndexOf()
operations - SRA header fixing: Uses
spacePattern.split()
with regex"\\s+"
to parse SRA headers and extract Illumina identifiers from formatted strings
Memory Management: Utilizes ListNum<Read>
collections with concurrent processing, ByteBuilder
for efficient string construction, and optional Quantizer.quantize()
for quality score compression.
For complete parameter documentation and examples, see the full RENAME documentation.
Basic Usage
# Both commands work identically via jgi.RenameReads:
bbrename.sh in=reads.fq out=renamed.fq prefix=sample
rename.sh in=reads.fq out=renamed.fq prefix=sample
# Advanced renaming modes supported:
bbrename.sh in=reads.fq out=renamed.fq renamebyinsert=t
bbrename.sh in=reads.fq out=renamed.fq renamebycoords=t fixsra=t
bbrename.sh in=reads.fq out=renamed.fq trimleft=10 trimright=5
Processing Architecture: Both scripts invoke java -cp bbmap.jar jgi.RenameReads
with 4-buffer concurrent I/O streams, automatic format detection via FileFormat.testInput()
, and configurable compression levels through ReadWrite.setZipThreads()
.
Support
For questions and support:
- Email: bbushnell@lbl.gov
- Documentation: bbmap.org