// only copy the given annotation
AlignmentAnnotation newann = new AlignmentAnnotation(sqann[i]);
ContactMatrixI cm = seq.getContactMatrixFor(sqann[i]);
- if (cm!=null)
+ if (cm != null)
{
addContactListFor(newann, cm);
}
}
}
// all matrices should have been transferred. so we clear the local holder
- _cmholder=null;
+ _cmholder = null;
}
return datasetSequence;
}
}
// transfer from entry to sequence
// if entry has a description and sequence doesn't, then transfer
- if (entry.getDescription()!=null && (description==null || description.trim().length()==0))
+ if (entry.getDescription() != null
+ && (description == null || description.trim().length() == 0))
{
description = entry.getDescription();
}
-
+
// transfer any new features from entry onto sequence
if (entry.getSequenceFeatures() != null)
{
private ContactMapHolderI getContactMapHolder()
{
- if (datasetSequence!=null) {
- return ((Sequence)datasetSequence).getContactMapHolder();
+ if (datasetSequence != null)
+ {
+ return ((Sequence) datasetSequence).getContactMapHolder();
}
- if (_cmholder==null)
+ if (_cmholder == null)
{
- _cmholder=new ContactMapHolder();
+ _cmholder = new ContactMapHolder();
}
return _cmholder;
}
+
@Override
public Collection<ContactMatrixI> getContactMaps()
{
public AlignmentAnnotation addContactList(ContactMatrixI cm)
{
AlignmentAnnotation aa;
-
+
if (datasetSequence != null)
{
aa = datasetSequence.addContactList(cm);
aa = new AlignmentAnnotation(aa);
aa.restrict(start, end);
aa.adjustForAlignment();
- getContactMapHolder().addContactListFor(aa,cm);
+ getContactMapHolder().addContactListFor(aa, cm);
addAlignmentAnnotation(aa);
return aa;
}
-
+
// construct new annotation for matrix on dataset sequence
aa = getContactMapHolder().addContactList(cm);