[BioC] can't get degree function to work in graph package
Paul Shannon
pshannon at fhcrc.org
Wed Mar 14 04:59:00 CET 2012
Hi Burak,
You turned up a very odd bug. And a mysterious one.
I just looked at the unit tests for degree, and they do not include exactly the case you used: a graphNEL returned by the randomEGraph method. But degree is successfully called on graphNEL's, and those tests run every day. Puzzling.
Could you send me your g1 as an RData object?
- Paul
On Mar 12, 2012, at 10:29 AM, Burak Kutlu wrote:
> Hello
> I am trying to call 'degree' on a graphNEL object and I get the following error using the example from the vignette.
> Thanks for your help
> -burak
>
>> library(graph)
>> set.seed(123)
>> g1 = randomEGraph(LETTERS[1:15], edges=100)
>> g1
> A graphNEL graph with undirected edges
> Number of Nodes = 15
> Number of Edges = 100
>>
>>
>> nodes(g1)
> [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O"
>> degree(g1)
> Error in degree(g1) : Not a graph object
>>
>> sessionInfo()
> R version 2.14.1 (2011-12-22)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=C LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] igraph_0.5.5-4 RBGL_1.30.1 org.Mm.eg.db_2.6.4
> [4] RSQLite_0.11.1 DBI_0.2-5 AnnotationDbi_1.16.18
> [7] Biobase_2.14.0 graph_1.32.0 BiocInstaller_1.2.1
>
> loaded via a namespace (and not attached):
> [1] IRanges_1.12.6 tools_2.14.1
>>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list