Skip to content

Instantly share code, notes, and snippets.

@matsen
matsen / seqs2png
Last active February 9, 2016 04:11
A simple script to render a molecular sequence file as a PNG, with a specified number of pixels per symbol.
#!/usr/bin/env python
"""
Turn a sequence file into a PNG, with a specified number of pixels per symbol.
Gaps are shown in light gray.
Unknown symbols, including N and X, are shown in pink.
Requires matplotlib, seqmagick, and their dependencies.
"""