Revision 2ad199f9
Added by Ben Stöver over 6 years ago
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java | ||
---|---|---|
72 | 72 |
import info.bioinfweb.libralign.model.utils.AlignmentModelUtils; |
73 | 73 |
import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList; |
74 | 74 |
import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer; |
75 |
import info.bioinfweb.libralign.pherogram.model.PherogramAlignmentRelation; |
|
75 | 76 |
import info.bioinfweb.libralign.pherogram.model.PherogramAreaModel; |
76 | 77 |
import info.bioinfweb.libralign.pherogram.model.ShiftChange; |
77 | 78 |
import info.bioinfweb.libralign.pherogram.provider.BioJavaPherogramProvider; |
... | ... | |
584 | 585 |
String sequenceID = getReadsArea().getSequenceOrder().idByIndex(row); |
585 | 586 |
PherogramArea area = getPherogramArea(sequenceID); |
586 | 587 |
PherogramAreaModel pherogramAlignmentModel = area.getModel(); |
588 |
|
|
589 |
PherogramAlignmentRelation rightRelation = pherogramAlignmentModel.editableIndexByBaseCallIndex( |
|
590 |
pherogramAlignmentModel.getRightCutPosition()); |
|
591 |
int rightBorder; |
|
592 |
if (rightRelation.getCorresponding() == PherogramAlignmentRelation.OUT_OF_RANGE) { |
|
593 |
rightBorder = rightRelation.getBeforeValidIndex() + 1; |
|
594 |
} |
|
595 |
else { |
|
596 |
rightBorder = rightRelation.getAfterValidIndex(); |
|
597 |
} |
|
598 |
|
|
587 | 599 |
AlignmentModelUtils.reverseComplement(model, sequenceID, |
588 | 600 |
pherogramAlignmentModel.editableIndexByBaseCallIndex( |
589 | 601 |
pherogramAlignmentModel.getLeftCutPosition()).getBeforeValidIndex(), |
590 |
pherogramAlignmentModel.editableIndexByBaseCallIndex( |
|
591 |
pherogramAlignmentModel.getRightCutPosition()).getAfterValidIndex()); |
|
602 |
rightBorder); |
|
592 | 603 |
pherogramAlignmentModel.reverseComplement(); |
593 | 604 |
} |
594 | 605 |
} |
... | ... | |
596 | 607 |
|
597 | 608 |
/** |
598 | 609 |
* Recreates the whole consensus sequence from all single read sequences. The previous consensus |
599 |
* sequence is overwritte. |
|
610 |
* sequence is overwritten.
|
|
600 | 611 |
*/ |
601 | 612 |
@SuppressWarnings("unchecked") |
602 | 613 |
public <T> void createConsensusSequence() { |
Also available in: Unified diff
Bug fix in reverse complementing uncut read sequences.