#bam #html #plot #vega-lite #vega #file #alignment #plots #fa

app alignoth

A tool for creating alignment plots from bam files

19 releases (6 breaking)

0.8.2 May 10, 2023
0.7.3 Mar 31, 2023
0.6.0 Dec 12, 2022
0.5.2 Oct 26, 2022
0.3.0 Jul 25, 2022

#10 in Biology

Download history 14/week @ 2023-01-28 43/week @ 2023-02-04 31/week @ 2023-02-11 28/week @ 2023-02-18 13/week @ 2023-02-25 10/week @ 2023-03-04 27/week @ 2023-03-11 18/week @ 2023-03-18 17/week @ 2023-03-25 32/week @ 2023-04-01 48/week @ 2023-04-08 20/week @ 2023-04-15 28/week @ 2023-04-22 1/week @ 2023-04-29 360/week @ 2023-05-06 8/week @ 2023-05-13

397 downloads per month

MIT license

1.5K SLoC

GitHub Workflow Status codecov Bioconda downloads Bioconda version install with bioconda Licence


A tool for creating alignment plots from bam files. The generated vega-lite plots are written to stdout per default. An example of a generated plot can be seen here The name alignoth is derived from the visualized alignments combined with the star alioth (usage of vega plots).


alignoth -b path/to/my.bam -r path/to/my/reference.fa -g chr1:200-300 > plot.vl.json

To directly generate a plot in svg, png or pdf format we advice using the vega-cli and vega-lite-cli packages:

alignoth -b path/to/my.bam -r path/to/my/reference.fa -g chr1:200-300 | vl2vg | vg2pdf > plot.pdf

To generate an interactive view within an html file use --html and capture the output to a file:

alignoth -b path/to/my.bam -r path/to/my/reference.fa -g chr1:200-300 --html > plot.html


The following options are available when using alignoth:

argument short explanation default
bam-path -b The bam file to be visualized.
reference -r The path to the reference fasta file
region -g Chromosome and region for the visualization. Example: 2:132424-132924
around -a A chromosome and a base position that will define the region that will be plotted starting 500bp before and end 500bp behind the given position. Example: 2:17348
highlight -h Interval or single base position that will be highlighted in the visualization. Example: 132400-132500 or 132440
plot-all -p Plot all reads in the given region. We advise to only use this command for small bam files with a single target. false
max-read-depth -d Set the maximum rows of reads that will be shown in the alignment plots 500
max-width -w Set the maximum width of the resulting alignment plot 1024
output -o If present, data and vega-lite specs of the generated plot will be split and written to the given directory
data-format -f Sets the output format for the read, reference and highlight data json
spec-output If present vega-lite specs will be written to the given file path
read-data-output If present read data will be written to the given file path
ref-data-output If present reference data will be written to the given file path
highlight-data-output If present highlight data will be written to the given file path
html If present the generated plot will inserted into a plain html file containing the plot centered which is then written to stdout


There a multiple ways to install alignoth:


Rust-Bio-Tools is available via Bioconda. With Bioconda set up, installation is as easy as

conda install alignoth


If the Rust compiler and associated Cargo are installed, alignoth may be installed via

cargo install alignoth


Download the source code and within the root directory of source run

cargo install



~785K SLoC