PretextSnapshot
February 26, 2026 ยท View on GitHub
PretextSnapshot
Commandline image generator for Pretext contact maps.
Bioconda
All commandline Pretext tools for Unix (Linux and Mac) are available on bioconda.
The full suite of Pretext tools can be installed with
> conda install pretext-suite
Or, just PretextSnapshot can be installed with
> conda install pretextsnapshot
Usage
PretextSnapshot -m map.pretext --sequences "sequences to image" [other options]
PretextSnapshot --help for a full list of options.
PretextSnapshot --sequenceHelp for how to format the sequence specification string.
Examples
PretextSnapshot -m map.pretext --sequences "=full" :: Generates an image of the whole contact map.
PretextSnapshot -m map.pretext --sequences "=all" :: Generates an image of each sequence in the contact map.
PretextSnapshot -m map.pretext --sequences "seq_0" :: Generates an image of the sequence named "seq_0".
PretextSnapshot -m map.pretext --sequences "seq_0, seq_1" :: Generates an image of "seq_0" and an image of "seq_1".
PretextSnapshot -m map.pretext --sequences "seq_0 > seq_10" :: Generates an image between "seq_0" and "seq_10".
PretextSnapshot -m map.pretext --sequences "{seq_0, seq_1}":: Generates an image of the inter-sequence region between "seq_0" and "seq_1".
Custom order snapshots
To generate snapshots using a custom chromosome/scaffold/sequence order from a file:
PretextSnapshot -m map.pretext --order order.txt
The order file should list one sequence name per line (empty lines and # comments are ignored). By default, a single image is created with sequences displayed in the order file's order. Use --per-sequence for one image per sequence:
PretextSnapshot -m map.pretext --order order.txt --per-sequence
Example order file:
chr1
chr2
chr3
chrX
chrY
Requirments, running
4 cpu cores
(30 * output image size) + 6M RAM, i.e. if your output resolution is set to 1K (1024 pixels) your memory requirments will be (30 * 1K * 1K) + 6M = 36M
Third-Party acknowledgements
PretextSnapshot uses the following third-party libraries:
- AVIR image resizing algorithm designed by Aleksey Vaneev
- avx_mathfun.h
- sse_mathfun.h
- kgetopt.h
- libdeflate
- mpc
- stb_image_write.h
- stb_sprintf.h
Installation
Requires:
- g++ (or clang) >= 11.0.0
- meson >= 0.57.1
git submodule update --init --recursive
env CXX=g++ meson setup --buildtype=release --unity on builddir
cd builddir
meson compile
meson test
meson install