Skip to content

Commit e9c59f6

Browse files
committed
fix entity parsing
1 parent 85b6c6b commit e9c59f6

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/StructureConsumerImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,23 +1315,23 @@ private void addAncilliaryEntityData(int asymRowIndex, EntityInfo entityInfo) {
13151315
// This is a potentially huge assumption...
13161316

13171317
for (int rowIndex = 0; rowIndex < entitySrcGen.getRowCount(); rowIndex++) {
1318-
if (entitySrcGen.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
1318+
if (!entitySrcGen.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
13191319
continue;
13201320
}
13211321

13221322
addInformationFromEntitySrcGen(rowIndex, entityInfo);
13231323
}
13241324

13251325
for (int rowIndex = 0; rowIndex < entitySrcNat.getRowCount(); rowIndex++) {
1326-
if (entitySrcNat.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
1326+
if (!entitySrcNat.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
13271327
continue;
13281328
}
13291329

13301330
addInformationFromEntitySrcNat(rowIndex, entityInfo);
13311331
}
13321332

13331333
for (int rowIndex = 0; rowIndex < entitySrcSyn.getRowCount(); rowIndex++) {
1334-
if (entitySrcSyn.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
1334+
if (!entitySrcSyn.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
13351335
continue;
13361336
}
13371337

biojava-structure/src/test/java/org/biojava/nbio/structure/io/mmcif/TestEntityNameAndType.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ public void testEntityId() throws IOException, StructureException {
9898
assertArrayEquals(descriptionInformation, testDescInfo);
9999
assertArrayEquals(typeInformation, testTypeInfo);
100100
// Now check these work too
101-
System.out.println(Arrays.toString(geneSourceSciName));
102-
System.out.println(Arrays.toString(testGeneSourceSciName));
103101
assertArrayEquals(geneSourceSciName, testGeneSourceSciName);
104102
assertArrayEquals(geneSourceTaxId, testGeneSourceTaxId);
105103
assertArrayEquals(hostOrganismSciName, testHostOrganismSciName);

0 commit comments

Comments
 (0)