
Aposition weight matrix (PWM), also known as aposition-specific weight matrix (PSWM) orposition-specific scoring matrix (PSSM), is a commonly used representation ofmotifs (patterns) in biological sequences.
PWMs are often derived from a set of aligned sequences that are thought to be functionally related and have become an important part of many software tools for computational motif discovery.
This section is empty. You can help byadding to it.(November 2022) |
A PWM has one row for each symbol of the alphabet (4 rows fornucleotides inDNA sequences or 20 rows foramino acids inprotein sequences) and one column for each position in the pattern. In the first step in constructing a PWM, a basic position frequency matrix (PFM) is created by counting the occurrences of each nucleotide at each position. From the PFM, a position probability matrix (PPM) can now be created by dividing that former nucleotide count at each position by the number of sequences, thereby normalising the values. Formally, given a setX ofN aligned sequences of lengthl, the elements of the PPMM are calculated:
wherei (1,...,N),j (1,...,l),k is the set of symbols in the alphabet andI(a=k) is anindicator function whereI(a=k) is 1 ifa=k and 0 otherwise.
For example, given the following DNA sequences:
GAGGTAAAC |
The corresponding PFM is:
Therefore, the resulting PPM is:[1]
Both PPMs and PWMs assumestatistical independence between positions in the pattern, as the probabilities for each position are calculated independently of other positions. From the definition above, it follows that the sum of values for a particular position (that is, summing over all symbols) is 1. Each column can therefore be regarded as an independentmultinomial distribution. This makes it easy to calculate the probability of a sequence given a PPM, by multiplying the relevant probabilities at each position. For example, the probability of the sequenceS = GAGGTAAAC given the above PPMM can be calculated:
Pseudocounts (orLaplace estimators) are often applied when calculating PPMs if based on a small dataset, in order to avoid matrix entries having a value of 0.[2] This is equivalent to multiplying each column of the PPM by aDirichlet distribution and allows the probability to be calculated for new sequences (that is, sequences which were not part of the original dataset). In the example above, without pseudocounts, any sequence which did not have aG in the 4th position or aT in the 5th position would have a probability of 0, regardless of the other positions.
Most often the elements in PWMs are calculated as log odds. That is, the elements of a PPM are transformed using a background model so that:
describes howan element in the PWM (left),, can be calculated.The simplest background model assumes that each letter appears equally frequently in the dataset. That is, the value of for all symbols in the alphabet (0.25 for nucleotides and 0.05 for amino acids). Applying this transformation to the PPMM from above (with no pseudocounts added) gives:
The entries in the matrix make clear the advantage of adding pseudocounts, especially when using small datasets to constructM. The background model need not have equal values for each symbol: for example, when studying organisms with a highGC-content, the values forC andG may be increased with a corresponding decrease for theA andT values.
When the PWM elements are calculated using log likelihoods, the score of a sequence can be calculated by adding (rather than multiplying) the relevant values at each position in the PWM. The sequence score gives an indication of how different the sequence is from a random sequence. The score is 0 if the sequence has the same probability of being a functional site and of being a random site. The score is greater than 0 if it is more likely to be a functional site than a random site, and less than 0 if it is more likely to be a random site than a functional site.[1] The sequence score can also be interpreted in a physical framework as the binding energy for that sequence.
Theinformation content (IC) of a PWM is sometimes of interest, as it says something about how different a given PWM is from auniform distribution.
Theself-information of observing a particular symbol at a particular position of the motif is:
The expected (average) self-information of a particular element in the PWM is then:
Finally, the IC of the PWM is then the sum of the expected self-information of every element:
Often, it is more useful to calculate the information content with the background letter frequencies of the sequences you are studying rather than assuming equal probabilities of each letter (e.g., the GC-content of DNA ofthermophilic bacteria range from 65.3 to 70.8,[3] thus a motif of ATAT would contain much more information than a motif of CCGG). The equation for information content thus becomes
where is the background frequency for letter. This corresponds to theKullback–Leibler divergence or relative entropy. However, it has been shown that when using PSSM to search genomic sequences (see below) this uniform correction can lead to overestimation of the importance of the different bases in a motif, due to the uneven distribution of n-mers in real genomes, leading to a significantly larger number of false positives.[4]
There are various algorithms to scan for hits of PWMs in sequences. One example is the MATCH algorithm[5] which has been implemented in the ModuleMaster.[6] More sophisticated algorithms for fast database searching with nucleotide as well as amino acid PWMs/PSSMs are implemented in the possumsearch software.[7]
The basic PWM/PSSM is unable to deal with insertions and deletions. A PSSM with additional probabilities for insertion and deletion at each position can be interpreted as ahidden Markov model. This is the approach used byPfam.[8][9]