line 91, the maximum bootstrap value is not necessarily 1, it can be 100
line 98, similarly maximum bootstrap value is not necessarily 1; in addition, this statement may lead to a mix of character and numeric values
line 99, the regex is not good - this is going to match a single instance of any digit (0-9) or a forward slash and period. I think this was meant to be [0-9.]+. At any rate, I think would be safer to just call as.numeric and then catch any NA values afterwards.
line 100, if any of the nodes are labelled with a bootstrap value on a scale of 100, then all the 1's that have been assigned in this code block will become 0.01.
While refactoring the R scripts, I found a possible mistake in how bootstrap values are being extracted from the tree's node labels: https://github.com/PoonLab/clustuneR/blob/353d3fae1357de6eff597c61713e13e9465c6738/R/tree.setup.R#L90-L101
0-9
) or a forward slash and period. I think this was meant to be[0-9.]+
. At any rate, I think would be safer to just callas.numeric
and then catch anyNA
values afterwards.