base-level dotplots from PAF alignments

Overview

pafplot

A base-level sequence alignment rasterizer / dotplot generator

overview

In the process of generating alignments between whole genomes, we often need to understand the base-level alignment between particular sequences. pafplot allows us to do so by rasterizing the matches alignment set. It draws a line on a raster image to represent each match found in a set of alignments. The resulting image provides a high-level view of the structure of the alignments, and in consequence the homology relationships between the sequences in consideration.

installation

pafplot is built with rust, and so we install using cargo:

git clone https://github.com/ekg/pafplot
cd pafplot
cargo install --force --path .

usage

Generate alignments with the cigar string attached to the cg:Z: tag. These can be made by several aligners, including minimap2 -c, wfmash, or lastz --format=paf:wfmash. With alignments in aln.paf, we would render a plot in aln.paf.png using this call:

pafplot aln.paf

The scale of the plot can be changed with the -s, --size parameter. We supply the number of pixels in the longest axis of the rendering. It's also possible to specify a different output raster image with -p, --png.

Queries are ordered by length on the y-axis, while targets are ordered by length on the x-axis. The plot is white on black, with grey lines delinating sequence boundaries. These colors may be inverted for a dark theme by adding the -d, --dark parameter.

considerations / bugs

pafplot should support zooming functionality, but currently the -r, --range parameter has a bug. The raster image would benefit from sequence name labels, but these are currently not implemented. As the order is given by the input sequence lengths, it is possible to manually determine the query and target identities. But, when considering a single pair of sequences, it is often easiest to filter the input alignments down to those between the pair of sequences in question.

author

Erik Garrison

license

MIT

You might also like...
Base Garry's Mod binary module (Rust)

gmod-module-base-rs A base for developing Garry's Mod binary modules in Rust. Getting Started Install Rust Download or git clone this repository Open

Longbridge OpenAPI SDK Base.

Longbridge OpenAPI SDK Longbridge OpenAPI provides programmatic quote trading interfaces for investors with research and development capabilities and

A command line tool to control the power state of Valve Base Stations 2.0.

lighthousectl A command line tool to control the power state of Valve Base Stations 2.0. Usage Scan All Base Stations It scans endlessly. You can stop

Rust stdlib-less internal base for source engine games

source-base Rust stdlib-less and msvcrt-less internal base for source engine games Info Build with cargo build -Zbuild-std If cargo can't find link.ex

An ebpf knowledge base, based on llama_index and bpf-developer-tutorial

ebpf-knowledge-base An ebpf knowledge base, based on llama_index and bpf-developer-tutorial Usage First, you need to clone this repo: git clone --recu

AskBend: SQL-based Knowledge Base Search and Completion using Databend

AskBend: SQL-based Knowledge Base Search and Completion using Databend AskBend is a Rust project that utilizes the power of Databend and OpenAI to cre

Mod for Mega Man Battle Network Legacy Collection to restore the WWW base music in the postgame.

MMBNLC Postgame WWW Base Music mod This is a mod for Mega Man Battle Network Legacy Collection Vol. 2 adjusts the field music played in the WWW base i

A library for building tools to determine if vulnerabilities are reachable in a code base.
A library for building tools to determine if vulnerabilities are reachable in a code base.

Overview Vuln Reach is a library for developing tools that determine if a given vulnerability is reachable. Provided to the open source community by P

Base 32 + 64 encoding and decoding identifiers + bytes in rust, quickly

fast32 Base32 and base64 encoding in Rust. Primarily for integer (u64, u128) and UUID identifiers (behind feature uuid), as well as arbitrary byte arr

Zero-cost high-level lua 5.3 wrapper for Rust

td_rlua This library is a high-level binding for Lua 5.3. You don't have access to the Lua stack, all you can do is read/write variables (including ca

High-level Rust bindings to Perl XS API

