1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
// Author: David Alexander
//
// Support for pairwise alignment with an affine gap penalty.
//
#pragma once
#include <string>
#include <vector>
namespace ConsensusCore {
class PairwiseAlignment;
struct AffineAlignmentParams
{
float MatchScore;
float MismatchScore;
float GapOpen;
float GapExtend;
float PartialMatchScore;
AffineAlignmentParams(float matchScore, float mismatchScore, float gapOpen, float gapExtend,
float partialMatchScore = 0);
};
AffineAlignmentParams DefaultAffineAlignmentParams();
AffineAlignmentParams IupacAwareAffineAlignmentParams();
//
// Affine gap-penalty alignment.
//
PairwiseAlignment* AlignAffine(
const std::string& target, const std::string& query,
AffineAlignmentParams params = DefaultAffineAlignmentParams()); // NOLINT
//
// Affine gap-penalty alignment with partial awareness of IUPAC ambiguous
// bases---
// half-penalizes partial mismatches. For example: (M = IUPAC A/C)
// T->A = -1,
// T->M = -1,
// A->M = -0.5
//
PairwiseAlignment* AlignAffineIupac(
const std::string& target, const std::string& query,
AffineAlignmentParams params = IupacAwareAffineAlignmentParams()); // NOLINT
}
|