Dear coleagues , I would to Analyse Biological Networks using igraph, How to do?if anyone has any tutorial for analysis of topological properties, send me please.
Thank you. ___________________________________________ http://sites.google.com/site/leandrodemattospereira/ Av. Brasil 4365, Manguinhos, 21040-360 Rio de Janeiro, RJ, Brasil Tel: +55-21-38658142 (21)83980066 (21)32837139 E-mail: [email protected] [email protected] --- Em sáb, 29/9/12, [email protected] <[email protected]> escreveu: De: [email protected] <[email protected]> Assunto: igraph-help Digest, Vol 74, Issue 22 Para: [email protected] Data: Sábado, 29 de Setembro de 2012, 13:00 Send igraph-help mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.nongnu.org/mailman/listinfo/igraph-help or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of igraph-help digest..." Today's Topics: 1. Re: degree according to vertex attributes (Tam?s Nepusz) 2. Re: Choosing between different methods of detecting communities (??) 3. Re: degree according to vertex attributes (Dominik Santner (CRIE)) 4. Re: Choosing between different methods of detecting communities (G?bor Cs?rdi) 5. Re: Choosing between different methods of detecting communities (??) 6. Re: Choosing between different methods of detecting communities (G?bor Cs?rdi) ---------------------------------------------------------------------- Message: 1 Date: Fri, 28 Sep 2012 23:44:19 +0200 From: Tam?s Nepusz <[email protected]> To: [email protected], Help for igraph users <[email protected]> Subject: Re: [igraph] degree according to vertex attributes Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Hello, Suppose that the city is encoded in the "city" vertex attribute of the graph; for instance: > g <- grg.game(100, 0.2) > V(g)$city <- LETTERS[(0:99 %/% 10) + 1] First, we get the edge list of the graph: > el <- get.edgelist(g) Next, we select those edges (i.e. rows) from the edge list where the endpoints are in the same city: > internal.edges <- which(V(g)$city[el[,1]] == V(g)$city[el[,2]]) We then create a subgraph which consists of these edges only: > internal.graph <- subgraph.edges(g, internal.edges) degree(internal.graph) will then give you how many friends each person has in the same city, and degree(g)-degree(internal.graph) will give you how many friends each person has in different cities. Best, -- T. On Friday, 28 September 2012 at 15:21, Dominik Santner (CRIE) wrote: > Hello, > > I'm using igraph with R and I have an undirected graph including vertex > attributes (for example the city of residence). I want to calculate the > degree separately for connections to actors living in the same city and > those living in any other city. > > Example: John lives in Berlin and has 10 friends (degree of 10). 3 of > his friends live in Berlin, 3 in Hamburg, 2 in New York and 2 in Munich. > I need a result telling me that John has 3 friends in the same city and > 7 in any other city. > > Thanks > > Dominik > > _______________________________________________ > igraph-help mailing list > [email protected] (mailto:[email protected]) > https://lists.nongnu.org/mailman/listinfo/igraph-help ------------------------------ Message: 2 Date: Sat, 29 Sep 2012 16:23:46 +0800 From: ?? <[email protected]> To: Help for igraph users <[email protected]> Subject: Re: [igraph] Choosing between different methods of detecting communities Message-ID: <caksetce6ngbd30cmtqt6cy6r53s+g0fp7d5s3ze8zoisbzh...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Gabor, Thanks for your reply. I know that the edge weights are used to calculate the shortest paths for edge betweenness. While I don't know that what the edge weights represent in the library. Specifically, is it the higher the weight, the longer the edge, or inverse? Namely, the edge weight denotes the distance between the connected nodes or the similarity between the connected nodes. Regards, chen On Wed, Sep 26, 2012 at 9:07 PM, G?bor Cs?rdi <[email protected]> wrote: > Hi, > > weighted edge-betweenness community detection simply means that > weighted paths are considered for calculating the shortest paths in > the edge betweenness calculation. > > Best, > Gabor > > On Wed, Sep 26, 2012 at 6:54 AM, ?? <[email protected]> wrote: > > Hi, > > > > Have you used the Weighted Girvan-Newman community detected algorithm in > the > > library to detect community? > > I am not sure what the edge weight represent in this algorithm in Igraph, > > similarity or distance? > > > > Thanks, > > chen > > > > On Wed, Sep 26, 2012 at 6:48 PM, Minh Nguyen <[email protected]> > wrote: > >> > >> Hi, > >> > >> On Wed, Sep 26, 2012 at 8:21 PM, Roey Angel <[email protected]> > >> wrote: > >> > I was wondering if there's a way to choose between the methods, either > >> > by > >> > experience (e.g. 'method x typically gives best results) or with some > >> > statistical test. > >> > >> There is a general class of statistical tests called the significance > >> of community. The relevant ideas and techniques can be found in the > >> following papers. > >> > >> http://dx.doi.org/10.1371/journal.pone.0033721 > >> http://dx.doi.org/10.1103/PhysRevE.82.066106 > >> http://dx.doi.org/10.1103/PhysRevE.81.046110 > >> > >> -- > >> Regards, > >> Minh Van Nguyen > >> http://bit.ly/mvngu > >> > >> _______________________________________________ > >> igraph-help mailing list > >> [email protected] > >> https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > > > > > _______________________________________________ > > igraph-help mailing list > > [email protected] > > https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > > > -- > Gabor Csardi <[email protected]> MTA KFKI RMKI > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.nongnu.org/archive/html/igraph-help/attachments/20120929/7570e795/attachment.html> ------------------------------ Message: 3 Date: Sat, 29 Sep 2012 11:56:15 +0200 From: "Dominik Santner (CRIE)" <[email protected]> To: Tam?s Nepusz <[email protected]> Cc: Help for igraph users <[email protected]> Subject: Re: [igraph] degree according to vertex attributes Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8; format=flowed Hello, thank you very much for your suggestion. Unfortunately there are two problems: first: when using your example graph created by > g <- grg.game(100, 0.2) > V(g)$city <- LETTERS[(0:99 %/% 10) + 1] I recieve a warning when doing > degree(g)-degree(internal.graph) telling me that the two objects are not of the same length > length(degree(internal.graph)) [1] 96 > length(degree(g)) [1] 100 the second problem occures when applying this procedure to my data: in your example you use V(g)$city when doing > internal.edges <- which(V(g)$city[el[,1]] == V(g)$city[el[,2]]) whith the result: > internal.edges [1] 1 5 6 7 8 ... when checking for > V(g)$city [1] "A" "A" "A" "A" "A" ... > V(g)$city[el[,2]] [1] "A" "B" "B" "B" "A" "A" ... everything is fine. But with my dataset this happens: > internal.edges <- which(V(xxx)$st_AMR[el[,1]] == V(xxx)$st_AMR[el[,2]]) > internal.edges integer(0) > V(xxx)$st_AMR [1] "M?nchen" "Darmstadt" "Regensburg" "Halle" ... > V(xxx)$st_AMR[el[,2]] [1] NA NA NA NA NA ... Maybe it has something to do with my vertex labels and/or my edge list, but I have no idea what it might be: The edge list of your example: > head(el) [,1] [,2] [1,] 1 7 [2,] 1 11 [3,] 1 12 [4,] 1 13 [5,] 2 3 [6,] 2 4 The edge list of my dataset: > head(el) [,1] [1,] "Company A (6411000)" [2,] "Company A (6411000)" [3,] "Company A (6411000)" [4,] "Company A (6411000)" [5,] "Company A (6411000)" [6,] "Company A (6411000)" [,2] [1,] "University A (8416041)" [2,] "University B (8416041)" [3,] "Company B (5562024)" [4,] "Company C (5358024)" [5,] "Company D (5358024)" [6,] "Company E (8215101)" Best regards Dominik Am 28.09.2012 23:44, schrieb Tam?s Nepusz: > Hello, > > Suppose that the city is encoded in the "city" vertex attribute of the graph; > for instance: > >> g <- grg.game(100, 0.2) >> V(g)$city <- LETTERS[(0:99 %/% 10) + 1] > First, we get the edge list of the graph: > >> el <- get.edgelist(g) > Next, we select those edges (i.e. rows) from the edge list where the > endpoints are in the same city: > >> internal.edges <- which(V(g)$city[el[,1]] == V(g)$city[el[,2]]) > We then create a subgraph which consists of these edges only: > >> internal.graph <- subgraph.edges(g, internal.edges) > degree(internal.graph) will then give you how many friends each person has in > the same city, and degree(g)-degree(internal.graph) will give you how many > friends each person has in different cities. > > Best, ------------------------------ Message: 4 Date: Sat, 29 Sep 2012 08:23:51 -0400 From: G?bor Cs?rdi <[email protected]> To: Help for igraph users <[email protected]> Subject: Re: [igraph] Choosing between different methods of detecting communities Message-ID: <CABtg=K=ym=4xQ4Ty=tehj42xwyzmwmekh-zowj4w0k6vz07...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Hi Chen, On Sat, Sep 29, 2012 at 4:23 AM, ?? <[email protected]> wrote: > Hi Gabor, > > Thanks for your reply. > I know that the edge weights are used to calculate the shortest paths for > edge betweenness. > While I don't know that what the edge weights represent in the library. there is no semantics forced by igraph. Just like your vertices can represent anything, your edge weights can represent anything you want, similarity or capacity or distance, etc. > Specifically, is it the higher the weight, the longer the edge, or inverse? > Namely, the edge weight denotes the distance between the connected nodes or > the similarity between the connected nodes. Whichever you prefer. But note that shortest.paths() (and similarly edge betweenness calculation) really calculates shortest weighted paths, so you might need transform your weights for these functions. Gabor > Regards, > chen > > On Wed, Sep 26, 2012 at 9:07 PM, G?bor Cs?rdi <[email protected]> wrote: >> >> Hi, >> >> weighted edge-betweenness community detection simply means that >> weighted paths are considered for calculating the shortest paths in >> the edge betweenness calculation. >> >> Best, >> Gabor >> >> On Wed, Sep 26, 2012 at 6:54 AM, ?? <[email protected]> wrote: >> > Hi, >> > >> > Have you used the Weighted Girvan-Newman community detected algorithm in >> > the >> > library to detect community? >> > I am not sure what the edge weight represent in this algorithm in >> > Igraph, >> > similarity or distance? >> > >> > Thanks, >> > chen >> > >> > On Wed, Sep 26, 2012 at 6:48 PM, Minh Nguyen <[email protected]> >> > wrote: >> >> >> >> Hi, >> >> >> >> On Wed, Sep 26, 2012 at 8:21 PM, Roey Angel <[email protected]> >> >> wrote: >> >> > I was wondering if there's a way to choose between the methods, >> >> > either >> >> > by >> >> > experience (e.g. 'method x typically gives best results) or with some >> >> > statistical test. >> >> >> >> There is a general class of statistical tests called the significance >> >> of community. The relevant ideas and techniques can be found in the >> >> following papers. >> >> >> >> http://dx.doi.org/10.1371/journal.pone.0033721 >> >> http://dx.doi.org/10.1103/PhysRevE.82.066106 >> >> http://dx.doi.org/10.1103/PhysRevE.81.046110 >> >> >> >> -- >> >> Regards, >> >> Minh Van Nguyen >> >> http://bit.ly/mvngu >> >> >> >> _______________________________________________ >> >> igraph-help mailing list >> >> [email protected] >> >> https://lists.nongnu.org/mailman/listinfo/igraph-help >> > >> > >> > >> > _______________________________________________ >> > igraph-help mailing list >> > [email protected] >> > https://lists.nongnu.org/mailman/listinfo/igraph-help >> > >> >> >> >> -- >> Gabor Csardi <[email protected]> MTA KFKI RMKI >> >> _______________________________________________ >> igraph-help mailing list >> [email protected] >> https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > -- Gabor Csardi <[email protected]> MTA KFKI RMKI ------------------------------ Message: 5 Date: Sat, 29 Sep 2012 20:32:12 +0800 From: ?? <[email protected]> To: Help for igraph users <[email protected]> Subject: Re: [igraph] Choosing between different methods of detecting communities Message-ID: <CAKSeTcGs=wfevk34wg-24ug1-ka3qdznv6w2fmf9lvh-dwp...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Gabor, >>But note that shortest.paths() (and similarly >>edge betweenness calculation) really calculates shortest weighted >>paths, so you might need transform your weights for these functions. OK, so that if I use similarity of nodes as edge weights, I need to transform the weights (i.e., inverse) for detecting community. is that right? Thanks & Regards chen On Sat, Sep 29, 2012 at 8:23 PM, G?bor Cs?rdi <[email protected]> wrote: > Hi Chen, > > On Sat, Sep 29, 2012 at 4:23 AM, ?? <[email protected]> wrote: > > Hi Gabor, > > > > Thanks for your reply. > > I know that the edge weights are used to calculate the shortest paths for > > edge betweenness. > > While I don't know that what the edge weights represent in the library. > > there is no semantics forced by igraph. Just like your vertices can > represent anything, your edge weights can represent anything you want, > similarity or capacity or distance, etc. > > > Specifically, is it the higher the weight, the longer the edge, or > inverse? > > Namely, the edge weight denotes the distance between the connected nodes > or > > the similarity between the connected nodes. > > Whichever you prefer. But note that shortest.paths() (and similarly > edge betweenness calculation) really calculates shortest weighted > paths, so you might need transform your weights for these functions. > > Gabor > > > Regards, > > chen > > > > On Wed, Sep 26, 2012 at 9:07 PM, G?bor Cs?rdi <[email protected]> > wrote: > >> > >> Hi, > >> > >> weighted edge-betweenness community detection simply means that > >> weighted paths are considered for calculating the shortest paths in > >> the edge betweenness calculation. > >> > >> Best, > >> Gabor > >> > >> On Wed, Sep 26, 2012 at 6:54 AM, ?? <[email protected]> wrote: > >> > Hi, > >> > > >> > Have you used the Weighted Girvan-Newman community detected algorithm > in > >> > the > >> > library to detect community? > >> > I am not sure what the edge weight represent in this algorithm in > >> > Igraph, > >> > similarity or distance? > >> > > >> > Thanks, > >> > chen > >> > > >> > On Wed, Sep 26, 2012 at 6:48 PM, Minh Nguyen <[email protected]> > >> > wrote: > >> >> > >> >> Hi, > >> >> > >> >> On Wed, Sep 26, 2012 at 8:21 PM, Roey Angel < > [email protected]> > >> >> wrote: > >> >> > I was wondering if there's a way to choose between the methods, > >> >> > either > >> >> > by > >> >> > experience (e.g. 'method x typically gives best results) or with > some > >> >> > statistical test. > >> >> > >> >> There is a general class of statistical tests called the significance > >> >> of community. The relevant ideas and techniques can be found in the > >> >> following papers. > >> >> > >> >> http://dx.doi.org/10.1371/journal.pone.0033721 > >> >> http://dx.doi.org/10.1103/PhysRevE.82.066106 > >> >> http://dx.doi.org/10.1103/PhysRevE.81.046110 > >> >> > >> >> -- > >> >> Regards, > >> >> Minh Van Nguyen > >> >> http://bit.ly/mvngu > >> >> > >> >> _______________________________________________ > >> >> igraph-help mailing list > >> >> [email protected] > >> >> https://lists.nongnu.org/mailman/listinfo/igraph-help > >> > > >> > > >> > > >> > _______________________________________________ > >> > igraph-help mailing list > >> > [email protected] > >> > https://lists.nongnu.org/mailman/listinfo/igraph-help > >> > > >> > >> > >> > >> -- > >> Gabor Csardi <[email protected]> MTA KFKI RMKI > >> > >> _______________________________________________ > >> igraph-help mailing list > >> [email protected] > >> https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > > > > > _______________________________________________ > > igraph-help mailing list > > [email protected] > > https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > > > -- > Gabor Csardi <[email protected]> MTA KFKI RMKI > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.nongnu.org/archive/html/igraph-help/attachments/20120929/3367f0ed/attachment.html> ------------------------------ Message: 6 Date: Sat, 29 Sep 2012 09:06:02 -0400 From: G?bor Cs?rdi <[email protected]> To: Help for igraph users <[email protected]> Subject: Re: [igraph] Choosing between different methods of detecting communities Message-ID: <CABtg=K=mH=0fOnspc=ec7vr0fuyxso8scq45gwokcwoelra...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 On Sat, Sep 29, 2012 at 8:32 AM, ?? <[email protected]> wrote: > OK, so that if I use similarity of nodes as edge weights, I need to > transform the weights (i.e., inverse) for detecting community. > is that right? I think so, because when you calculate shortest paths, you want edge weights to represent distances. Gabor [...] ------------------------------ _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help End of igraph-help Digest, Vol 74, Issue 22 *******************************************
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
