# 使用 Homebrew, apt, MacPorts, Nix 安装 mafft

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

## 安装

```sh
sudo av install brew:mafft
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mafft
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mafft
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install mafft
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#mafft
```

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

## 软件包事实

- **软件包键:** brew:mafft
- **软件包管理器:** Homebrew
- **版本:** 7.526
- **来源摘要:** Multiple alignments with fast Fourier transforms
- **主页:** <https://mafft.cbrc.jp/alignment/software/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- einsi (别名)
- fftns (别名)
- fftnsi (别名)
- ginsi (别名)
- linsi (别名)
- mafft (别名)
- mafft-distance (别名)
- mafft-einsi (别名)
- mafft-fftns (别名)
- mafft-fftnsi (别名)
- mafft-ginsi (别名)
- mafft-homologs.rb (别名)
- mafft-linsi (别名)
- mafft-nwns (别名)
- mafft-nwnsi (别名)
- mafft-profile (别名)
- mafft-qinsi (别名)
- mafft-sparsecore.rb (别名)
- mafft-xinsi (别名)
- nwns (别名)
- nwnsi (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

MAFFT is a multiple sequence alignment program for amino acid or nucleotide sequences. The official site describes MAFFT version 7 as software for Unix-like operating systems with a range of methods, including accurate L-INS-i for smaller alignments and fast FFT-NS-2 for larger sequence sets.

### 项目历史

MAFFT originated as a fast Fourier transform-based approach to multiple sequence alignment, described in the 2002 Nucleic Acids Research paper cited by the official site. Subsequent official references trace major method and usability improvements through version 5, version 6, version 7, PartTree for large alignments, RNA structural alignment, multithreading, adding unaligned sequences, over-alignment control, large-data workflows, MPI parallelization, and MAFFT-DASH.

The official manual documents MAFFT as a Unix-style command-line program with aliases such as `linsi`, `ginsi`, `einsi`, `fftnsi`, `fftns`, `nwns`, and `mafft-profile`, each exposing a different speed/accuracy tradeoff.

### 采用历史

MAFFT became a standard bioinformatics command-line package because it covers both routine and high-accuracy multiple sequence alignment workflows. The official site links to web services at EBI, MPI Bioinformatics Toolkit, GenomeNet, SIB MyHits, T-REX, DDBJ WABI, and CIPRES, showing adoption beyond a single downloadable CLI.

Package managers matter for MAFFT because alignment tools are commonly installed into reproducible research environments, HPC systems, and workflow managers. The supplied package facts show distribution through Homebrew, Debian, MacPorts, Nix, and Ubuntu, while the official site maintains source, Linux, macOS, and Windows download paths.

### 使用方式

The basic invocation is `mafft input > output` with FASTA input. The official site recommends `mafft-linsi input > output` as an accurate option for up to roughly 200 sequences and `mafft input > output` as a fast option for larger alignments, with `mafft --auto input > output` for automatic strategy selection.

The manual organizes MAFFT around algorithm families: accuracy-oriented L-INS-i, G-INS-i, and E-INS-i; speed-oriented FFT-NS and NW-NS variants; PartTree for very large sequence counts; and profile alignment for group-to-group workflows.

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

MAFFT is one of those scientific CLI packages that anchors entire downstream workflows. It matters to package maintainers because it has many executable aliases, platform-specific source/binary packaging, a long citation trail, and users who care about exact version behavior for reproducibility.

Its history also illustrates a common bioinformatics packaging pattern: a command-line core, official web services, and many package-manager builds coexisting because researchers need both interactive alignment services and scriptable local installs.

### 时间线

- 2002: Official references cite the original MAFFT fast Fourier transform alignment method in Nucleic Acids Research.
- 2005: Official references cite MAFFT version 5 accuracy improvements.
- 2007: Official manual updated on Jun 9, 2007.
- 2008: Official references cite recent developments outlining version 6.
- 2010: Official references cite multithreaded MAFFT.
- 2013: Official references cite MAFFT version 7 performance and usability improvements.
- 2018: Official references cite MPI parallelization for large-scale alignments.
- 2019: Official references cite MAFFT-DASH and the MAFFT online service.
- 2024: Official site lists MAFFT 7.526 as the latest version in Apr 2024.

### Related projects

- MAFFT is related to ClustalW, T-Coffee, PRRN, GenomeNet alignment services, EBI and MPI MAFFT servers, Jalview, Pfam, BioRuby, Vienna RNA package extensions, MXSCARNA, and ProbConsRNA, many of which are linked or referenced from the official site.

### 来源

- <https://gitlab.com/sysimm/mafft>
- <https://mafft.cbrc.jp/alignment/software/>
- <https://mafft.cbrc.jp/alignment/software/manual/manual.html>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - mafft - 7.505-1: normalized package name match | Debian stable package indexes: mafft from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Multiple alignment program for amino acid or nucleotide sequences | https://mafft.cbrc.jp/alignment/software/
- Nix - mafft: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/mafft/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mafft - 7.505-1: normalized package name match | Ubuntu 24.04 LTS package indexes: mafft from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Multiple alignment program for amino acid or nucleotide sequences | https://mafft.cbrc.jp/alignment/software/
- MacPorts - mafft: normalized package name match | MacPorts ports tree: science/mafft/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/mafft.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mafft.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
