# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 bcftools

查看 bcftools 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:bcftools
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bcftools
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bcftools
```

  证据: MacPorts ports tree: science/bcftools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install bcftools
```

  证据: Debian stable package indexes: bcftools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install bcftools
```

  证据: Fedora Rawhide package metadata: bcftools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#bcftools
```

  证据: nixpkgs package indexes: pkgs/by-name/bc/bcftools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install bcftools
```

  证据: openSUSE Tumbleweed package metadata: bcftools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:bcftools
- **软件包管理器:** Homebrew
- **版本:** 1.24
- **来源摘要:** Tools for BCF/VCF files and variant calling from samtools
- **主页:** <https://www.htslib.org/>
- **仓库:** <https://github.com/samtools/bcftools>
- **最后更新:** 2026-07-09T19:52:13Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- bcftools (别名)
- color-chrs.pl (别名)
- gff2gff (别名)
- gff2gff.py (别名)
- guess-ploidy.py (别名)
- plot-roh.py (别名)
- plot-vcfstats (别名)
- roh-viz (别名)
- run-roh.pl (别名)
- vcfutils.pl (别名)
- vrfs-variances (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.24
## 项目历史与用法

bcftools is one of the core command-line toolkits of modern genomics: it reads, writes, filters, queries, summarizes, and calls variants in VCF, BCF, and gVCF formats.

### 项目历史

BCFtools grew out of the SAMtools ecosystem for high-throughput sequencing data. The upstream README says it implements utilities for variant calling, in conjunction with SAMtools, and for manipulating VCF and BCF files, with the intention of replacing Perl-based tools from vcftools.

The Samtools project now presents three related repositories: Samtools for SAM/BAM/CRAM, BCFtools for BCF2/VCF/gVCF and variant calling/filtering/summarising SNPs and short indels, and HTSlib as the underlying C library.

### 采用历史

The 2021 GigaScience paper by the SAMtools/BCFtools authors describes SAMtools and BCFtools as widely used programs for processing and analysing high-throughput sequencing data, first appearing online 12 years earlier and used in many other projects and genomic pipelines.

The same paper reports that both SAMtools and BCFtools had been installed more than one million times via Bioconda, making bcftools a rare CLI package whose package-manager footprint maps directly to scientific infrastructure.

### 使用方式

bcftools is used for file-format conversion and manipulation, sorting, querying, statistics, variant calling, filtering, and effect analysis. In pipelines it commonly appears after alignment and BAM/CRAM processing, where it calls or filters variants into VCF/BCF outputs.

The executable is usually scripted rather than used as a single monolithic command: subcommands such as view, query, filter, stats, mpileup, call, norm, annotate, merge, and concat make it a toolkit for repeatable genomics workflows.

### 为什么软件包爱好者会关心

bcftools is package-nerd significant because it is a dependency-shaped scientific standard: small enough to install as a CLI, but central enough that entire variant-calling workflows assume it is available and versioned consistently.

It is also a good example of package-manager science: Homebrew, Debian, Fedora, MacPorts, Nix, Ubuntu, and Bioconda-style environments turn a research-code lineage into a reproducible command people can pin in workflows, containers, and clusters.

The BCF/VCF domain makes versioning matter. File formats, reference assumptions, compression/indexing via HTSlib, and pipeline reproducibility all mean bcftools is not just a convenience binary; it is part of the scientific record for many analyses.

### 时间线

- 2009: SAMtools/BCFtools lineage begins, per the 2021 'Twelve years' project history.
- 2013: Official GitHub bcftools repository created.
- 2021: GigaScience publishes 'Twelve years of SAMtools and BCFtools'.
- 2020s: bcftools continues as part of the Samtools/HTSlib ecosystem and remains broadly packaged.

### Related projects

- SAMtools handles SAM/BAM/CRAM operations in the same project family.
- HTSlib is the C library used internally for high-throughput sequencing formats.
- vcftools is the older Perl-based toolkit that bcftools was intended to replace for many VCF/BCF operations.
- Bioconda, workflow engines, and containerized genomics environments are major adoption channels.

### 来源

- <https://doi.org/10.1093/gigascience/giab008>
- <https://github.com/samtools/bcftools>
- <https://samtools.github.io/bcftools/bcftools.html>
- <https://www.htslib.org/>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - bcftools - 1.21-1: normalized package name match | Debian stable package indexes: bcftools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | genomic variant calling and manipulation of VCF/BCF files | https://samtools.github.io/bcftools/
- Nix - bcftools: normalized package name match | nixpkgs package indexes: pkgs/by-name/bc/bcftools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bcftools - 1.19-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: bcftools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | genomic variant calling and manipulation of VCF/BCF files | https://samtools.github.io/bcftools/
- dnf - bcftools - 1.24-2.fc45: normalized package name match | Fedora Rawhide package metadata: bcftools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Tools for genomic variant calling and manipulating VCF/BCF files | https://www.htslib.org/
- zypper - bcftools - 1.21-1.5: normalized package name match | openSUSE Tumbleweed package metadata: bcftools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Tools for manipulating variant calls in the Variant Call Format (VCF) | http://www.htslib.org/
- MacPorts - bcftools: normalized package name match | MacPorts ports tree: science/bcftools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/bcftools.yml](https://github.com/mxcl/pkgdb/blob/main/combined/bcftools.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
