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
|
#include "libMUSCLE/muscle.h"
#include "libMUSCLE/profile.h"
namespace muscle {
void SetTermGaps(const ProfPos *Prof, unsigned uLength)
{
if (0 == uLength)
return;
ProfPos *First = (ProfPos *) Prof;
ProfPos *Last = (ProfPos *) (Prof + uLength - 1);
switch (g_TermGaps.get())
{
case TERMGAPS_Full:
break;
case TERMGAPS_Half:
// -infinity check for lock left/right
if (First->m_scoreGapOpen != MINUS_INFINITY)
First->m_scoreGapOpen = 0;
if (uLength > 1 && Last->m_scoreGapClose != MINUS_INFINITY)
Last->m_scoreGapClose = 0;
case TERMGAPS_Ext:
if (First->m_scoreGapOpen != MINUS_INFINITY)
First->m_scoreGapOpen *= -1;
if (uLength > 1 && Last->m_scoreGapClose != MINUS_INFINITY)
Last->m_scoreGapClose *= -1;
break;
default:
Quit("Invalid g_TermGaps.get()");
}
}
}
|