Re: [igraph] randomize network with more controls

2015-09-03 Thread Tamas Nepusz
You remove the original edges and then add the new ones ;) Or, even
better, convert the graph to an adjacency list, do the rewiring there,
and then convert the adjacency list back to a graph.

T.
T.


On Thu, Sep 3, 2015 at 9:41 PM, Qunawei Zhang  wrote:
> Thanks. Is there a function, by which I can rewire two selected edges?
>
> Best
> Quanwei
>
> On 9/3/15 3:38 PM, "Tamas Nepusz"  wrote:
>
>>Hi,
>>
>>There is no built-in function for this in igraph; you'll have to
>>implement the rewiring process yourself.
>>
>>T.
>>T.
>>
>>
>>On Thu, Sep 3, 2015 at 6:25 PM, Qunawei Zhang 
>>wrote:
>>> Hello:
>>>
>>> I know how to use rewire and deSeq to randomize a network and keep the
>>> degree of the nodes.
>>> I have a protein-protein interaction network (192 nodes and 561 edges).
>>> Unlike other protein-protein interaction network, I found the
>>>interactions
>>> among hubs are not suppressed. I want to test whether this topology will
>>> make the subnetwork more vulnerable for random attacks.
>>> So  I need some random network for comparison. To randomize the network
>>>I
>>> want to reduce the interactions among hub genes and on the other hand
>>> increase the number of interactions among hubs and non hubs. Is it
>>>possible
>>> to used some existing method in igraph to get this?
>>>
>>> Many thanks
>>>
>>> Best
>>> Quanwei
>>>
>>>
>>>
>>> ___
>>> igraph-help mailing list
>>> igraph-help@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>
>>___
>>igraph-help mailing list
>>igraph-help@nongnu.org
>>https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] randomize network with more controls

2015-09-03 Thread Qunawei Zhang
Thanks. Is there a function, by which I can rewire two selected edges?

Best
Quanwei

On 9/3/15 3:38 PM, "Tamas Nepusz"  wrote:

>Hi,
>
>There is no built-in function for this in igraph; you'll have to
>implement the rewiring process yourself.
>
>T.
>T.
>
>
>On Thu, Sep 3, 2015 at 6:25 PM, Qunawei Zhang 
>wrote:
>> Hello:
>>
>> I know how to use rewire and deSeq to randomize a network and keep the
>> degree of the nodes.
>> I have a protein-protein interaction network (192 nodes and 561 edges).
>> Unlike other protein-protein interaction network, I found the
>>interactions
>> among hubs are not suppressed. I want to test whether this topology will
>> make the subnetwork more vulnerable for random attacks.
>> So  I need some random network for comparison. To randomize the network
>>I
>> want to reduce the interactions among hub genes and on the other hand
>> increase the number of interactions among hubs and non hubs. Is it
>>possible
>> to used some existing method in igraph to get this?
>>
>> Many thanks
>>
>> Best
>> Quanwei
>>
>>
>>
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>___
>igraph-help mailing list
>igraph-help@nongnu.org
>https://lists.nongnu.org/mailman/listinfo/igraph-help



___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] randomize network with more controls

2015-09-03 Thread Tamas Nepusz
Hi,

There is no built-in function for this in igraph; you'll have to
implement the rewiring process yourself.

T.
T.


On Thu, Sep 3, 2015 at 6:25 PM, Qunawei Zhang  wrote:
> Hello:
>
> I know how to use rewire and deSeq to randomize a network and keep the
> degree of the nodes.
> I have a protein-protein interaction network (192 nodes and 561 edges).
> Unlike other protein-protein interaction network, I found the interactions
> among hubs are not suppressed. I want to test whether this topology will
> make the subnetwork more vulnerable for random attacks.
> So  I need some random network for comparison. To randomize the network I
> want to reduce the interactions among hub genes and on the other hand
> increase the number of interactions among hubs and non hubs. Is it possible
> to used some existing method in igraph to get this?
>
> Many thanks
>
> Best
> Quanwei
>
>
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


[igraph] randomize network with more controls

2015-09-03 Thread Qunawei Zhang
Hello:

I know how to use rewire and deSeq to randomize a network and keep the
degree of the nodes.
I have a protein-protein interaction network (192 nodes and 561 edges).
Unlike other protein-protein interaction network, I found the interactions
among hubs are not suppressed. I want to test whether this topology will
make the subnetwork more vulnerable for random attacks.
So  I need some random network for comparison. To randomize the network I
want to reduce the interactions among hub genes and on the other hand
increase the number of interactions among hubs and non hubs. Is it possible
to used some existing method in igraph to get this?

