NAME

Bioconda::Packages - Query a bundled snapshot of Bioconda package metadata.

SYNOPSIS

use Bioconda::Packages;

my $bp = Bioconda::Packages->new;          # loads the bundled database

if ($bp->exists('samtools')) {
    my $pkg = $bp->get('samtools');
    print $pkg->current_version, "\n";     # 1.25
    print "$_\n" for $pkg->dependency_names('run');
}

my @hits = $bp->search('aligner');         # name/summary substring match
my @users = $bp->reverse_dependencies('zlib');
my @gone  = $bp->removed;                   # packages dropped from bioconda

DESCRIPTION

Bioconda::Packages gives offline, read-only access to a snapshot of Bioconda package metadata: versions, dependencies, licenses, summaries and homepage/URLs. The snapshot is a JSON database shipped with the distribution and rebuilt by the maintainer tooling (see Bioconda::Packages::Updater and the maintainer/ scripts). No network access is needed at query time.

Packages that disappear from bioconda-recipes are retained in the database and flagged as removed (see "removed" and is_removed on Bioconda::Packages::Package), so historical lookups keep working.

METHODS

new

my $bp = Bioconda::Packages->new;
my $bp = Bioconda::Packages->new(db => '/path/to/db.json');

Loads the database. Options:

db

Explicit path to a JSON database. Defaults to the bundled database (see "locate_db" in Bioconda::Packages::DB).

db_path

Path to the database file that was loaded.

meta

The database meta hashref (generation time, commit, counts).

db_version

The database snapshot version, a CalVer/SemVer string like 2026.11.1 (year.month.progressive). Sortable under SemVer rules. Returns undef for a database built before versions were stamped.

exists

$bp->exists('samtools');

True if the (case-insensitive) package name is in the database, including removed packages.

get

my $pkg = $bp->get('samtools');

Returns a Bioconda::Packages::Package object, or undef if unknown.

list

my @names = $bp->list;                       # all current (non-removed)
my @names = $bp->list(include_removed => 1);  # everything

Returns a sorted list of package names.

count

my $n = $bp->count;                          # current packages
my $n = $bp->count(include_removed => 1);

removed

my @names = $bp->removed;

Sorted list of packages flagged as removed from bioconda-recipes.

my @names = $bp->search('aligner');
my @names = $bp->search(qr/align/i);
my @names = $bp->search('align', fields => ['name']);
my @names = $bp->search('align', include_removed => 1);

Case-insensitive substring (or regex) search over package name and summary by default. Returns a sorted list of matching package names.

reverse_dependencies

my @users = $bp->reverse_dependencies('zlib');
my @users = $bp->reverse_dependencies('zlib', kind => 'host');
my @users = $bp->reverse_dependencies('zlib', kind => 'all');

Returns the sorted names of packages that depend on the given package. kind is run (default), build, host, or all.

stats

my %s = $bp->stats;

Returns a hash of summary counts: total, current, removed, noarch, plus the database generated_at and recipes_commit when present.

SEE ALSO

Bioconda::Packages::Package, Bioconda::Packages::Updater, Bioconda::Packages::RecipeParser, https://bioconda.github.io.

AUTHOR

Andrea Telatin