PYangLab / PhosR

PhosR is a package for the comprehensive analysis of phosphoproteomic data.
https://pyanglab.github.io/PhosR/
GNU General Public License v3.0
14 stars 4 forks source link

Signalome function throws error #15

Open adhutz opened 1 year ago

adhutz commented 1 year ago

Thank you for this package! I received the message "Error in tree_height[[hcutree[[1]]]] : subscript out of bounds" while using the Signalome function. The reason is that in line 163 the height of the cluster is used as an index and in my case the height of hcutree is larger than the length of tree_height.

Is there a reason why you do it in this way? I could solve the issue by replacing line 163 with

tree_height <- round(tree_height, digits = 6)
    tree_hcutree <- round(hcutree, digits = 6)

    modules <- stats::cutree(hclust_res, h = tree_height[tree_height == tree_hcutree])

Is this a valid approach or do I somehow change the meaning of your code with this?