Thank you so much! Appreciate your help!!!
Dear Biostars community,
I am using R package "Pathview" to plotting the pathway visualization of DEGs, but i am having some difficulties setting the node size.
This is what I am expecting, the reference pathway (right) and the marked pathway with color notations (left). https://ibb.co/jDK3dL4
But the problem is that, in my plot, the size of the nodes (not the genes but the compounds) are too big, thus the regulatory relationships are covered, making the visualizations less-informative. https://ibb.co/RC9cpx9
Thank you! Any info will be greatly appreciated!
Best,
Lihe
1 answer
Dear Lihe,
I had the same problem. My solution was to change the source of the pathview function. Change this part of the function:
if ((!is.null(cpd.data) | map.null) & sum(node.data$type == "compound") > 1) {plot.data.cpd = node.map(cpd.data, node.data, node.types = "compound", node.sum = node.sum)
if (map.cpdname & !kegg.native) {
TO:
if ((!is.null(cpd.data) | map.null) & sum(node.data$type == "compound") > 1) {plot.data.cpd = node.map(cpd.data, node.data, node.types = "compound", node.sum = node.sum)
plot.data.cpd$width <- rep(2,length((plot.data.cpd$width)))
plot.data.cpd$height <- rep(2,length((plot.data.cpd$height)))
if (map.cpdname & !kegg.native) {
With this function, I get the same node size but the the nodes are filled in black. I hope this is helpful for you.
Log in to answer this question.