Skip to main content

A console-based sequence alignment viewer

Project description

[![PyPI version](]( [![Build Status](]( # alv: a command-line alignment viewer

View you DNA or protein multiple-sequence alignments right at your command line. No need to launch a GUI!

Note: alv requires Python v3.4 or later. Earlier versions may also work, but this have not been tested.


  • Command-line based, no GUI, so easy to script viewing of many (typically small) MSAs.

  • Reads alignments in FASTA, Clustal, PHYLIP, and Stockholm formats.

  • Output is formatted to suit your terminal. You can also set the alignment width with option -w.

  • Can color alignments of coding DNA by codon’s translations to amino acids.

  • Guesses sequence type (DNA/RNA/AA/coding) by default. You can override with option -t.

  • Order sequence explicitly, alphabetically, or by sequence similarity.

  • Restrict coloring to where you don’t have indels or where there is a lot of conservation.

## Examples

Quick viewing of a small alignment: ` alf msa.fa ` This autodetects sequence type (AA, DNA, RNA, coding DNA), colors the sequences, and formats the alignment for easy viewing in your terminal.

View three sequences, accessions a, b, and c, from an alignment: ` alf -so a,b,c msa.fa `

Feed alignment to less, for paging support. ` alv -k msa.fa | less -R ` The -k option ensures that alv keeps coloring the alignment (by default, piping and redirection removes colors), and the -R option instructs less to interpret color codes.

## Install

Recommended installation is with pip install alv.

If you have a half-modern BioPython installed, 3.4 _should_ work. BioPython is a dependency and will only get installed automatially with pip install alv if you are using Python v3.6 or later, because BioPython was apparently not on PyPi before that.

## For developers

Run python develop test for development install and to execute tests.

## Screenshot

### Full PFAM domain

All of the sequences in PFAM’s seed alignment for PF00005

![PF00005 seed MSA](

### Ten peptide sequences from PF00005

![MSA from PF00005](

### Seven coding DNA sequences

alv is autodetecting that the given DNA sequences are coding and therefore colors codons instead of nucleotides. ![Sample screenshot](

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

alv-1.1.0.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

alv-1.1.0-py3-none-any.whl (20.3 kB view hashes)

Uploaded Python 3

Supported by

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