10#include <OpenMS/OpenMSConfig.h>
80 int align(
const std::string& seq1,
const std::string& seq2);
129 int gap_penalty_ = 5;
131 std::vector<int> first_row_{};
132 std::vector<int> second_row_{};
Global-alignment similarity score for two amino-acid sequences using the Needleman-Wunsch algorithm.
Definition NeedlemanWunsch.h:34
NeedlemanWunsch(ScoringMatrix matrix, int penalty)
Construct with a chosen scoring matrix and gap penalty.
ScoringMatrix
Substitution matrices bundled with this class.
Definition NeedlemanWunsch.h:40
static const std::vector< std::string > NamesOfScoringMatrices
Lookup table for setMatrix(const std::string&); current entries: "identity", "PAM30MS".
Definition NeedlemanWunsch.h:67
~NeedlemanWunsch()=default
Destructor.
void setMatrix(const std::string &matrix)
Select the scoring matrix by name; the accepted names are listed in NamesOfScoringMatrices.
void setPenalty(const int penalty)
Set the linear gap penalty subtracted per gap step.
int align(const std::string &seq1, const std::string &seq2)
Compute the Needleman-Wunsch similarity score of seq1 vs. seq2.
void setMatrix(const ScoringMatrix &matrix)
Select the scoring matrix used by align.
int getPenalty() const
Currently configured gap penalty.
ScoringMatrix getMatrix() const
Currently selected scoring matrix.
NeedlemanWunsch()=default
Default constructor.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19