Skip to content

Commit

Permalink
Merge pull request #794 from biocryst/stoichiometry
Browse files Browse the repository at this point in the history
Biological assembly builder, transformation ordering fix
  • Loading branch information
josemduarte committed Aug 24, 2018
2 parents c7e12e1 + 82ca5fe commit 2bb0857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -145,12 +145,11 @@ public void test4OPJ() throws IOException, StructureException {
assertEquals(3, multiModelBioAssemblies.get(0).getPolyChains(0).size() + multiModelBioAssemblies.get(0).getPolyChains(1).size());
// 3 chains in flattened structure in bioassembly 1
assertEquals(3, flattenedBioAssemblies.get(0).getPolyChains().size());

// 3 chains divided into 2 models in bioassembly 2
assertEquals(3, multiModelBioAssemblies.get(1).getPolyChains(0).size() + multiModelBioAssemblies.get(0).getPolyChains(1).size());
assertEquals(3, multiModelBioAssemblies.get(1).getPolyChains(0).size() + multiModelBioAssemblies.get(1).getPolyChains(1).size());
// 3 chains in flattened structure in bioassembly 2
assertEquals(3, flattenedBioAssemblies.get(1).getPolyChains().size());


// chain ids and names don't contain underscores in multimodel
for (int modelIdx = 0; modelIdx<multiModelBioAssemblies.get(0).nrModels(); modelIdx++) {
Expand Down
Expand Up @@ -144,8 +144,9 @@ public int compare(BiologicalAssemblyTransformation t1, BiologicalAssemblyTransf
// 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());
} else {
return t1.getId().compareTo(t2.getId());
}
return 0;
}
});
}
Expand Down

0 comments on commit 2bb0857

Please sign in to comment.