Perl XS for Rust High-level Rust bindings to Perl XS API. Example xs! { package Array::Sum; sub sum_array(ctx, array: AV) { array.iter().map(|

Facilitating high-level interactions between Wasm modules and JavaScript

wasm-bindgen Facilitating high-level interactions between Wasm modules and JavaScript. Guide | API Docs | Contributing | Chat Built with 🦀 🕸 by The

Rust mid-level IR Abstract Interpreter

MIRAI MIRAI is an abstract interpreter for the Rust compiler's mid-level intermediate representation (MIR). It is intended to become a widely used sta

High-level PortMidi bindings and wrappers for Rust

portmidi-rs High-level PortMidi bindings for Rust. PortMidi website: http://portmedia.sourceforge.net/portmidi/ Installation Add this to your Cargo.to

Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

A low-level ncurses wrapper for Rust

ncurses-rs This is a very thin wrapper around the ncurses TUI lib. NOTE: The ncurses lib is terribly unsafe and ncurses-rs is only the lightest wrappe

High level FFI binding around the sys mount & umount2 calls, for Rust

sys-mount High level FFI bindings to the mount and umount2 system calls, for Rust. Examples Mount This is how the mount command could be written with

Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS

core-foundation-rs Compatibility Targets macOS 10.7 by default. To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To hav

Application level tracing for Rust.

Website | Chat | Documentation (master branch) Overview tracing is a framework for instrumenting Rust programs to collect structured, event-based diag

Comments
  • Support CIGARless PAF inputs

    Support CIGARless PAF inputs

    This is in the direction to support PAF files containing approximate mappings information.

    CIGARless PAF output from wfmash using 12 haplotypes plus 2 reference of the human chromosome 16. x approx paf

    opened by AndreaGuarracino 1
Owner
Erik Garrison
genomics, bioinformatics
Erik Garrison
Adds SEQ and QUAL to secondary alignments from SAM/BAM/CRAM

secondary_rewriter Some aligners such as minimap2 do not write the SEQ and QUAL fields to secondary alignments (which are sometimes called multi-mappe

Colin Diesh 4 Oct 31, 2022
Core Temporal SDK that can be used as a base for language specific Temporal SDKs

Core SDK that can be used as a base for all other Temporal SDKs. Getting started See the Architecture doc for some high-level information. This repo u

temporal.io 136 Dec 21, 2022
Web base text editor written in rust

Ultron Ultron is a web based monospace text-editor with syntax highlighting, completely written in rust. I wrote this code editor for my very specific

Jovansonlee Cesar 59 Aug 8, 2022
Gameroasters Server Base Framework

atlas atlasserver is a rust library for the purpose of composing REST APIs out of re-usable and extensible modules, specifically with supporting the n

Gameroasters GmbH 8 Jun 22, 2022
Substrate NFT !ink smart contract base

Substrate !ink NFT simple implementation This is a simple working version of base NFT smart contract written using latest (as of this date) !ink 3.0.0

POLK4.NET 14 Dec 3, 2022
Rust CS:GO base

Helveta Counter-Strike: Global Offensive Cheat base written in Rust. NOT COMPLETE! In active development. Disclaimer There's an alternative, currently

cristei 3 Sep 4, 2021
ECFFT algorithms on the BN254 base field

ECFFT algorithms on the BN254 base field This crate implements structs and traits for the ECFFT algorithms from the paper Elliptic Curve Fast Fourier

null 36 Nov 28, 2022
CLI tool to convert numbers from one base to another

changebase A CLI tool for changing the base of numbers. > changebase -h numeric base converter USAGE: changebase [FLAGS] [OPTIONS] <value> FLAG

null 2 Oct 14, 2022
Rust implementation of custom numeric base conversion.

base_custom Use any characters as your own numeric base and convert to and from decimal. This can be taken advantage of in various ways: Mathematics:

Daniel P. Clark 5 Dec 28, 2021
This repository presents a numbers vizualizer in a polar base. This small project has been entirely made in Rust !

NumbersRepresentation This repository presents a numbers vizualizer in a polar base. This small project has been entirely made in Rust ! This is an id

Lilian 'S3l4h' Schall 3 Apr 12, 2022