AlignmentI xrefsAlignment = makeCrossReferencesAlignment(dataset,
xrefs);
+ final SequenceI[] sequenceSelection = AlignFrame.this.viewport
+ .getSequenceSelection();
+ if (!dna)
+ {
+ xrefsAlignment = AlignmentUtils.makeCdsAlignment(
+ xrefsAlignment.getSequencesArray(), dataset,
+ sequenceSelection);
+ xrefsAlignment.alignAs(alignment);
+ }
AlignFrame newFrame = new AlignFrame(xrefsAlignment, DEFAULT_WIDTH,
DEFAULT_HEIGHT);
* sequences). If we are DNA, drop introns and update mappings
*/
AlignmentI copyAlignment = null;
- final SequenceI[] sequenceSelection = AlignFrame.this.viewport
- .getSequenceSelection();
boolean copyAlignmentIsAligned = false;
if (dna)
{
copyAlignment = AlignmentUtils.makeCdsAlignment(
- sequenceSelection, dataset, xrefsAlignment);
+ sequenceSelection, dataset,
+ xrefsAlignment.getSequencesArray());
if (copyAlignment.getHeight() == 0)
{
System.err.println("Failed to make CDS alignment");
* align cdna to protein - currently only if
* fetching and aligning Ensembl transcripts!
*/
- if (DBRefSource.ENSEMBL.equalsIgnoreCase(source))
+ if (dna && DBRefSource.ENSEMBL.equalsIgnoreCase(source))
{
copyAlignment.alignAs(xrefsAlignment);
}