Simple terminal alignment viewer

Related tags

Command-line alen
Overview

Alen

Simple terminal sequence alignment viewer.

Screenshot

What is Alen?

It's a command-like program to view DNA or protein alignments in FASTA formats. Alen is meant for having a quick view of an alignment without having to leave the shell. It's not an alignment editor.

How to install and run.

Alen should work on most Unix systems, and Windows 10. If someone asks me to, I might add Windows 7 and 8 support. You can get it by downloading it from here and compiling it using Cargo. If people ask me to, I might upload precompiled binaries.

How to use

Simple usage:

$ alen /path/to/alignment.fasta

Note that Alen loads in the entire alignment into memory, so don't use it for multi-gigabyte files. Alen will auto-detect whether the alignment is a nucleotide or amino acid. For more help, type alen --help in the terminal.

Commands

  • Esc / q / Control-C: Quit
  • c: Toggle consensus sequence comparison
  • r: Re-render the screen.
  • Ctrl-f: Search. Searches headers, then sequences for regex, case insensitively.
  • Ctrl-j: Jump to column.
  • Arrow keys: Move 1 column/row
  • Shift-Arrow keys: Move 10 columns/rows
  • Ctrl-Arrow keys: Move to first/last column/row

Configuration

No.

Why the name?

First, it's to pun on the unimaginative named alan and alv. Second, alen means cubit in Danish. Like using cubits, Alen is simple, crude, but usually good enough.

Comments
  • Implement CI with GitHub Actions

    Implement CI with GitHub Actions

    Steps

    • [x] PR job which runs a build, rustfmt, and clippy
    • [x] Master build job with status badge in README.md
    • [x] New release job, which builds a Changelog from commit history and opens a draft release
    • [x] New release job attaches pre-built binaries for Linux
    • [x] New release job attaches pre-built binaries for MacOS (x86_64)

    I'm a big believer that every open source project destined for success must make contributions (and maintenance) easy. A solid CI is a cornerstone of that.

    If you can spare a week or two, I'd offer to do this for you.

    opened by jhwgh1968 8
  • Alignment::calculate_order should operate on original_index of entries

    Alignment::calculate_order should operate on original_index of entries

    Currently it operates on the current index of entries, not the original index. This causes mis-sorting if the input sequences were already permuted before the order is calculated.

    opened by jakobnissen 1
  • Add New Release Workflow to GHA

    Add New Release Workflow to GHA

    The next step of #2.

    The next time you want to release a new version, simply push a git tag of the new version. It must be of format vN.N.N (And it does have to be all three point versions, unlike your first release tag.)

    That will trigger this workflow. It does these steps:

    1. Generates a changelog from the previous tag, based on git history
    2. Creates a new GitHub release draft (for you to manually review and publish), with the changelog in the the description
    3. Builds MacOS X (Intel) and Linux (x86_64) builds, ZIPs them up with license and readme
    4. Attaches the ZIP files to the release as assets

    If you see the draft release but no builds attached, and the master branch was indeed passing, just wait 5 minutes and try again. Due to action dependencies, the job creates the draft release first, then starts on the binary builds.

    You can see an example workflow run here.

    opened by jhwgh1968 0
  • Create master GHA workflow (includes PRs)

    Create master GHA workflow (includes PRs)

    The next part of #2.

    This also adds a couple badges to the README. In my experience, these help people understand the state of the project, and may (tacitly) encourage contributions.

    opened by jhwgh1968 0
  • Add GitHub Actions CI for Basic Pull Requests

    Add GitHub Actions CI for Basic Pull Requests

    The first step on #2.

    The CI will not run until the files are committed to master. Here is a run to show you what it will look like.

    I also ran rustfmt, because the CI now requires code to pass both it and clippy. If you don't like the changes it made, let me know. Some parameters can be tweaked.

    opened by jhwgh1968 0
  • modified RNA residues not working correctly

    modified RNA residues not working correctly

    Hi, i wanted to say thank you for making this alignment viewer, i really like it!

    I have had some problems viewing MSAs of RNAs with modified residues. The problem seems to be that with all the modified RNA residues that exist, the sequences contain a lot of unusual characters.

    A database of modified RNA residues can be found here: https://iimcb.genesilico.pl/modomics/modifications

    There seem to be two problems as far as i can see

    • unicode characters, e.g. °
    >tdbR00000266|Bos_taurus|9913|Leu|°AA
    -GUCAGLAUGLCMGAGU--GGDCPAAGGCLCCAGACU°AAKPPCUGGJ-CPCC---GUAU----GGAGG-?GUGGGTPCG"AUCCCACUUCUGACACCA
    

    Error message:

    ERROR when loading FASTA: Not all input sequences are the same length. Expected sequence length 99, seq "tdbR00000266|Bos_taurus|9913|Leu|°AA" has length 100.
    
    • autodetection trying to interpret sequences as amino-acids
    >tdbR00000270|Avian_myeloblastosis_virus|11866|Met|BAU
    -GCCUCCUUALCGCAGDA-GGN--AGCGCRPCAGPCUBAU6APCUGAAG-------------------7D??UGAGTPCG"ACCUCAGAGGGGGCACCA
    

    Error message:

    ERROR when loading FASTA: Sequence "tdbR00000270|Avian_myeloblastosis_virus|11866|Met|BAU" cannot be understood as amino acids.
    

    My suggestion would be to have additional command-line options to

    • allow unicode
    • force dna, rna, aa mode without autodetect

    Not sure how to deal with it in visualisation. I guess one color for any nonstandard RNA base would be ok.

    What do you think? I could try and make the changes if you agree

    Data source:

    Data was downloaded from tRNAdb:

    http://trna.bioinf.uni-leipzig.de/DataOutput/Search

    On the Search Database page, choose tRNA sequences and then press the search database button. This will return RNA sequences with modified sequences. You can save them by selecting the select all sequences of search checkbox on the search results page, and then saving the sequences by choosing Download alignment in the drop down button next to the checkbox.

    opened by marcom 3
  • Work with stdin

    Work with stdin

    It would be nice to work with stdin, but unfortunately, crossterm does not seem to support it at the moment.

    As soon as crossterm fixes the issue or provide a workaround, implement reading from stdin.

    opened by jakobnissen 0
