(R pkg) Pathview Question: How to set node size?
1
1
Entering edit mode
4.8 years ago
lihe.liu ▴ 30

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

R • 1.4k views
ADD COMMENT
0
Entering edit mode
4.8 years ago
HS • 0

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.

ADD COMMENT
0
Entering edit mode

Thank you so much! Appreciate your help!!!

ADD REPLY

Login before adding your answer.

Traffic: 1833 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6