if (spos >= _aa.sequenceRef.getStart()
&& spos <= 1 + _aa.sequenceRef.getEnd())
{
- cl = _aa.sequenceRef.getContactListFor(_aa, spos);
+ cl = _aa.sequenceRef.getContactListFor(_aa, spos-_aa.sequenceRef.getStart());
if (cl == null && _aa.sequenceRef.getDatasetSequence() != null)
{
- _aa.sequenceRef.getDatasetSequence().getContactListFor(_aa, spos);
+ _aa.sequenceRef.getDatasetSequence().getContactListFor(_aa, spos-_aa.sequenceRef.getStart());
}
}
}
{
/**
* resolve a contact list instance (if any) associated with the annotation row
- * and column position
+ * and column position Columns of ContactMap are indexed relative to context
+ * object (columns of alignment, positions on sequence relative to
+ * sequence.getStart())
*
* @param _aa
* @param column
+ * - base 0 column index
* @return
*/
ContactListI getContactListFor(AlignmentAnnotation _aa, int column);
assertNotNull(
"No contact matrix recovered after reference annotation transfer",
cl);
+ // semantics of sequence associated contact list is slightly tricky - column 3 in alignment should have data
+ cl = al.getContactListFor(alan, 3);
+ assertNotNull(
+ "Contact matrix should have data for last position in sequence",
+ cl);
ContactMatrixI cm2 = new SeqDistanceContactMatrix(4);
dssq.addContactList(cm2);