[BioC] to create a random graph

Robert Gentleman rgentlem at fhcrc.org
Thu Apr 24 15:32:56 CEST 2008


Hi,

Gábor Csárdi wrote:
> Some words of caution.
> 
> 1) randomEGraph is REALLY slow. The 'igraph' package on CRAN has a function
> called 'erdos.renyi.game' that is much faster. In case you need to create
> large or many graphs.

   Thanks for the feedback, we can probably fix it if folks are actually 
going to use it for really large graphs.   Our use cases have been for 
smaller graphs, where the efficiency of generation has not been an issue.

> 
> 2) I don't know what algorithm 'randomNodeGraph' uses, but this is a
> non-trivial
> problem if you want to assign a uniform probability over the graphs with the
> given degree
> sequence, see e.g. http://arxiv.org/abs/cond-mat/0312028v1
> 'igraph' has a function called 'degree.sequence.game', which does the same,
> but uses a
> naive algorithm that 1) generates non-simple graphs and 2) known to be
> biased.

   I am not sure how to take this, but since you suggest caution, I 
don't think it is positive.  If you are saying you think our algorithm 
is wrong, then could you at least provide some details on why you think 
that, perhaps an example where it appears to give the incorrect output, 
rather than this sort of unpleasant unsubstantiated innuendo?

   Robert
> 
> Gabor
> 
> On Thu, Apr 24, 2008 at 1:21 PM, <lgautier at altern.org> wrote:
> 
>> You need the package "graph":
>>
>> randomEGraph(graph)     Random Edge Graph
>> randomGraph(graph)      Random Graph
>> randomNodeGraph(graph)
>>                        Generate Random Graph with Specified Degree
>>                        Distribution
>>
>>
>>
>>
>>> hi ,everyone
>>>  i want to create a random graph with certain degree distribution, a
>>> certain
>>> number of edges,and a certain number of nodes,however,i can't find a
>>> package
>>> in bioconductor ,perhaps ,the packages i find isn't enough.is there
>> anyone
>>> tell me the package or some other method to achieve.
>>>
>>>       [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>> Search the archives:
>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
> 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgentlem at fhcrc.org



More information about the Bioconductor mailing list