İbrahim Mutlay | 1 May 10:54 2012
Picon

[igraph] Custom directed weighted bipartite graphs

Hi,

I have an incidence matrix, suppose it:

  R1 R2 R3
A -1 0 -1
B 1 -1 0
C -1 -1 0
D 0 1 1
E 0 0 1

I would like to build a bipartite graph in igraph by following rules:
 - Edge directions should be determined by sign, i.e. when matrix entry is negative then direction is row-to-column, if it is positive then inverse direction. For example in first column, A and C connect to R1 but R1 connects to B.
 - Graph should allow m<-1 and m>1 matrix entries for example -2, 3, etc. If this is the case, I wonder does igraph evaluate them as weight or attribute?

Best wishes.

İbrahim Mutlay
Chief Science Officer
Grafen Chemical Industries
A Subsidiary of Hayzen Engineering Co.
24. cad. KA-CL Is Merkezi
No: 165/60 Ivedik OSB-Industrial Zone
06370 Ankara, TURKEY
www.grafen.com.tr
Phone/Fax: +90-312-3948109
Mobile: +90-535-3033507

_______________________________________________
igraph-help mailing list
igraph-help@...
https://lists.nongnu.org/mailman/listinfo/igraph-help
wanderingaengus | 2 May 20:31 2012
Picon
Picon

[igraph] igraph, R 2.15

I just upgraded my version of R to 2.15 and igraph doesn't seem to be happy any more. The package reloads fine
(igraph_0.5.5-4.tgz ) but it doesn't seem to make any difference (abbreviated error message below.
FWIW-I'm still running OSX 10.6.8 . 

Thanks for any suggestions, 
Aengus

Error (shortened): 

Reason: image not found 
Error: package/namespace load failed for ‘igraph’ 

_______________________________________________
igraph-help mailing list
igraph-help <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help
wanderingaengus | 2 May 20:41 2012
Picon
Picon

Re: [igraph] igraph, R 2.15

Apologies. I just saw the thread " Problems compiling igraph 0.6 on MacOS X". I'll figure out how to access
the nightly build. -A

----- Original Message ----- 
From: wanderingaengus <at> comcast.net 
To: igraph-help <at> nongnu.org 
Sent: Wednesday, May 2, 2012 12:31:57 PM 
Subject: igraph, R 2.15 

I just upgraded my version of R to 2.15 and igraph doesn't seem to be happy any more. The package reloads fine
(igraph_0.5.5-4.tgz ) but it doesn't seem to make any difference (abbreviated error message below.
FWIW-I'm still running OSX 10.6.8 . 

Thanks for any suggestions, 
Aengus 

Error (shortened): 

Reason: image not found 
Error: package/namespace load failed for ‘igraph’ 

_______________________________________________
igraph-help mailing list
igraph-help <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help
Gábor Csárdi | 2 May 20:44 2012
Picon

Re: [igraph] igraph, R 2.15

You don't have to compile igraph on OSX, unless you want to use the
version currently under development. I guess the problem is some
incompatibility between R 2.14.x and R 2.15 packages. Please try
reinstalling igraph (via install.packages("igraph")), and see if the
problem remains.

I use igraph on OSX, with R version 2.15, without problems.

Gabor

On Wed, May 2, 2012 at 2:41 PM,  <wanderingaengus@...> wrote:
> Apologies. I just saw the thread " Problems compiling igraph 0.6 on MacOS X". I'll figure out how to access
the nightly build. -A
>
> ----- Original Message -----
> From: wanderingaengus@...
> To: igraph-help@...
> Sent: Wednesday, May 2, 2012 12:31:57 PM
> Subject: igraph, R 2.15
>
> I just upgraded my version of R to 2.15 and igraph doesn't seem to be happy any more. The package reloads fine
(igraph_0.5.5-4.tgz ) but it doesn't seem to make any difference (abbreviated error message below.
FWIW-I'm still running OSX 10.6.8 .
>
> Thanks for any suggestions,
> Aengus
>
>
>
> Error (shortened):
>
> Reason: image not found
> Error: package/namespace load failed for ‘igraph’
>
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> igraph-help@...
> https://lists.nongnu.org/mailman/listinfo/igraph-help

--

-- 
Gabor Csardi <csardi@...>     MTA KFKI RMKI
Dieckmann, Anna | 3 May 13:33 2012
Picon

[igraph] Network with directed and undirected edges

Dear all, 

I've to build a protein-protein-interaction network with mainly undirected but also some directed
edges. Is there any way to build such a network with igraph? As I'll have to analyze e.g. the topology and to
calculate the different centrality measures, I'd very much like to stick to using igraph for my Phd
project :)

Many thanks in advance, 
Anna
hz hanks | 4 May 05:57 2012
Picon

[igraph] Question about fastgreedy.community

Hi, All

I'm a starter in igraph and also in R. I met a problem when learn
about fastgreedy.community
Here's my simple code.

require(igraph)
N <- 1000
K <- (N-1)
p.k = (1:K)^(-3)
deg <- sample(1:K, N, replace=TRUE, prob=p.k)
if((sum(deg) %% 2) == 1)
{
	deg[1] = deg[1] + 1
}
g =degree.sequence.game(deg,method="simple")
community = fastgreedy.community(g)

