[][src]Module bio::pattern_matching::pssm

Create a weight matrix representing a set of aligned reference sequences that constitute a motif, and use this matrix to scan query sequences for occurrences of this motif. Complexity: O(n*m) for motif length n and query length m

The position-specific scoring matrix (PSSM), aka position weight matrix (PWM), algorithm is implemented for both DNA and amino-acid sequences.

Examples

use bio::pattern_matching::pssm::DNAMotif; let pssm = DNAMotif::from_seqs(vec![ b"AAAA".to_vec(), b"AATA".to_vec(), b"AAGA".to_vec(), b"AAAA".to_vec(), ].as_ref(), None).unwrap(); let start_pos = pssm.score(b"CCCCCAATA").unwrap().loc; println!("motif found at position {}", start_pos);

/* amino acid sequences are supported, too */ use pssm::pattern_matching::pssm::ProtMotif; let pssm = ProtMotif::from_seqs(vec![ b"ARNNYM".to_vec(), b"ARNRYM".to_vec(), b"ARNNCM".to_vec(), b"ARNNYM".to_vec(), ].as_ref(), None).unwrap();

Structs

DNAMotif

Position-specific scoring matrix for DNA sequences

ProtMotif

Position-specific scoring matrix for protein sequences

ScoredPos

Represents motif score & location of match

Enums

PSSMError

Constants

DEF_PSEUDO

default pseudocount - used to prevent 0 tallies

EPSILON

approximately zero

INVALID_MONO

value representing an invalid monomer in lookup table

Traits

Motif

Trait containing code shared between DNA and protein implementations of the position-specific scoring matrix.