Skip to content

Commit eda3765

Browse files
committed
Fixed the way to remove the unusual character in the taxon name
1 parent 81d3a97 commit eda3765

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/edu/msu/cme/rdp/classifier/train/TreeFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@ void printTrainingFiles(String outdir) throws IOException {
414414
private void displayTrainingTree(RawHierarchyTree root) throws IOException {
415415
Taxonomy taxon = ((Taxonomy) root.getTaxonomy());
416416

417-
treeFile.write("<TreeNode name=\"" + root.getName().replaceAll("\"", "&quot;").replaceAll("&", "") + "\" taxid=\""
417+
// need to remove the & sign in the taxon names
418+
treeFile.write("<TreeNode name=\"" + root.getName().replaceAll("&", "").replaceAll("\"", "&quot;") + "\" taxid=\""
418419
+ taxon.taxID + "\" rank=\"" + taxon.hierLevel + "\" parentTaxid=\""
419420
+ taxon.parentID + "\" leaveCount=\""
420421
+ root.getLeaveCount() + "\" genusIndex=\"" + root.getGenusIndex()

0 commit comments

Comments
 (0)