alv
alv: a console-based viewer for molecular sequence alignments - Published in JOSS (2018)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
2 of 9 committers (22.2%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
A console-based alignment viewer
Basic Info
- Host: GitHub
- Owner: arvestad
- License: gpl-3.0
- Language: Python
- Default Branch: master
- Size: 5.11 MB
Statistics
- Stars: 116
- Watchers: 2
- Forks: 15
- Open Issues: 1
- Releases: 11
Metadata Files
README.md
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
- If you have more than one alignment in your input file, then the first alignment is output unless you use the --alignment-index (-ai) option to choose another.
alvis now adapted for use in Python notebooks (tested on Jupyter) through two convenience functions 'view' and 'glimpse'. Both functions take a BioPython alignment object and outputs a view of the alignment.
Writing
from Bio import AlignIO
msa = AlignIO.read('PF00005.fa', 'fasta')
import alv
alv.view(msa)
in a Jupyter notebook cell and evaluating will yield a colored alignment in the alv style.
For large alignments, the glimpse function is convenient since a subset of the alignment, selected
as an easily detected conserved region, is shown.
alv.glimpse(msa)
Look for more usage information view help(alv.view) in a notebook cell.
Features
- Command-line based, no GUI, so easy to script viewing of many (typically small) MSAs.
- Reads alignments in FASTA, Clustal, PHYLIP, NEXUS, and Stockholm formats, from file or
stdin. - 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.
- Focus on variable columns with the options
--only-variableand--only-variable-excluding-indels, contributed by nikostr, that constrains coloring to columns with variation and variation not counting indels. - The command
alv -g huge_msa.fadisplays cut-out of the MSA, guaranteed to fit one terminal page without scrolling or MSA line breaking, that is supposed to give you an idea of alignment quality and contents. - Write
alv -r 20 huge_msa.fato get a view of the MSA containing only 20 randomly selected sequences.
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 automatically with pip install alv
if you are using Python v3.6 or later, because BioPython was apparently not on PyPi before that.
Install the commandline tool system-wide
If you would like to install the alv commandline tool system-wide, so that it
is accessible regardless of which python environment you have loaded, or if you
have loaded one at all, one way to do this is using the
pipx installer.
After installing pipx using it's official installation
instructions you
can install alv with:
pipx install alv
After this, alv should be available as a command regardless of Python
environment.
(Note that this only works for installing the alv commandline tool, not the
Python library!)
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.

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
- Run
pip install -e .to get an "editable" install, while coding. - Run
python -m buildto prepare a distributable file.
Screenshots
Full PFAM domain
All of the sequences in PFAM's seed alignment for PF00005

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

Owner
- Name: Lars Arvestad
- Login: arvestad
- Kind: user
- Location: Kräftriket, Stockholm
- Company: Stockholm University
- Website: https://www.su.se/english/profiles/arve-1.232358
- Repositories: 16
- Profile: https://github.com/arvestad
JOSS Publication
alv: a console-based viewer for molecular sequence alignments
Authors
Tags
bioinformatics console multiple sequence alignment DNA RNA proteinCitation (CITATION.cff)
cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Arvestad
given-names: Lars
orcid: https://orcid.org/0000-0001-5341-1733
title: "alv: a console-based viewer for molecular sequence alignments"
version: 1.0.5
doi: https://doi.org/10.21105/joss.00955
date-released: 2018-08-12
GitHub Events
Total
- Issues event: 1
- Watch event: 8
- Issue comment event: 7
- Push event: 8
- Pull request event: 6
- Fork event: 1
Last Year
- Issues event: 1
- Watch event: 8
- Issue comment event: 7
- Push event: 8
- Pull request event: 6
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| arvestad | a****e@m****e | 118 |
| arvestad | a****e@c****e | 109 |
| Joon-Klaps | j****s@k****e | 9 |
| Nikos Tsardakas Renhuldt | n****r | 6 |
| Lars Arvestad | a****e@a****e | 6 |
| SimonGreenhill | s****n@s****z | 2 |
| Samuel Lampa | s****a@s****e | 1 |
| Edward Davis | ed@c****u | 1 |
| Lars Arvestad | l****d@s****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 17
- Total pull requests: 20
- Average time to close issues: about 2 months
- Average time to close pull requests: about 13 hours
- Total issue authors: 14
- Total pull request authors: 6
- Average comments per issue: 3.59
- Average comments per pull request: 1.8
- Merged pull requests: 18
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 6
- Average time to close issues: about 19 hours
- Average time to close pull requests: 1 day
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 1.5
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- schultzm (2)
- nikostr (2)
- karinlag (2)
- multimeric (1)
- davised (1)
- stx-tiffhu (1)
- jrjhealey (1)
- roey-angel (1)
- katieemelianova (1)
- rtviii (1)
- SimonGreenhill (1)
- jakobnissen (1)
- Joon-Klaps (1)
- camilogarciabotero (1)
Pull Request Authors
- arvestad (13)
- Joon-Klaps (4)
- nikostr (3)
- samuell (2)
- davised (1)
- SimonGreenhill (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 252 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 19
- Total maintainers: 1
pypi.org: alv
A console-based sequence alignment viewer
- Homepage: https://github.com/arvestad/alv
- Documentation: https://alv.readthedocs.io/
- License: GNU General Public License v3 (GPLv3)
-
Latest release: 1.8.0
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- biopython >=1.70
- colorama >=0.3.8
