}
@Override
- public void updateHMMMapping()
- {
- if (hmm == null)
- {
- return;
- }
- hmm.updateMapping(sequence);
- }
-
- /**
- * Maps the HMM sequence to the reference annotation.
- *
- * @param rf
- */
- @Override
- public void mapToReference(AlignmentAnnotation rf)
- {
- if (this.isHMMConsensusSequence)
- {
- int node = 1;
- hmm.clearNodeLookup();
- for (int i = 0; i < getLength(); i++)
- {
- if (rf.annotations[i].displayCharacter.equalsIgnoreCase("x"))
- {
- if (i < hmm.getNodeAlignmentColumn(node))
- {
- this.deleteChars(i, hmm.getNodeAlignmentColumn(node));
- updateHMMMapping();
- }
- else if (i > hmm.getNodeAlignmentColumn(node))
- {
- int length = i - hmm.getNodeAlignmentColumn(node);
- this.insertCharAt(hmm.getNodeAlignmentColumn(node), length,
- '-');
- updateHMMMapping();
- }
- node++;
- }
- }
- }
- }
-
- @Override
public boolean isHMMConsensusSequence()
{
return isHMMConsensusSequence;