int findTrueIndex(int pos)
{
// returns the alignment position for a residue
- int j = 1; // first position in PDB atom coordinate sequence
+ int j = sequence.getStart(); // first position in PDB atom coordinate sequence
int i = 0;
- while ( (i < sequence.getLength()) && (j <= pos+1))
+ while ( (i < sequence.getLength()) && (j <= pos+1))
{
if (!jalview.util.Comparison.isGap(sequence.getCharAt(i)))
{