Names drop in RBioFabric output

12 views
Skip to first unread message

Tom Roth

unread,
Sep 27, 2016, 3:17:07 AM9/27/16
to BioFabric-users
Hi Bill

This'll probably be a quick fix. 

I have a dataset (call it d) structured like

  parent child
1      -     2
2  16710 15636
3  16951 15637
4  17514 15638
5  17515 15638
6  17163 15639

My dataset d has about four thousand rows, so it's not small. It doesn't represent directed data either. 

I convert d to igraph format using 

    g = graph_from_data_frame(d, directed = FALSE)

that converts it to a structure that looks like 

[1] -    --2     16710--15636 16951--15637 17514--15638 17515--15638

then run BioFabric like 

    height <- vcount(g) 
    width <- ecount(g)
    aspect <- height / width;
    plotWidth <- 10.0
    plotHeight <- plotWidth * (aspect * 1.2)
    pdf("myBioFabricOutput.pdf", width=plotWidth, height=plotHeight)
    bioFabric(g)
    dev.off()

The graph is output fine to the pdf document, except the only text label that appears is 2. No other label is displayed. 

What am I doing wrong? Should I be using the autoNameForFabric() function in there somewhere?

Cheers,
Tom  





Bill Longabaugh

unread,
Sep 27, 2016, 3:52:14 AM9/27/16
to BioFabric-users
If node zone labels get too tiny, I found that they can have trouble getting rendered. What happens if you increase the plot size? For big networks, you want to get crazy-big so you can get the resolution you need (e.g 50 inch PDFS or 30,000 pixel-wide PNGs).

Let me know how it goes.

Thanks for using BioFabric.

Bill

Reply all
Reply to author
Forward
0 new messages