Skip to content

Commit b0a1da5

Browse files
committed
Fix for entity_src_nat category parsing, when some items missing
1 parent 1a256ed commit b0a1da5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,8 +1403,8 @@ private void addInformationFromEntitySrcSyn(int rowIndex, EntityInfo entityInfo)
14031403
}
14041404

14051405
private void addInformationFromEntitySrcNat(int rowIndex, EntityInfo entityInfo) {
1406-
entityInfo.setAtcc(entitySrcNat.getPdbxAtcc().get(rowIndex));
1407-
entityInfo.setCell(entitySrcNat.getPdbxCell().get(rowIndex));
1406+
entityInfo.setAtcc(entitySrcNat.getPdbxAtcc().values().skip(rowIndex).findFirst().orElse(""));
1407+
entityInfo.setCell(entitySrcNat.getPdbxCell().values().skip(rowIndex).findFirst().orElse(""));
14081408
entityInfo.setOrganismCommon(entitySrcNat.getCommonName().get(rowIndex));
14091409
entityInfo.setOrganismScientific(entitySrcNat.getPdbxOrganismScientific().get(rowIndex));
14101410
entityInfo.setOrganismTaxId(entitySrcNat.getPdbxNcbiTaxonomyId().get(rowIndex));

0 commit comments

Comments
 (0)