Question: (R pkg) Pathview Question: How to set node size?
1
gravatar for lihe.liu
20 months ago by
lihe.liu30
lihe.liu30 wrote:

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 • 537 views
ADD COMMENTlink modified 20 months ago by HS0 • written 20 months ago by lihe.liu30
0
gravatar for HS
20 months ago by
HS0
HS0 wrote:

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 COMMENTlink modified 20 months ago • written 20 months ago by HS0

Thank you so much! Appreciate your help!!!

ADD REPLYlink written 19 months ago by lihe.liu30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1971 users visited in the last hour
_