Many thanks

Best
Quanwei




___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] ./configure won't detect GMP

2015-09-03 Thread Szabolcs Horvát
Hi Tamas,

I just figured it out.  The problem was that I set CFLAGS but it seems
I need to set CPPFLAGS instead.  CFLAGS won't work.

The reason why it seemed to work with MacPorts gmp is that actually I
was using a MacPorts compiler at that time, which does look in
/opt/local/include by default.

On 3 September 2015 at 13:30, Tamas Nepusz  wrote:
> Hi Szabolcs,
>
> Can you send me the file named "configure.log" (to my private address)?
>
> T.
> T.
>
>
> On Thu, Sep 3, 2015 at 1:18 PM, Szabolcs Horvát  wrote:
>> Hi Tamas,
>>
>> Actually gmp.h is present in $HOME/local/include.  I'm really confused
>> about what is going wrong now.  Maybe there's something obvious I'm
>> missing?
>>
>> Witness:
>>
>> $ ls $HOME/local/include
>> gmp.h  igraph
>>
>> This is part of the output from ./configure:
>>
>> checking for libxml/parser.h... yes
>> checking for __gmpz_add in -lgmp... yes
>> checking gmp.h usability... no
>> checking gmp.h presence... no
>> checking for gmp.h... no
>> checking that generated files are newer than configure... done
>>
>> So you are right that it doesn't find gmp.h
>>
>> But if I crudely remove the checking part from configure.ac and force
>> it to try to use GMP anyway by setting gmp_support=yes, then igraph
>> compiles without errors and works fine.
>>
>> On 2 September 2015 at 22:31, Tamas Nepusz  wrote:
>>> Hi Szabolcs,
>>>
>>> The configure script looks for a header named gmp.h and a library that
>>> contains the symbol named __gmpz_add. I think that your LDFLAGS is
>>> okay since it contains a .dylib or .so file that contains __gmpz_add,
>>> but your CFLAGS variable should be like this:
>>>
>>> export CFLAGS=-I$HOME/local/include/gmp
>>>
>>> This is because gmp installs its headers in $prefix/include/gmp and
>>> not in $prefix/include, and igraph tries to include them with #include
>>> .
>>>
>>> T.
>>>
>>> T.
>>>
>>>
>>> On Wed, Sep 2, 2015 at 5:54 PM, Szabolcs Horvát  wrote:
 Dear All,

 I'm compiling igraph on OS X 10.10.5 using the system compiler.

 I'm trying to use GMP 6.0.0 from https://gmplib.org/, which I
 installed into $HOME/local.  I configure igraph like this:

 export CFLAGS=-I$HOME/local/include
 export LDFLAGS=-L$HOME/local/lib
 ./configure --prefix=$HOME/local

 The configure script fails to detect GMP.  How can I get it to succeed?

 Notes: It does detect MacPorts's GMP if I try to use it.  It's also
 version 6.0.0.  If I remove the part of the configure script that
 detects GMP to trick it into thinking that it's present, igraph does
 compile correctly, and it does work correctly (including functions
 that use GMP).

 I don't know anything about autoconf and don't understand how it tries
 to detect GMP ...

 Am I doing something wrong or is the GMP detection buggy?

 Szabolcs

 ___
 igraph-help mailing list
 igraph-help@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>> ___
>>> igraph-help mailing list
>>> igraph-help@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] ./configure won't detect GMP

2015-09-03 Thread Tamas Nepusz
Hi Szabolcs,

Can you send me the file named "configure.log" (to my private address)?

T.
T.


