Home

Awesome

PyPI version DOI DOI Downloads Tests Quality Gate Status

alv: a command-line alignment viewer

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

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

Latest feature additions

Features

Install

Recommended installation is:

pip install --upgrade pip
pip install alv

If you have a half-modern BioPython installed, Python v3.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.

Examples

Quick viewing of a small alignment:

alv msa.fa

This autodetects sequence type (AA, DNA, RNA, coding DNA), colors the sequences, and formats the alignment for easy viewing in your terminal. When applying alv to an alignment of coding DNA, the coding property is autodetected and colors are therefore applied to codons instead of nucleotides. Seven coding DNA sequences

View three sequences, accessions a, b, and c, from an alignment:

alv -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.

Choose to view a sub-alignment:

alv -sa 30 60 msa.fa

This selects and views columns 30 to 59 of msa.fa, keeping track of the "original" columns indexes in the output.

For developers

Screenshots

Full PFAM domain

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

PF00005 seed MSA

Yeast sequences from PF00005

Using the option -sm YEAST, we reduce the alignment to the ones with a matching accession.

Small MSA from PF00005