git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/JAL-2759' into merge/JAL-2759_2104
[jalview.git]
/
src
/
jalview
/
ext
/
rbvi
/
chimera
/
AtomSpecModel.java
diff --git
a/src/jalview/ext/rbvi/chimera/AtomSpecModel.java
b/src/jalview/ext/rbvi/chimera/AtomSpecModel.java
index
8c0ea66
..
39d6704
100644
(file)
--- a/
src/jalview/ext/rbvi/chimera/AtomSpecModel.java
+++ b/
src/jalview/ext/rbvi/chimera/AtomSpecModel.java
@@
-20,7
+20,7
@@
*/
package jalview.ext.rbvi.chimera;
*/
package jalview.ext.rbvi.chimera;
-import jalview.util.RangeComparator;
+import jalview.util.IntRangeComparator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.ArrayList;
import java.util.Collections;
@@
-120,14
+120,14
@@
public class AtomSpecModel
for (String chain : modelData.keySet())
{
for (String chain : modelData.keySet())
{
- chain = chain.trim();
+ chain = " ".equals(chain) ? chain : chain.trim();
List<int[]> rangeList = modelData.get(chain);
/*
* sort ranges into ascending start position order
*/
List<int[]> rangeList = modelData.get(chain);
/*
* sort ranges into ascending start position order
*/
- Collections.sort(rangeList, new RangeComparator(true));
+ Collections.sort(rangeList, IntRangeComparator.ASCENDING);
int start = rangeList.isEmpty() ? 0 : rangeList.get(0)[0];
int end = rangeList.isEmpty() ? 0 : rangeList.get(0)[1];
int start = rangeList.isEmpty() ? 0 : rangeList.get(0)[0];
int end = rangeList.isEmpty() ? 0 : rangeList.get(0)[1];
@@
-192,9
+192,10
@@
public class AtomSpecModel
{
sb.append(start).append("-").append(end);
}
{
sb.append(start).append("-").append(end);
}
- if (chain.length() > 0)
- {
- sb.append(".").append(chain);
+
+ sb.append(".");
+ if (!" ".equals(chain)) {
+ sb.append(chain);
}
}
}
}
}
}