{
/**
- * array of nucleotide positions for aligned codons at column of aligned
- * proteins.
+ * <pre>
+ * Aligned nucleotide positions for codons mapped to column positions of of aligned
+ * proteins. e.g.
+ * codons[3] = [12, 14, 15] means:
+ * column 4 in the protein alignment translates cols 13, 15, 16 in cDNA
+ * codons[5] = null means column 6 in the protein alignment is a gap
+ * </pre>
*/
public int[][] codons = null;
/**
- * width of protein sequence alignement implicit assertion that codons.length
- * >= aaWidth
+ * Width of protein sequence alignment (implicit assertion that codons.length
+ * >= aaWidth)
*/
public int aaWidth = 0;
for (SequenceI seq : acf.a_aaSeqs)
{
boolean found = false;
+ // TODO may not correctly handle the case where the same sequence appears
+ // twice in the source alignment i.e. same dataset sequence
+ // the copy will reference the first aligned sequence for both
+ // ?not solvable if realignment may reorder the sequences
+ // or check on sequence name as well????
for (SequenceI newseq : alignment)
{
if (seq.getDatasetSequence() == newseq.getDatasetSequence())
*/
public int[][] checkCodonFrameWidth(int aslen)
{
+ // TODO why not codons.length < aslen ?
+ // should codons expand if length is 2 or 3 and aslen==2 ?
if (codons.length <= aslen + 1)
{
// probably never have to do this ?
seq.insertCharAt(aspos, gapCharacter);
}
- checkCodonFrameWidth(aspos);
if (aspos < aaWidth)
{
aaWidth++;