Skip to content

Commit 1ff84e4

Browse files
committed
Remove 1147 lines: 5 dead files + 202 commented-out debug lines across 44 files
Deleted orphan files: - centres/cdk/CMLLoader.java, centres/io/CytoscapeWriter.java - smsd/interfaces/IResults.java - mapping/blocks/BlockReactionCanoniser.java (376 lines) - mapping/blocks/BlockMapper.java Removed all remaining commented-out System.out/println/err/printStackTrace across 44 files including RXNFileManipulator (62 lines), MappingUtility (25), DirectReactionDrawer (25), ReactionSimilarityTool (20), MappingHandler (18). 345 → 340 Java files. All 135 tests pass. Co-Authored-By: Syed Asad Rahman <asad.rahman@bioinceptionlabs.com>
1 parent 3983909 commit 1ff84e4

47 files changed

Lines changed: 4 additions & 1150 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/main/java/com/bioinceptionlabs/aamtool/ReactionDecoder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,6 @@ private void AnnotateTask(CommandLine annotateLine,
579579
| ParserConfigurationException
580580
| TransformerException
581581
| DOMException e) {
582-
//System.out.println("Error " + e.getCause());
583-
//e.printStackTrace();
584582
LOGGER.error(SEVERE, null, e);
585583
}
586584
}

src/main/java/com/bioinceptionlabs/centres/cdk/CMLLoader.java

Lines changed: 0 additions & 83 deletions
This file was deleted.

