Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BiologicalAssemblyBuilder: transformations ordering is non-transitive #791

Copy link
Copy link

Description

@biocryst
Issue body actions

Reproduce the problem with:
Structure pdb = StructureIO.getStructure("BIO:5TLS:1");

Fails with exception "Comparison method violates its general contract!". The problem is in the code below, which returns 0 ("equal") if transformation IDs are not equal, which leads in this particular case to
...
JA=HA
HA=GA
JA > GA
(and probably other contradictions, but here it breaks). Comparators in Java must establish total order.

public int compare(BiologicalAssemblyTransformation t1, BiologicalAssemblyTransformation t2) {
// set sort order only if the two ids are identical
if (t1.getId().equals(t2.getId())) {
return chainIds.indexOf(t1.getChainId()) - chainIds.indexOf(t2.getChainId());
}
return 0;

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

bugBugs and bugfixesBugs and bugfixes

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.