Giter Club home page Giter Club logo

alignoth's Introduction

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

alignoth

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

Usage

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

Arguments

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
aux_tag -x Displays the given content of the aux tag in the tooltip of the plot. Multiple usage for more than one tag is possible.
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

Installation

There a multiple ways to install alignoth:

Bioconda

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

conda install alignoth

Cargo

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

cargo install alignoth

Source

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

cargo install

Authors

alignoth's People

Contributors

dependabot[bot] avatar felixmoelder avatar fxwiegand avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

skiyaga

alignoth's Issues

Add editable read list in embedded view

The embedded view should contain a list widget where the user is able to add reads by clicking on them in the plot. When selecting the read in the list it should be highlighted in the plot. Of course there should be the option to remove reads from the list as well.

Add filter for read name option for embedded plots

The html embedded plots should have a filter option that filters the alignment plots. This could be potentially solved with vega-lites own filter function so the filter ui will be generated automatically.

error when visuzlization

Hello Team,

what could be the error here:
thread 'main' panicked at 'called Option::unwrap() on a None value', /storage/home/hcoda1/4/jzhao399/.cargo/registry/src/github.com-1ecc6299db9ec823/alignoth-0.6.0/src/plot.rs:30:58
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Thanks,

Jianshu

Rearrange paired reads in plot view

Currently paired reads are always placed in the same row in the plot even if they overlap. If they do overlap the mate should be placed in the row below and if possible with vega-lite connected via a thin zig zag line.

Add option that allows plotting a full bam file

This should allow omitting the region in the command line call and should only be used for small bams. The region to be plotted can be retrieved from the first and last read of the bam file. If the file contains reads from multiple chroms or > 100000 reads an error should occur.

Panic when using -d option

There seems to be a problem when using the subsample option:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/plot.rs:352:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Support for tsv output files

For easier integration and usage with datavzrd, alignoth should be able to output read, reference and highlight data in tsv format. This should be solved by adding a new parameter to the cli interface: --data-format [json|tsv].

Add new parameter around

The new --around parameter should allow the user to generate a plot around the given base position +-500bp.

Show some example in the README

Hello,

I'm quite interested in your project but I think it would be nice to have an idea of the output plots in the README.

Have a nice day :)

Display other annotations with alignments

It would be fantastic if Alignoth could also display other annotation tracks, such as features from a GFF or BED file.

I'm not sure if this is out of scope for your vision of the tool, but it seems like a promising replacement for clunky IGV batch screenshots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.