[BioC] graph::edgeMatrix() fails for signature(object="graphBAM")

Robert Castelo robert.castelo at upf.edu
Wed Jul 3 16:17:59 CEST 2013


hi,

i have come across the following problem with the graph::edgeMatrix() 
function when the input object is a 'graphBAM' object:

library(graph)
g <- graphBAM(data.frame(from="1", to="2", weight=1))

edgeMatrix(g, duplicates=FALSE)
      [,1]
from    1
to      2
edgeMatrix(g, duplicates=TRUE) ## here is the problem !!
      [,1]
from    1
to      2
edgeMatrix(as(g, "graphNEL"), duplicates=TRUE) ## but here works !!
      [,1] [,2]
from    1    2
to      2    1


note that when coercing 'g' to a 'graphNEL' object, then it works as 
expected.


thanks!!
robert.
ps: sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US.UTF8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF8        LC_COLLATE=en_US.UTF8
  [5] LC_MONETARY=en_US.UTF8    LC_MESSAGES=en_US.UTF8
  [7] LC_PAPER=C                LC_NAME=C
  [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] graph_1.38.2   vimcom_0.9-8   setwidth_1.0-3 colorout_1.0-0

loaded via a namespace (and not attached):
[1] BiocGenerics_0.6.0 parallel_3.0.0     stats4_3.0.0       tools_3.0.0



More information about the Bioconductor mailing list