+ /*************************************************************************
+ * Position Specific Scoring Matrix (PSSM) matching
+ * See PssmQuery.h for usage information.
+ */
+ if (strncmp((char const *)pattern, "PSSM ", 4) == 0)
+ {
+ // Parse threshold
+ double thr = std::atof((char const *)pattern + 5);
+ if (thr <= 0)
+ goto exact_pattern_matching; // Invalid format
+
+ // Find the start of the pattern (i.e. the second ' ')
+ uchar const * tmp = pattern + 5;
+ while (*tmp != ' ' && *tmp != 0) ++tmp;
+ if (*tmp != ' ' || tmp == pattern + 5)
+ goto exact_pattern_matching; // Invalid format
+
+ PssmQuery pq(this, std::log(thr));
+ //std::cerr << "Pattern: " << tmp+1 << ", log(threshold) = " << std::log(thr) << std::endl;
+ return pq.align(tmp+1, 0);
+ }
+