Repository navigation
Backlog
Description
Motivation
BioJava 8.0 will be a major release with breaking changes. The goal is for BioJava to be a pure library: lean, headless, and cheaper to maintain. Code that pulls in GUI toolkits, depends on resources we can no longer get, or wraps services that no longer work costs maintenance time and gives users little in return. Where a component still has users, it gets a new home under the biojava GitHub organization rather than being deleted.
Comments are welcome, both on the items below and on anything else that should go into 8.0.
Planned changes
1. Require Java 21
- Raise the minimum Java version from 11 to 21 and build with
--release 21. - After the bump, modern language features (records, sealed types, pattern matching,
switchexpressions) can be used where they make code simpler. This is not a goal on its own.
2. Move biojava-structure-gui and biojava-protein-comparison-tool to a separate repository
biojava-structure-gui(Jmol, jcolorbrewer, Swing) gets little maintenance and is the main reason BioJava is not headless.biojava-protein-comparison-tooldepends on it, so it moves too.- Both go to a new repository under the biojava org, which can have its own release cycle and depend on released BioJava 8 artifacts.
- Related: MultipleAlignmentJmol modifies state, causing NullPointerException #817, Error displaying MMTF structures in Jmol #629, Second structure of superpositions not present in the StructureAlignmentJmol panel #628, Generalize StructureAlignment Visualization #396, Open up Symmetry visualization API (quaternary and internal) #393, Polyhedrons for visualization of D2 symm #527
3. Drop biojava-modfinder
- Its data comes from PhosphoSitePlus, which now requires a login and returns 403 for automated downloads (biojava-modfinder requires external resources that are no longer freely available #975). The module can't be built or used as intended.
- Closes biojava-modfinder requires external resources that are no longer freely available #975.
4. Drop biojava-survival
- Cox regression and Kaplan-Meier survival curves are general biostatistics, outside BioJava's sequence and structure focus, and well served by R, lifelines and statsmodels.
- The module has no tests and no dependents within BioJava, and has had no functional changes since 2016. It includes Swing figures and its own hand-written matrix and Cholesky code, both things 8.0 is removing elsewhere.
- If anyone wants to maintain it, it can move to its own repository under the biojava org.
5. Replace the embedded Jama copy with Hipparchus
BioJava ships its own copy of Jama (org.biojava.nbio.structure.jama). We don't want to maintain basic math code ourselves, embedded or hand-written.
- Public API that uses Jama
Matrixfor 3D transforms switches to vecmathMatrix3d/Matrix4d(Calc.rotate(...),Calc.getXYZEuler/getZYZEuler,RotationAxis,AFPChain.getBlockRotationMatrix,AFP.getM,FragmentPair.getRot, …). Determinants, inverses and rotation axes use vecmath. - Public API that uses
Matrixfor general NxM matrices (distance, RMSD and dk matrices) switches todouble[][](AFPChain.getDistanceMatrix/getDisTable1/2,MultipleAlignmentTools.getRMSDMatrix,SymmetryTools.getDkMatrix,AlignUtils.getDistanceMatrix, …). - Decompositions use Hipparchus 5.0 (
hipparchus-core), which also targets Java 21: the SVD inSuperPositionSVDand the eigen decompositions inMomentsOfInertiaandUnitQuaternions.SuperPositionSVDkeeps its public API; only its internals change. Hipparchus stays an implementation detail and is not exposed in the public API. - vecmath stays in 8.0 as the 3D geometry layer of
biojava-structure. See "Looking ahead to 9.0" below.
6. Drop MMTF support
- RCSB stopped serving MMTF in 2024; BinaryCIF replaces it and is already supported through ciftools.
- Remove
io/mmtf,MMTFFileReader, the MMTF option inAtomCache/StructureFiletype, and themmtf-api,mmtf-codecandmmtf-serializationdependencies. - Related: AtomCache doesn't fetch obsolete entries with mmtf #754, Error displaying MMTF structures in Jmol #629
7. Remove deprecated APIs
- Delete members that are currently
@Deprecated, for exampleStructure.getPDBCode/setPDBCode,PDBHeader.getIdCode/setIdCodeandgetDescription/setDescription(PDBHeader.getDescription meaning #662), the deprecatedGrid.getContacts(), andCESymmParameters.setRefineResult.
8. Remove java.awt / javax.swing from the library modules
biojava-structure: removeGuiWrapper(it calls into the GUI module through reflection) and the Swing parts ofAlignmentProgressListener.biojava-alignment/biojava-core: review the AWT use inGuideTree,GuideTreeNodeandABITrace, and remove it where it's only used for display.- Goal: no module outside the GUI repository needs a display or a desktop toolkit.
9. Review biojava-ws
- QBlast is broken (NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException #1033) and the module depends on
json-lib2.4, which is very old. - Proposal: drop the module, or move it out like the GUI if someone wants to maintain it. Feedback from current users is especially welcome here.
- Related: NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException #1033, Unable to find entrez (e -utilities) NCBI #1090
10. Replace clone() with copy constructors in biojava-structure
- SonarCloud flags 29
clone()implementations inbiojava-structureas blockers (rule java:S2975).Cloneable/clone()is fragile: it bypasses constructors, doesn't work withfinalfields, and needs casts andCloneNotSupportedExceptionhandling. - Replace them with copy constructors or copy factory methods. Since several are declared on public interfaces, this is a breaking change that fits 8.0.
- Interfaces that declare
clone():Atom,Group,Chain,Structure,Block,BlockSet,MultipleAlignment,MultipleAlignmentEnsemble. - Implementations:
- Core model:
AtomImpl,HetatomImpl,AminoAcidImpl,NucleotideImpl,ChainImpl,StructureImpl,GroupIterator,PdbId,io.SSBondImpl - Alignment:
align.model.AFPChain,align.pairwise.FragmentPair,align.multiple.BlockImpl,BlockSetImpl,MultipleAlignmentImpl,MultipleAlignmentEnsembleImpl - Other:
asa.GroupAsa,ecod.EcodDomain,scop.ScopDescription,scop.ScopDomain,secstruc.HBond,symmetry.internal.CESymmParameters
- Core model:
- The
clone()in the embedded JamaMatrixgoes away with item 5.
11. Resolve public name clashes
- SonarCloud flags these as blockers. Each needs a public API change, so they wait for 8.0.
- Name clashes (rule java:S1845):
core.sequence.features.AbstractFeature.TYPE: this publicComparatorconstant differs only in case from the fieldtype. Rename it, e.g.TYPE_COMPARATOR, andLOCATION_LENGTHwith it for consistency.structure.secstruc.BridgeType.nameandstructure.secstruc.SecStrucType.name: these public fields on enums shadowEnum.name(). Rename them, e.g.labelordescription, and keep an accessor.
12. Stop imposing a logging backend on users
- Every library module ships a
log4j2.xmlin its jar and passeslog4j-coreandlog4j-slf4j2-implon to users as runtime dependencies (the parent pom sets them toruntimescope). - A library should depend only on
slf4j-apiand let the application choose the backend. As it is, applications using another backend (e.g. logback) get "multiple SLF4J bindings" warnings, and BioJava'slog4j2.xmlcompetes with the application's own configuration on the classpath. - Change: move the log4j dependencies to
testscope andlog4j2.xmltosrc/test/resourcesin every module. Users who relied on BioJava's logging setup will need to add a backend themselves, which is why this waits for 8.0.
Out of scope for 8.0
- New features and algorithms. 8.0 is about removing code and modernizing what stays. New work can go into 8.x.
Looking ahead to 9.0
- Replace vecmath.
javax.vecmath1.3.1 is old and unmaintained, but its types (Point3d,Vector3d,Matrix4d,AxisAngle4d,Quat4d) are used throughout thebiojava-structurepublic API. Moving to Hipparchus geometry (Vector3D,Rotation) would touch most of the structure package, which is too large a break to fit in 8.0. If Hipparchus works out in 8.0, this is a candidate for 9.0.
Feedback
Comments on this plan are very welcomed here.
Metadata
Metadata
Assignees
Labels
No labels
Activity
josemduarte commentedon Dec 5, 2026
General cleanups for 8.0: unused internal code
A scan of the modules that stay in 8.0 (core, alignment, structure, genome, aa-prop, ontology, protein-disorder) found public code that nothing in BioJava uses and that looks internal rather than intended as API. Removing it, or making it non-public, fits the 8.0 breaking-change window.
1. Developer scripts and one-off tools inside the library
main()methods with hard-coded/Users/Scooter/scripps/dyadic/...paths and are used only by each other.BlastXMLQueryhas been superseded by core'sBlastXMLParser.query.BlastXMLQuery,query.OutputHitsGFFhomology.BlastHomologyHits,homology.GFF3FromUniprotBlastHitsutil.SplitFasta,uniprot.UniprotToFastaparsers.geneid.GeneIDXMLReader,parsers.gff.GCStatsAppin genome and ontology: the Maven-template "Hello World!"main().Mutator: unused. Its javadoc example writes to a developer's home directory.xtal.io.TreeMapSpaceGroupWrapper: a JAXB wrapper apparently used once to generate the space-group XML. Unused at runtime.main()methods with hard-coded paths in classes that stay:GFF3Reader,GeneIDGFF2Reader,GeneMarkGTFReader,StructurePairAligner,SmithWaterman3Daligner. Remove themain(), keep the class.2. File, network and XML helpers used only internally or only in tests
core.util.FileDownloadUtils:openConnectionFollowingRedirects: unused.getFileExtension,getFilePrefix,toUnixPath: used only in tests.computeHash,writeHashFile,verifyHash,hashFromETag,normalizeETag: internal plumbing ofdownloadFile. Make them private or package-private.structure.align.util.URLConnectionTools.doPOST(both overloads): unused.structure.io.FileConvert.toDASStructure: produces output for DAS, a protocol that is long gone.setPrintConnections/doPrintConnectionsare unused too.core.sequence.io.util.IOUtils.processReader: unused.core.util.UncompressInputStream.uncompress(...)(the static one): used only in tests and a demo.core.util.XMLHelper:addChildElement,getNewDocument,outputToStreamandselectParentElementare used only in tests.core.util.StringManipulationHelper:convertStreamToString,equalsToIgnoreEndlineandequalsToXmlare used only in tests.equalsToXmlalso never returns true (SonarCloud java:S3516) and is already@Deprecated. The other three methods are used by the GenBank writers:joinduplicatesString.join, andpadLeft/padRightcan be done withString.format. Once the writers switch, the whole class can go.data.sequence.SequenceUtil:writeFasta,deepCleanSequenceandisNonAmbNucleotideSequenceare unused.align.util.CollectionTools.randomPickandalign.util.UserConfiguration.fromStartupParams: unused.io.util.PDBTemporaryStorageUtils: its javadoc already says "Internal use only. Do not use this class." Make it package-private.3. Unused classes
None of these is referenced anywhere in BioJava, nor in any repository of the
rcsborbiojavaGitHub organizations; private rcsb repositories and rcsb forks were checked too.align.ce.CeCalculatorEnhanced: 2,415 lines.symmetry.core.SystematicSolver,domain.SerializableCache,symmetry.utils.PowerSet,math.SparseSquareMatrix,symmetry.misc.ProteinComplexSignature.BondType(javadoc: "Work in progress - NOT final!"),AugmentedResidueRange,align.pairwise.AligNPE,align.pairwise.AlignmentResult,scop.Astral.sequence.location.LocationHelper: 337 lines.4. Settings that do nothing
routines.GuanUberbacher"cuts per section":cutsPerSection(declared intemplate.AbstractMatrixAligner) is never read by any alignment code, sosetCutsPerSection,getCutsPerSection, the staticsetDefaultCutsPerSectionand the 5-argument constructor have no effect on results. The setting is also broken on its own terms:setDefaultCutsPerSectionassigns its parameter instead of the static field, and the default constructors call that static setter instead ofsetCutsPerSection, sogetCutsPerSection()returns 0 rather than the documented 10. Remove the setting rather than fix it.