src/main/java/com/bioinceptionlabs/centres/graph/AbstractDigraph.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ public List<Ligand<A>> getLigands(A atom) {
9797
@Override
9898
public void reroot(Ligand<A> ligand) {
9999

100-
// System.out.println("tails: " + arcs.tails);
101-
// System.out.println("heads: " + arcs.heads);
102100
root = ligand;
103101
ligand.reset();
104102

@@ -272,7 +270,6 @@ class ArcMap {
272270
private final Map<Ligand<A>, Arc<A>> heads = new HashMap<>();
273271

274272
public void remove(Arc<A> arc) {
275-
//System.out.println("\tremoving " + arc.getTail() + ": " + arc + " and " + arc.getHead() + ": " + arc);
276273
tails.remove(arc.getTail(), arc);
277274
heads.remove(arc.getHead());
278275
}

src/main/java/com/bioinceptionlabs/centres/io/CytoscapeWriter.java

Lines changed: 0 additions & 134 deletions
This file was deleted.

src/main/java/com/bioinceptionlabs/reactionblast/fingerprints/tools/Similarity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public static float getTanimotoSimilarity(BitSet Molecule1, BitSet Molecule2) th
9292
float _bitset1_cardinality = bitset1.cardinality();
9393
float _bitset2_cardinality = bitset2.cardinality();
9494

95-
// System.out.println("bitset1: "+ bitset1.size() + " " + " bitset2" + bitset2.size());
9695
if (bitset1.size() != bitset2.size()) {
9796
throw new Exception("BitSets must have the same bit length");
9897
}

src/main/java/com/bioinceptionlabs/reactionblast/graphics/direct/DirectAtomDrawer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,6 @@ public Rectangle2D drawAtomID(IAtom atom, IAtomContainer container, Graphics2D g
440440
pos = suggestedPosition;
441441
}
442442

443-
// System.out.println("Alignment for atom " + atomID + " " + pos
444-
// + " given annotations at "
445-
// + labelManager.getAnnotationPositionsAsString(atom));
446443

447444
double aW2 = atomSymbolBounds.getWidth() / 2;
448445
double bW2 = bounds.getWidth() / 2;
@@ -488,7 +485,6 @@ public Rectangle2D drawAtomID(IAtom atom, IAtomContainer container, Graphics2D g
488485
if (pos != null) {
489486
labelManager.setUsedPosition(atom, pos);
490487
} else {
491-
// System.err.println("position null for ID " + atomID);
492488
}
493489

494490
Point2f tp = getTextPoint(g, atomID, pID.x, pID.y);

src/main/java/com/bioinceptionlabs/reactionblast/graphics/direct/DirectRBLastReactionDrawer.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ public Rectangle2D drawRBlastReaction(RBlastReaction rBlastReaction, int w, int
181181
}
182182

183183
if (params.drawLabelPanel) {
184-
// System.out.println("drawing labels");
185184
g.setTransform(originalTransform);
186185
g.translate((w / 2), (h / 2));
187186
g.setFont(new Font(params.labelPanelFont, PLAIN, params.labelPanelFontSize));
@@ -208,11 +207,6 @@ public Rectangle2D drawRBlastReaction(RBlastReaction rBlastReaction, int w, int
208207
int cropY = max(0, (int) dY / 2);
209208
int cropW = (int) min(finalWidth, w);
210209
int cropH = (int) min(finalHeight, w);
211-
// System.out.println("CROPPING totalBounds "
212-
// + BoundsPrinter.toString(totalBoundingBox));
213-
// System.out.println("zoom " + zoom + " dX " + dX + " dY " + dY
214-
// + " crop " + cropX + " " + cropY + " "
215-
// + cropW + " " + cropH);
216210
if ((cropX + cropW > w) || (cropY + cropH > h)) {
217211
LOGGER.debug("Not cropping to ["
218212
+ cropX + ", " + cropY + "] "

src/main/java/com/bioinceptionlabs/reactionblast/graphics/direct/DirectReactionDrawer.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,6 @@ public Image drawReaction(IReaction reaction, int w, int h, boolean invert) {
299299
int cropY = max(0, (int) dY / 2);
300300
int cropW = (int) min(finalWidth, w);
301301
int cropH = (int) min(finalHeight, w);
302-
// System.out.println("CROPPING totalBounds "
303-
// + BoundsPrinter.toString(totalBoundingBox));
304-
// System.out.println("zoom " + zoom + " dX " + dX + " dY " + dY
305-
// + " crop " + cropX + " " + cropY + " "
306-
// + cropW + " " + cropH);
307302
if ((cropX + cropW > w) || (cropY + cropH > h)) {
308303
LOGGER.debug("Not cropping " + (cropX + cropW) + " " + w + " "
309304
+ (cropY + cropH) + " " + h);
@@ -449,7 +444,6 @@ private void drawReaction(IReaction reaction,
449444
= reaction.getReactants().getAtomContainer(index);
450445
String reactantsID = reaction.getReactants().getID();
451446
String boundsID = reactionID + "_" + reactantsID + "_" + lastReactant.getID() + ":" + index;
452-
// System.out.println("looking up bounds " + boundsID);
453447
Rectangle2D lastRBound = boundsTree.get(boundsID);
454448
double xPos;
455449
double yPos;
@@ -462,7 +456,6 @@ private void drawReaction(IReaction reaction,
462456
}
463457
arrowCenter = new Point2d(xPos, yPos);
464458

465-
// System.out.println("arrow center @ " + arrowCenter);
466459
if (params.arrowType == FORWARD) {
467460
arrowDrawer.drawArrow(g, arrowCenter, reactionAxis);
468461
} else if (params.arrowType == BACKWARD) {
@@ -543,7 +536,6 @@ public BoundsTree centerOn(IReaction reaction, double cx, double cy, BoundsTree
543536
double boundsY = boundsTree.getRoot().getCenterY();
544537
double dx = cx - boundsX;
545538
double dy = cy - boundsY;
546-
// System.out.println("shifting (" + boundsX + ", " + boundsY + ") by "+ dx + " " + dy);
547539
return shift(reaction, boundsTree, dx, dy);
548540
}
549541

@@ -588,9 +580,6 @@ public BoundsTree shift(
588580
}
589581
}
590582

591-
// Rectangle2D rBB = boundsTree.get(reaction.getID());
592-
// System.out.println("reaction center " + rBB.getCenterX() + " " + rBB.getCenterY());
593-
// System.out.println("arrow center " + reactionLayout.getArrowCenter());
594583
return boundsTree;
595584
}
596585

@@ -604,18 +593,12 @@ private BoundsTree shift(IAtomContainerSet reactants, String rootLabel,
604593
for (IAtomContainer atomContainer : reactants.atomContainers()) {
605594
String fullLabel = rootLabel + "_" + label + "_" + atomContainer.getID() + ":" + counter;
606595
String subLabel = label + "_" + atomContainer.getID() + ":" + counter;
607-
// System.out.println(fullLabel);
608-
609-
// System.out.println("Atoms From" + BoundsPrinter.toString(GeometryTools.getRectangle2D(atomContainer)));
610596
translate2D(atomContainer, dx, dy);
611597
Rectangle2D uBounds = unshiftedMolSetTree.get(fullLabel);
612598
Rectangle2D sBounds = new Rectangle2D.Double(uBounds.getMinX() + dx,
613599
uBounds.getMinY() + dy,
614600
uBounds.getWidth(),
615601
uBounds.getHeight());
616-
// System.out.println("From " + BoundsPrinter.toString(uBounds));
617-
// System.out.println("To " + BoundsPrinter.toString(sBounds));
618-
// System.out.println("Atoms To" + BoundsPrinter.toString(GeometryTools.getRectangle2D(atomContainer)));
619602
boundsTree.add(subLabel, sBounds);
620603
counter++;
621604
}
@@ -624,9 +607,6 @@ private BoundsTree shift(IAtomContainerSet reactants, String rootLabel,
624607

625608
private Axis getAxisOfExpansion(
626609
int targetWidth, int targetHeight, double zoomedWidth, double zoomedHeight) {
627-
// int borderX = params.borderX;
628-
// int borderY = params.borderY;
629-
// int border2 = borderX * 2;
630610
double widthRatio = targetWidth / zoomedWidth;
631611
double heightRatio = targetHeight / zoomedHeight;
632612
if (widthRatio < heightRatio) {
@@ -799,7 +779,6 @@ public void drawMoleculeSet(IAtomContainerSet reactants, String reactionID, doub
799779
if (i > 0) {
800780
IAtomContainer previous = reactants.getAtomContainer(i - 1);
801781
String previousLabel = reactionID + "_" + reactants.getID() + "_" + previous.getID() + ":" + (i - 1);
802-
// System.out.println("getting " + previousLabel);
803782
drawPlus(previous, previousLabel, yAxis, boundsTree, g);
804783
moleculeDrawer.drawMolecule(current, g);
805784
} else {
@@ -823,10 +802,7 @@ public void drawPlus(IAtomContainer ac, String acLabel, double yAxis, BoundsTree
823802
if (boundsTree == null) {
824803
bounds = getRectangle2D(ac);
825804
} else {
826-
// System.out.print("looking up " + acLabel);
827805
bounds = boundsTree.get(acLabel);
828-
// System.out.println(" found " + BoundsPrinter.toString(bounds));
829-
// System.out.println(boundsTree);
830806
}
831807

832808
Rectangle2D textBounds = getTextBounds(g, "+");
@@ -844,7 +820,6 @@ public void drawPlus(IAtomContainer ac, String acLabel, double yAxis, BoundsTree
844820
posAlongAxis - halfWidth, yAxis - halfHeight, tbW, tbH));
845821
g.setColor(BLACK);
846822
g.setFont(new Font("ARIAL", PLAIN, params.plusFontSize));
847-
// System.out.println("drawing plus at " + p);
848823
g.drawString("+", p.x, p.y);
849824
}
850825

0 commit comments

Comments
 (0)