Skip to main content

Easily configure and run a pipeline to build a tree of virus genomes using UShER

Project description

viral_usher

Viral Usher is a command-line tool to set up and run a pipeline to build an UShER tree for a new viral species (or type, subtype, etc.) using genomes downloaded from NCBI.


🔧 Features

  • Subcommands:
    • init: Generate a config file (interactive or via command line options)
    • build: Download sequences and build a tree, guided by the config file
  • Uses Docker for portability to laptops, servers, or cloud platforms

📦 Installation

  1. Install prerequisites (if not already installed)
  1. Clone the repo:
    git clone https://github.com/AngieHinrichs/viral_usher.git
    cd viral_usher
    
  2. Install the package (again, we highly recommended using an environment manager):
    pip install .
    

🚀 Quickstart

Create a config file with viral_usher init

If you want to start by just naming a virus, and let viral_usher interactively help you identify the right reference sequence, Taxonomy ID etc., then simply run

viral_usher init

and reply to the prompts.

Alternatively, if you already know your parameters, then you can skip the interactive stuff by passing in command line options. Run viral_usher --help to get a listing of options. Here is an example that builds a tree for the Chikungunya virus using RefSeq NC_004162.2, all genomes available from GenBank for the Taxonomy ID associated with NC_004162.2 (Taxonomy ID 37124), plus additional sequences from example/hypothetical_chikungunya.fasta (in this repository):

viral_usher init \
    --refseq NC_004162.2 \
    --workdir chikungunya \
    --fasta example/hypothetical_chikungunya.fasta \
    --config chikungunya/config.toml

Build a tree using config file with viral_usher build:

Continuing the Chikungunya virus example:

viral_usher build --config chikungunya/config.toml

That's all! viral_usher will create the following files in workdir (chikungunya in our example):

  • a tree in UShER protobuf format (optimized.pb.gz)
  • a metadata file in TSV format (metadata.tsv.gz)
  • a Taxonium tree file that you can view using https://taxonium.org/ (tree.jsonl.gz)

To view the example Chikungunya virus tree in Taxonium, click here. Type or copy-paste "hypothetical" into Taxonium's Name search input to find the sequences from example/hypothetical_chikungunya.fasta.


🧪 Development

Install dev dependencies

pip install -e .[dev]

Run tests

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viral_usher-0.2.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viral_usher-0.2.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file viral_usher-0.2.0.tar.gz.

File metadata

  • Download URL: viral_usher-0.2.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for viral_usher-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2951a3fea8ddee5a4d2c615996d0ba90d48c94fe0c2c0c9f26cb793c1af05d6b
MD5 4b14ebefd1a40404a7b187de586a523a
BLAKE2b-256 f86b47fe5dbe19d82d6f3045703c0f1cc5962dd3ab5047222d2c6db3d31aba6d

See more details on using hashes here.

File details

Details for the file viral_usher-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: viral_usher-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for viral_usher-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9358450898dff4ba053f0ff397e53c7db8bb3c62f22d91eb0e2f485206b76790
MD5 ca77d0bbb5e933a79ee60122e477d58f
BLAKE2b-256 4c2e561d33032b10a086ac8ef751010fee18b7e1cfff16a3bad2e9f942212713

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page