From c099e16755c59e8f793ba9eab66ffd080ceb0937 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:41:59 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20add=20seqkit=20as=20external=20d?= =?UTF-8?q?ependency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 2 +- augur/merge.py | 4 ++++ docs/installation/non-python-dependencies.rst | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89285e166..8671de526 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,7 +63,7 @@ jobs: - name: Install dependencies from Conda uses: mamba-org/setup-micromamba@v1 with: - create-args: mafft raxml fasttree iqtree vcftools sqlite tsv-utils biopython=${{ matrix.biopython-version }} python=${{ matrix.python-version }} + create-args: mafft raxml fasttree iqtree vcftools seqkit sqlite tsv-utils biopython=${{ matrix.biopython-version }} python=${{ matrix.python-version }} condarc: | channels: - conda-forge diff --git a/augur/merge.py b/augur/merge.py index 1ce3a9495..a69125057 100644 --- a/augur/merge.py +++ b/augur/merge.py @@ -272,6 +272,10 @@ def cat(filepath: str): def merge_sequences(args): + # Confirm that seqkit is installed. + if which("seqkit") is None: + raise AugurError("'seqkit' is not installed! This is required to merge sequences.") + # Parse --sequences arguments if not len(args.sequences) >= 2: raise AugurError(f"At least two sequence inputs are required for merging.") diff --git a/docs/installation/non-python-dependencies.rst b/docs/installation/non-python-dependencies.rst index 30f520b10..a1cba1fdb 100644 --- a/docs/installation/non-python-dependencies.rst +++ b/docs/installation/non-python-dependencies.rst @@ -8,7 +8,7 @@ Augur uses some external bioinformatics programs that are not available on PyPI: - `RAxML `__ (optional alternative) - `FastTree `__ (optional alternative) -- ``augur merge`` requires ``sqlite3``, the `SQLite `__ CLI (version ≥3.39). +- ``augur merge`` requires ``sqlite3`` (the `SQLite `__ CLI (version ≥3.39)) for metadata and ``seqkit`` for sequences. - Bacterial data (or any VCF usage) requires `vcftools `__ @@ -20,19 +20,19 @@ If you use Conda, you can install them in an active environment: .. code:: bash - conda install -c conda-forge -c bioconda mafft raxml fasttree iqtree vcftools sqlite --yes + conda install -c conda-forge -c bioconda mafft raxml fasttree iqtree vcftools seqkit sqlite --yes On macOS using `Homebrew `__: .. code:: bash brew tap brewsci/bio - brew install mafft iqtree raxml fasttree vcftools sqlite + brew install mafft iqtree raxml fasttree vcftools seqkit sqlite On Debian/Ubuntu: .. code:: bash - sudo apt install mafft iqtree raxml fasttree vcftools sqlite3 + sudo apt install mafft iqtree raxml fasttree vcftools seqkit sqlite3 Other Linux distributions will likely have the same packages available, although the names may differ slightly.