Giter Site home page Giter Site logo

epaule / pretextmap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sanger-tol/pretextmap

0.0 0.0 0.0 458 KB

Paired REad TEXTure Mapper. Converts SAM formatted read pairs into genome contact maps.

License: Other

C++ 40.77% C 58.46% Meson 0.77%

pretextmap's Introduction

test Anaconda-Server Badge Anaconda-Server Badge

PretextMap

Paired REad TEXTure Mapper. Converts SAM or pairs formatted read pairs into genome contact maps. See https://github.com/4dn-dcic/pairix/blob/master/pairs_format_specification.md for pairs format specification.
Pairs format supported by version 0.04 or later only.

PretextMap is a commandline tool for converting aligned read pairs in either the SAM/BAM/CRAM or pairs format into genomic contact maps (https://github.com/aidenlab/juicer/wiki/Pre, https://higlass.io/).

Data is read from stdin over a unix pipe, eliminating the need for any intermidiate files. Alignments can be read directly from an aligner ( | PretextMap), from a SAM file (PretextMap < file.sam), from a BAM/CRAM file using samtools (samtools view -h file.bam | PretextMap) or from a pairs file (PretextMap < file.pairs). PretextMap can even be inserted into the middle of existing pipelines by using tee or similar pipe-chaining tricks.

PretextMap comes with no imposed pipeline for processing data. Process your alignments however you want before feeding to PretextMap.

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 PretextMap can be installed with

> conda install pretextmap

Usage

Pipe SAM or pairs formatted read pairs to PretextMap e.g.:
samtools view -h file.bam | PretextMap
zcat file.paris.gz | PretextMap

Important: A SAM header with contig info must be present for SAM format (-h option for samtools).

Or pipe directly from an aligner e.g. bwa mem ... | PretextMap

Options

  • -o specifies an output file (required)
  • --sortby sorts contigs by length, name or nosort (default: length)
  • --sortorder ascend or descend (default: descend, no effect if sortby = nosort)
  • --mapq sets a minimum mapping quality filter (default: 10)

example:

> samtools view -h file.bam | PretextMap -o map.pretext --sortby length --sortorder descent --mapq 10

New option, version 0.1:

  • --filterInclude: a comma separated list of sequence names, only these sequences will be included
  • --filterExclude: a comma separated list of sequence names, these sequence will be excluded

example:

> samtools view -h file.bam seq_1 seq_2 | PretextMap -o map.pretext --filterInclude "seq_1, seq_2"

Filtering will increase the map resolution, since you're mapping less sequence into a fixed number of bins.
Note: also filtering with samtools view as in the above example (... seq_1 seq_2) is not nessesary, but is recommended purely for speed (provided your bam file is sorted and indexed).

New option, version 0.1.9:

  • --highRes: high resolution output, only supported by PretextView >=0.2.5

Map Format

Contact maps are saved in a compressed texture format (hence the name). Maps can be read by PretextView (https://github.com/wtsi-hpag/PretextView). Expect pretext map files to take around 30 to 50 M of disk space each.

Requirments, running

3G of RAM and 2 CPU cores

Third-Party acknowledgements

PretextMap uses the following third-party libraries:

Installation

Requires:

  • clang >= 11.0.0
  • meson >= 0.57.1
git submodule update --init --recursive
env CXX=clang meson setup --buildtype=release --unity on --prefix=<installation prefix> builddir
cd builddir
meson compile
meson test
meson install

pretextmap's People

Contributors

edharry avatar

pretextmap's Issues

highres attempt

test branch segfaults in highres mode

Program received signal SIGSEGV, Segmentation fault.
0x000055555555c742 in ThreadPoolInit(memory_arena*, unsigned int) ()

most likely because GigaByte(17) doesn't fit into a u64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.