BBVersion
Prints the BBTools version number. Add an argument to print the version name too.
Basic Usage
bbversion.sh
This simple utility displays the current BBTools version. With no arguments, it prints only the version number. With any argument, it also displays the version name.
Parameters
This tool accepts optional arguments to control output format:
Optional Arguments
- [any argument]
- When any argument is provided (such as "name" or "verbose"), the tool will print both the version number and version name instead of just the version number.
Examples
Display Version Number Only
bbversion.sh
Output: 39.33
This displays only the numerical version of BBTools currently installed.
Display Version Number and Name
bbversion.sh name
Output:
39.33
Bump33
This displays both the version number (39.33) and the version name (Bump33) on separate lines.
Use Any Argument for Verbose Output
bbversion.sh verbose
bbversion.sh anything
bbversion.sh 1
Any of these commands will produce the same verbose output showing both version number and name. The specific argument doesn't matter - any argument triggers the extended display.
Integration in Scripts
# Store version in variable
VERSION=$(bbversion.sh)
echo "Running BBTools version: $VERSION"
# Check if specific version
if [[ $(bbversion.sh) == "39.33" ]]; then
echo "Correct version detected"
fi
Useful for version checking in bioinformatics pipelines and scripts.
Algorithm Details
BBVersion is a minimal utility that provides version information for the BBTools suite:
Implementation
- Version Storage: Version information is centrally maintained in the
shared.Shared
class as static String constants - Version Number: Retrieved via
Shared.BBTOOLS_VERSION_STRING
in XX.XX format (currently "39.33") - Version Name: Retrieved via
Shared.BBMAP_VERSION_NAME
providing release codename (currently "Bump33") - Memory Allocation: JVM launched with
-Xmx80m
parameter limiting maximum heap to 80MB - Execution Logic:
System.out.println()
prints version string unconditionally, adds version name viaargs.length>0
check
Version Information System
The version system in BBTools uses centralized constants in the shared.Shared
class:
- Static Constants:
BBTOOLS_VERSION_STRING
andBBMAP_VERSION_NAME
defined as public static String fields - Single Point Update: Version constants updated in one location affect all 250+ BBTools utilities
- Decimal Format: Version numbers use X.XX format rather than X.Y.Z semantic versioning
- Dual Identification: Each release contains both numeric version (39.33) and codename (Bump33)
Use Cases
- Pipeline Validation: Verify correct BBTools version is installed before running analyses
- Bug Reporting: Include version information when reporting issues
- Compatibility Checking: Ensure tools are compatible with expected version
- Documentation: Track which version was used for specific analyses
- Automation: Programmatically check version in scripts and workflows
Performance Characteristics
- Startup Time: JVM initialization plus static field access (typically <100ms)
- Memory Usage: 80MB heap limit enforced by
-Xmx80m
JVM parameter - I/O Operations: Two
System.out.println()
calls writing to stdout buffer - Dependencies: Requires
driver.BBVersion
class andshared.Shared
constants
Technical Notes
Version Format
BBTools uses a decimal version format (X.XX) rather than semantic versioning (X.Y.Z). This provides:
- Clear progression of releases
- Simple comparison for version checking
- Consistent formatting across documentation
Release Names
Each version includes a release name (like "Bump33") that:
- Makes versions memorable for users
- Helps distinguish between releases in discussions
- Provides context for major feature releases
Integration
The bbversion tool integrates seamlessly with:
- Shell scripts and pipelines
- Cluster job management systems
- Docker and container environments
- Bioinformatics workflow managers
Support
For questions and support:
- Email: bbushnell@lbl.gov
- Documentation: bbmap.org