Skip to content

Fix three structure-alignment I/O bugs (#443, #907, #613) - #1173

Open
josemduarte wants to merge 3 commits into
biojava:masterfrom
josemduarte:jd/align-io-fixes
Open

josemduarte wants to merge 3 commits into
biojava:masterfrom
josemduarte:jd/align-io-fixes

Conversation

@josemduarte

Copy link
Copy Markdown
Contributor

Three independent fixes in structure alignment, one commit each, each with a test that failed before the fix.

mvn -pl biojava-structure test: 462 tests, 0 failures, 8 skipped.

Fixes #443
Fixes #907
Fixes #613

🤖 Generated with Claude Code

josemduarte and others added 3 commits December 4, 2026 18:21
The command-line processor always used PDBFileReader, so a .cif or
.cif.gz file failed to parse. The reader is now picked from the file
name with StructureIO.guessFiletype, for both URLs and local paths.

Fixes biojava#443

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The alignment was copied into a HashMap and seeded from its first key,
so the same alignment could print differently depending on insertion
order. Comparable keys are now sorted and the output starts from the
smallest key; otherwise the input's iteration order is kept.

Fixes biojava#907

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MultipleAlignmentWriter and MultipleAlignmentImpl.toString threw a
NullPointerException when the ensemble had no structure identifiers,
e.g. when built from atom arrays alone. New helpers in
MultipleAlignmentTools log a warning, recover each identifier from the
atoms' parent Structure, and fall back to "unknown".

Fixes biojava#613

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toConciseAlignmentString is non-deterministic NullPointerException when StructureIdentifiers are not set in MultipleAlignment command line execution of protein comparison tools is broken for -file arguments

1 participant