On Fri, Jun 13, 2014 at 5:04 PM, Quanwei Zhang <[email protected]> wrote: > Hello: > > I have a question about "get.vertex.attribute(graph, name, index=V(graph))". > My network is protein-protein interaction network (suppose I save my network > as "myNetwork"). > (1)By the following command, I can get all the genes in the network. Is the > sequence in "allGenes" corresponding to node id in the network? That is, > allGenes[1] --> node 1; allGenes[2] --> node 2,…,allGenes[i] --> node i ? > allGenes=get.vertex.attribute(myNetwork,name="name")
Yes. > > (2) I have some seed genes, which we are interested(noted as "seedGenes"). I > calculated their clustering coefficient by the following command. But we > can't see the gene symbol in the output (which is available when we > calculate degrees). Is there some way we can map "cc_seeds" to > "seedGenes"(I.e., gene symbols)? I know we can calculate the clustering > coefficient for each gene, separately. But I am afraid it will cost more > time. Any suggestions? > cc_seeds=transitivity(myNetwork,type="local",isolates="NaN",vids=seedGenes) match(seedGenes, allGenes) Yes, it will cost more time, but transitivity() is so fast, that is does not matter. Gabor > > Thanks > > Best > Quanwei > > _______________________________________________ > 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