And I found that, in most time, it'll have an error of " At
fast_community.c:539 : fast-greedy community finding works only on
simple graphs, Invalid value", though it did work successfully once.
And if I change the value of N to a small number, such as 10, it'll
always work successfully.

I've search in google, but I even didn't find matched results. Any one
can help me? Very appreciated.

Best,
Hanks
Tamás Nepusz | 4 May 23:10 2012
Picon

Re: [igraph] Question about fastgreedy.community

> I'm a starter in igraph and also in R. I met a problem when learn
> about fastgreedy.community

The problem lies not within fastgreedy.community but within the graph generated by
degree.sequence.game. The default generation method ("simple") does not prevent
degree.sequence.game from creating loop or multiple edges, and if it does, fastgreedy.community will
fail. You have two options here:

1) call simplify() on the generated graph to get rid of multiple and loop edges. Of course this distorts the
degree sequence a bit, i.e. you won't get exactly the same degree sequence as the one you have specified in "deg"

2) use method="vl" instead of method="simple" when calling degree.sequence.game. method="vl" uses the
Viger-Latapy generation method, which is guaranteed to produce simple graphs that are then accepted by fastgreedy.community.

--

-- 
T.
Tamás Nepusz | 4 May 23:11 2012
Picon

Re: [igraph] Network with directed and undirected edges

> I've to build a protein-protein-interaction network with mainly undirected but also some directed
edges. Is there any way to build such a network with igraph?

I think that in most cases, you can simply replace an A---B undirected edge with a pair of directed edges: A
--> B and B --> A. igraph cannot handle mixed undirected and directed edges within the same graph, so this is
your only option if you want to stick to igraph.

--

-- 
T.
Tamás Nepusz | 4 May 23:20 2012
Picon

Re: [igraph] Custom directed weighted bipartite graphs

Hi,  

The graph.incidence function in R does almost what you want, with the exception of the edge directions. The
function will assign the numbers in your matrix to an edge attribute named "weight". Once you have the
graph, you can find the ids of the edges with negative weights, get their endpoints, remove them and add
them back after you have reversed them. (Make sure that you keep and negate the corresponding weights).
--  
T.

On Tuesday, 1 May 2012 at 10:54, İbrahim Mutlay wrote:

> Hi,
>  
> I have an incidence matrix, suppose it:
>  
> R1 R2 R3
> A -1 0 -1
> B 1 -1 0
> C -1 -1 0
> D 0 1 1
> E 0 0 1
>  
> I would like to build a bipartite graph in igraph by following rules:
> - Edge directions should be determined by sign, i.e. when matrix entry is negative then direction is
row-to-column, if it is positive then inverse direction. For example in first column, A and C connect to R1
but R1 connects to B.
> - Graph should allow m<-1 and m>1 matrix entries for example -2, 3, etc. If this is the case, I wonder does
igraph evaluate them as weight or attribute?
>  
> Best wishes.
>  
> İbrahim Mutlay
> Chief Science Officer
> Grafen Chemical Industries
> A Subsidiary of Hayzen Engineering Co.
> 24. cad. KA-CL Is Merkezi
> No: 165/60 Ivedik OSB-Industrial Zone
> 06370 Ankara, TURKEY
> www.grafen.com.tr (http://www.grafen.com.tr)
> Phone/Fax: +90-312-3948109
> Mobile: +90-535-3033507
>  
> _______________________________________________
> igraph-help mailing list
> igraph-help <at> nongnu.org (mailto:igraph-help <at> nongnu.org)
> https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
igraph-help <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help
hz hanks | 5 May 05:43 2012
Picon

Re: [igraph] Question about fastgreedy.community

Hi, Tamás Nepusz

Thank you so much for your reply!

I tried to use your second solution, but it still has an error as follows:

g =degree.sequence.game(deg,method="vl")

At gengraph_mr-connected.cpp:146 : Cannot make a connected graph from
the given degree sequence, Invalid value

Do you have any method to fix it?

Thank you again for attention on my affair!

Best,
Hanks

2012/5/4 Tamás Nepusz <ntamas@...>:
>> I'm a starter in igraph and also in R. I met a problem when learn
>> about fastgreedy.community
>
> The problem lies not within fastgreedy.community but within the graph generated by
degree.sequence.game. The default generation method ("simple") does not prevent
degree.sequence.game from creating loop or multiple edges, and if it does, fastgreedy.community will
fail. You have two options here:
>
> 1) call simplify() on the generated graph to get rid of multiple and loop edges. Of course this distorts the
degree sequence a bit, i.e. you won't get exactly the same degree sequence as the one you have specified in "deg"
>
> 2) use method="vl" instead of method="simple" when calling degree.sequence.game. method="vl" uses
the Viger-Latapy generation method, which is guaranteed to produce simple graphs that are then accepted
by fastgreedy.community.
>
> --
> T.
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> igraph-help@...
> https://lists.nongnu.org/mailman/listinfo/igraph-help

Gmane