Releases(v0.3.1)
  • v0.3.1(May 3, 2022)

    v0.3.1

    • New feature: Row ordering. When in select mode, press o to order rows so similar sequences (by Jaccard distance) are next to each other. Press r to reset order to the original order of the input file.
    • Switched back to clap for argument parsing
    • Optimization: alen now loads significantly faster.
    • Optimization: Consensus calculation is deferred until asked to, then cached. Consensus calculation is also much faster
    • Optimization: The alen binary is now smaller
    • Various bug fixes

    Changelog

    • Change Alignment's order field to vec u32 from usize
    • Disregard terminal gaps for jaccard distance
    • Cache ordering after computation
    • Refactor rows out to Entry struct
    • Add feature: Order rows
    • Re-enable stripping of binary
    • Let filename be OsString, not String
    • Switch to clap
    • Fix bug: Forgot to uppercase in cons calc
    • Handle unicode slightly better
    • Make consensus calculation faster and lazier
    • Update screenshot
    • Fix logic bug introduced in #1f39295
    • Simplify validate_alphabet
    • Validate alphabet lazier
    • Make clippy happy
    • Iterate seqs in memory order for consensus creation
    Source code(tar.gz)
    Source code(zip)
    alen-v0.3.1-linux-amd64.zip(833.49 KB)
    alen-v0.3.1-osx.zip(720.13 KB)
  • v0.3.0(Feb 13, 2022)

  • v0.2.0(Jul 13, 2021)

  • v0.1(Jun 26, 2021)

Owner
Jakob Nybo Nissen
Bioinformatician at Statens Serum Institut, Denmark
Jakob Nybo Nissen
hexyl is a simple hex viewer for the terminal. It uses a colored output to distinguish different categories of bytes

hexyl is a simple hex viewer for the terminal. It uses a colored output to distinguish different categories of bytes (NULL bytes, printable ASCII characters, ASCII whitespace characters, other ASCII characters and non-ASCII).

David Peter 7.3k Dec 29, 2022
Rust crate `needleman_wunsch` of the `fasebare` package: reading FASTA sequences, Needleman-Wunsch alignment

fasebare Rust crate needleman_wunsch of the fasebare package: reading FASTA sequences, Needleman-Wunsch alignment. Synopsis The crate needleman_wunsch

