code: protected int getSeqPos(int panelPos){
  
  
  		int seqPos = Math.round((panelPos - SequenceScalePanel.DEFAULT_X_START) / scale) ;
  		if ( seqPos < 0)
  			seqPos = 0;
  		//int length = chainLength;
  		//if ( seqPos >= length)
  		 //   seqPos = length-1;
  		return seqPos;
  	}
docs: start counting at 0...
  
  @param panelPos
  @return the sequence position