/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
* Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
return null;
}
MapList ml = null;
- char[] dnaSeq = null;
+ SequenceI dnaSeq = null;
for (int i = 0; i < dnaToProt.length; i++)
{
if (dnaToProt[i].to == protein)
{
ml = getdnaToProt()[i];
- dnaSeq = dnaSeqs[i].getSequence();
+ dnaSeq = dnaSeqs[i];
break;
}
}
* Read off the mapped nucleotides (converting to position base 0)
*/
codonPos = MappingUtils.flattenRanges(codonPos);
- return new char[] { dnaSeq[codonPos[0] - 1], dnaSeq[codonPos[1] - 1],
- dnaSeq[codonPos[2] - 1] };
+ char[] dna = dnaSeq.getSequence();
+ int start = dnaSeq.getStart();
+ return new char[] { dna[codonPos[0] - start], dna[codonPos[1] - start],
+ dna[codonPos[2] - start] };
}
/**