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