Laurent Bloch 2 Nov 19, 2021
A tool to filter sites in a FASTA-format whole-genome pseudo-alignment

Core-SNP-filter This is a tool to filter sites (i.e. columns) in a FASTA-format whole-genome pseudo-alignment based on: Whether the site contains vari

Ryan Wick 15 Apr 2, 2023
A simple cross-platform easy to use STL Viewer with GUI and CLI options

Stlvi STL viewer written in Rust. This project is still in development. It is available in both CLI and GUI mode. Supported OS Linux Windows Mac Scree

Mantresh Khurana 4 Mar 2, 2023
TUI image viewer

Picterm TUI image viewer install $ cargo install picterm or $ git clone https://github.com/ksk001100/picterm $ cd picterm $ cargo install --path . usa

Keisuke Toyota 41 Dec 31, 2022
A SARIF viewer for the command-line.

sarif_cli A SARIF viewer for the command-line. Because numerous static analysis tools, such as #CodeQL and #semgrep, use the SARIF format. I decided t

Jordy Zomer 3 Jan 3, 2023
An AST viewer UI for languages with an AST.

AST Viewer UI This project was inspired by "Zoom Out": The missing feature of IDEs. I want to create a GUI with text fields, boxes, arrows, etc. and g

West 3 Dec 22, 2022
A ranger-like flake.lock viewer [maintainer=@figsoda]

nix-melt A ranger-like flake.lock viewer Usage nix run github:nix-community/nix-melt Usage: nix-melt [OPTIONS] [PATH] Arguments: [PATH] Path to th

Nix community projects 120 Jun 28, 2023
mhv is a minimalist hexadecimal viewer.

MHV How it works? The color legend ⬛ Null byte ?? ASCII Printable Characters ?? Space Characters ?? Control Characters ?? ASCII Extended Codes Install

Júlio César de Brito Gardona 11 Dec 3, 2023
A simple and efficient terminal UI implementation with ratatui.rs for getting quick insights from csv files right on the terminal

CSV-GREP csv-grep is an intuitive TUI application writting with ratatui.rs for reading, viewing and quickly analysing csv files right on the terminal.

Anthony Ezeabasili 16 Mar 10, 2024
A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.

Terminal Media Player View images, videos (files or YouTube links), webcam, etc directly in the terminal as ASCII. All images you see below are just m

Max Curzi 36 May 8, 2023
ask.sh: AI terminal assistant that can read and write your terminal directly!

ask.sh: AI terminal assistant that read from & write to your terminal ask.sh is an AI terminal assistant based on OpenAI APIs such as GPT-3.5/4! What'

hmirin 5 Jun 20, 2023
A dead simple ANSI terminal color painting library for Rust.

yansi A dead simple ANSI terminal color painting library for Rust. use yansi::Paint; print!("{} light, {} light!", Paint::green("Green"), Paint::red(

Sergio Benitez 169 Dec 25, 2022
(Rust) Coloring terminal so simple you already know how to do it !

Colored Coloring terminal so simple, you already know how to do it! "this is blue".blue(); "this is red".red(); "this is red on blue".red(

Thomas Wickham 1.2k Jan 4, 2023
Simple Interactive Terminal Todo App in Rust

todo-rs Simple Interactive Terminal Todo App in Rust Quick Start $ cargo run TODO Controls Keys Description k, j Move cursor up and down Shift+K, Shif

Tsoding 56 Dec 8, 2022
A simple program to show a histogram on the terminal.

A simple program to show a histogram on the terminal.

依云 4 Aug 10, 2021
Simple system monitoring app that runs on terminal. Made purely with Rust.

What is it? RCTOP is a simple WIP system monitoring app that runs purely on terminal and doesn't feature GUI. One can compare it to htop, but more str

Niko Huuskonen 7 Oct 14, 2022
pt is a simple tabbed terminal built with gtk-rs and vte-rs.

pt pt is a simple tabbed terminal built with gtk-rs and vte-rs. how to build You need to have gtk3 glib vte pcre2 dev packages installed on your syste

Alexander Polakov 5 Dec 8, 2021
Lazygit - simple terminal UI for git commands

A simple terminal UI for git commands, written in Go with the gocui library. Rant time: You've heard it before, git is powerful, but what good is that

Jesse Duffield 31.8k Jan 3, 2023