X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=cc21f35aa020b3d91a3ec6397f90cc70ab1985b4;hb=96f727b57ac588f9307116b79a7f1ab67dbff39b;hp=7a5d5bcbaf24515c14a62cee7a2242775401f9c6;hpb=c932f0e85a8852824cdd8ce790af68682732c85c;p=jalview.git diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 7a5d5bc..cc21f35 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -353,7 +353,7 @@ public class Sequence extends ASequence implements SequenceI // 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); } @@ -1646,7 +1646,7 @@ public class Sequence extends ASequence implements SequenceI } } // all matrices should have been transferred. so we clear the local holder - _cmholder=null; + _cmholder = null; } return datasetSequence; } @@ -1756,11 +1756,12 @@ public class Sequence extends ASequence implements SequenceI } // 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) { @@ -2142,15 +2143,17 @@ public class Sequence extends ASequence implements SequenceI 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 getContactMaps() { @@ -2173,7 +2176,7 @@ public class Sequence extends ASequence implements SequenceI public AlignmentAnnotation addContactList(ContactMatrixI cm) { AlignmentAnnotation aa; - + if (datasetSequence != null) { aa = datasetSequence.addContactList(cm); @@ -2181,11 +2184,11 @@ public class Sequence extends ASequence implements SequenceI 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);