[BioC] Hyperdraw: bidirectional edges

hettling j.hettling at vu.nl
Mon May 13 17:27:12 CEST 2013


Hello,

I have another question about the Hyperdraw package. I would like to
draw bidirectional edges with arrows on both sides of the edge.

I took the example from the vignette, below my failed naive attempt:

##
dh1 <- DirectedHyperedge("A", "B", "R1")
dh1r <- DirectedHyperedge("B", "A", "R1") ##added edge
dh2 <- DirectedHyperedge(c("A", "B"), c("C", "D"), "R2")
dh3 <- DirectedHyperedge("D", "E", "R3")
hg <- Hypergraph(LETTERS[1:5], list(dh1, dh1r, dh2, dh3))
testbph <- graphBPH(hg)
testrabph <- graphLayout(testbph, layoutType="dot") 
graphDataDefaults(testrabph, "arrowLoc") <- "end"
plot(testrabph)
##

In order to make the edge from "A" -> "B" bidirectional, I made another
edge "B" -> "A" with the same label. Now I get two distinct edges.

Is there a way to get two arrows on one and the same edge? 

Also, I do not understand why in my example, the edge labels are the
numbers 1:4, despite the fact that all 'DirectedHyperedge' objects have
a label.

I hope my question is clear, 
many thanks in advance.

With Kind Regards

Hannes



More information about the Bioconductor mailing list