On Thu, Sep 3, 2015 at 1:18 PM, Szabolcs Horvát  wrote:
> Hi Tamas,
>
> Actually gmp.h is present in $HOME/local/include.  I'm really confused
> about what is going wrong now.  Maybe there's something obvious I'm
> missing?
>
> Witness:
>
> $ ls $HOME/local/include
> gmp.h  igraph
>
> This is part of the output from ./configure:
>
> checking for libxml/parser.h... yes
> checking for __gmpz_add in -lgmp... yes
> checking gmp.h usability... no
> checking gmp.h presence... no
> checking for gmp.h... no
> checking that generated files are newer than configure... done
>
> So you are right that it doesn't find gmp.h
>
> But if I crudely remove the checking part from configure.ac and force
> it to try to use GMP anyway by setting gmp_support=yes, then igraph
> compiles without errors and works fine.
>
> On 2 September 2015 at 22:31, Tamas Nepusz  wrote:
>> Hi Szabolcs,
>>
>> The configure script looks for a header named gmp.h and a library that
>> contains the symbol named __gmpz_add. I think that your LDFLAGS is
>> okay since it contains a .dylib or .so file that contains __gmpz_add,
>> but your CFLAGS variable should be like this:
>>
>> export CFLAGS=-I$HOME/local/include/gmp
>>
>> This is because gmp installs its headers in $prefix/include/gmp and
>> not in $prefix/include, and igraph tries to include them with #include
>> .
>>
>> T.
>>
>> T.
>>
>>
>> On Wed, Sep 2, 2015 at 5:54 PM, Szabolcs Horvát  wrote:
>>> Dear All,
>>>
>>> I'm compiling igraph on OS X 10.10.5 using the system compiler.
>>>
>>> I'm trying to use GMP 6.0.0 from https://gmplib.org/, which I
>>> installed into $HOME/local.  I configure igraph like this:
>>>
>>> export CFLAGS=-I$HOME/local/include
>>> export LDFLAGS=-L$HOME/local/lib
>>> ./configure --prefix=$HOME/local
>>>
>>> The configure script fails to detect GMP.  How can I get it to succeed?
>>>
>>> Notes: It does detect MacPorts's GMP if I try to use it.  It's also
>>> version 6.0.0.  If I remove the part of the configure script that
>>> detects GMP to trick it into thinking that it's present, igraph does
>>> compile correctly, and it does work correctly (including functions
>>> that use GMP).
>>>
>>> I don't know anything about autoconf and don't understand how it tries
>>> to detect GMP ...
>>>
>>> Am I doing something wrong or is the GMP detection buggy?
>>>
>>> Szabolcs
>>>
>>> ___
>>> igraph-help mailing list
>>> igraph-help@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] ./configure won't detect GMP

2015-09-03 Thread Szabolcs Horvát
Hi Tamas,

Actually gmp.h is present in $HOME/local/include.  I'm really confused
about what is going wrong now.  Maybe there's something obvious I'm
missing?

Witness:

$ ls $HOME/local/include
gmp.h  igraph

This is part of the output from ./configure:

checking for libxml/parser.h... yes
checking for __gmpz_add in -lgmp... yes
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
checking that generated files are newer than configure... done

So you are right that it doesn't find gmp.h

But if I crudely remove the checking part from configure.ac and force
it to try to use GMP anyway by setting gmp_support=yes, then igraph
compiles without errors and works fine.

On 2 September 2015 at 22:31, Tamas Nepusz  wrote:
> Hi Szabolcs,
>
> The configure script looks for a header named gmp.h and a library that
> contains the symbol named __gmpz_add. I think that your LDFLAGS is
> okay since it contains a .dylib or .so file that contains __gmpz_add,
> but your CFLAGS variable should be like this:
>
> export CFLAGS=-I$HOME/local/include/gmp
>
> This is because gmp installs its headers in $prefix/include/gmp and
> not in $prefix/include, and igraph tries to include them with #include
> .
>
> T.
>
> T.
>
>
> On Wed, Sep 2, 2015 at 5:54 PM, Szabolcs Horvát  wrote:
>> Dear All,
>>
>> I'm compiling igraph on OS X 10.10.5 using the system compiler.
>>
>> I'm trying to use GMP 6.0.0 from https://gmplib.org/, which I
>> installed into $HOME/local.  I configure igraph like this:
>>
>> export CFLAGS=-I$HOME/local/include
>> export LDFLAGS=-L$HOME/local/lib
>> ./configure --prefix=$HOME/local
>>
>> The configure script fails to detect GMP.  How can I get it to succeed?
>>
>> Notes: It does detect MacPorts's GMP if I try to use it.  It's also
>> version 6.0.0.  If I remove the part of the configure script that
>> detects GMP to trick it into thinking that it's present, igraph does
>> compile correctly, and it does work correctly (including functions
>> that use GMP).
>>
>> I don't know anything about autoconf and don't understand how it tries
>> to detect GMP ...
>>
>> Am I doing something wrong or is the GMP detection buggy?
>>
>> Szabolcs
>>
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help