Commandline image generator for Pretext contact maps.
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-suiteOr, just PretextSnapshot can be installed with
> conda install pretextsnapshotPretextSnapshot -m map.pretext --sequences "<sequences to image>" [options]| Option | Description |
|---|---|
-m |
Input contact map (.pretext file) |
--sequences |
Which sequence(s) or region(s) to render (see examples below) |
--help |
Show the full list of options |
--sequenceHelp |
Show how to format the sequence specification string |
Whole contact map
PretextSnapshot -m map.pretext --sequences "=full"One image per sequence
PretextSnapshot -m map.pretext --sequences "=all"A single sequence
PretextSnapshot -m map.pretext --sequences "seq_0"Several sequences, one image each
PretextSnapshot -m map.pretext --sequences "seq_0, seq_1"A range of sequences (from seq_0 to seq_10)
PretextSnapshot -m map.pretext --sequences "seq_0 > seq_10"Inter-sequence contacts between two sequences
PretextSnapshot -m map.pretext --sequences "{seq_0, seq_1}"| Syntax | Meaning |
|---|---|
=full |
Entire contact map in a single image |
=all |
One image for every sequence |
seq_0 |
Only the named sequence |
seq_0, seq_1 |
Separate images for each listed sequence |
seq_0 > seq_10 |
One image spanning all sequences from seq_0 to seq_10 |
{seq_0, seq_1} |
Contacts between seq_0 and seq_1 (off-diagonal region) |
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). An optional second column of + or - sets orientation; - reverses that sequence along the custom-order axis. Missing orientation defaults to +. 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 -
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
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
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