Overview

Protein binding sites in DNA or RNA sequences are modeled by probabilistic motifs. A Position Weight Matrix (PWM) is a simple, powerful, and widely used representation of such motifs. Because PWMs assume that sequence positions are independent of eachother (which is too restrictive for some binding or interaction sites), a generalisation of PWMs, termed di-nucleotidic PWMs (di-PWMs) have been introduced by Kulakovskiy et al. Kulakovskiy_2013. For instance, the HOCOMOCO database is a collection of PWMs and di-PWMs for Transcription Factor binding sites Kulakovskiy_2018.

This package, called dipwmsearch, offers you efficient algorithms to search for occurrences of di-PWMs motifs in DNA or RNA sequences. The search sequence may contain positions with non-ATGC symbols, encoded with IUPAC. A description of the algorithms implemented in this package is available in our preprint article dipwmsearch_2022.

Installation procedure through conda or pip is explained here. A usage example is show here.

Input / Output

The typical inputs are for instance:

  1. a di-PWM from HOCOMOCO database

  2. a sequence (as a FASTA file) in which you want to seek occurrences of the di-PWM

  3. a ratio threshold (i.e. a value between 80% and 100%) that allows you to control the minimum score of reported occurrences.

You give those inputs to one search function (use search_block_optimized_ratio by default), which will find and report exactly all occurrences for the chosen di-PWM, ratio, and target sequence. Your script can loop over all occurrences and further process them as desired (e.g. output them to a file, compute statistics, etc).

The ratio threshold is one way to control the minimum score that an occurrence should satisfy. Another way is to provide a P-value (for instance, 0.00001) and use the search function search_block_optimized_pvalue (instead of search_block_optimized_ratio ).

Advantages

dipwmsearch, the first available Pyhton package to search for di-PWMs in sequences, has several advantages:

  • easy to install via conda

  • easy-to-use search functions

  • accepts non-ACGT symbols in search sequence (IUPAC compliant)

  • controls of occurrence min score using a ratio or a P-value threshold

  • fast search algorithm

  • possibility to loop over occurrences

  • can be combined with other packages offering the possibility to search in compressed sequences, in FASTA with multiple sequences, etc.

  • can also be directly used as a script (no programming required),

  • runs on Linux, Unix sytems and on Mac OSX systems.

Concepts and useful pointers

Bibliography

[Kulakovskiy 2013]

Kulakovskiy, Levitsky, , Oshchepkov, Bryzgalov, , Vorontsov & Makeev, From binding motifs In CHIP-seq data to improved models of transcription factor binding sites, J. of Bioinformatics and Computational Biology, 11(01), 1340004 (2013). doi.

[Kulakovskiy 2018]

Kulakovskiy, Vorontsov, , Yevshin, Sharipov, Fedorova, Alla D, Rumynskiy, Medvedeva, A, Magana-Mora, Bajic, , Papatsenko & et, HOCOMOCO: towards a complete collection of transcription factor binding models for human and mouse via large-scale ChIP-Seq analysis, Nucleic Acids Research, 46(D1), D252–D259 (2018). doi.

[dipwmsearch 2022]

Mille, Ripoll, Cazaux, & Rivals, dipwmsearch: a python package for searching di-PWM motifs, BioRXiv, 2022.11.08.515647, (2022). doi.

[Touzet 2007]

Touzet & Varré, Efficient and accurate P-value computation for Position Weight Matrices, Algorithms for Molecular Biology, 2(1), (2007). doi.