0

I have a perhaps too basic question about igraph::graphlet_basis I am analyzing relatively small weighted graphs (about 20-30 nodes, 40-60 edges) in which I would like to determine the k2-k5 graphlet distribution. As I understand graphlets, unlike cliques, do not require to have all nodes connected among them. However, the igraph::graphlet_basis function searches exclusively for cliques. Is there a function to find graphlets?

As an example, these are the 2-nodes to 5-nodes graphlets:

graphlets

library(igraph)
g1 <- make_graph(~ 1-2-3-4-5,1-3,2-4) # a G19 graphlet
E(g1)$weight <- 1
E(g1)$label <- E(g1)$weight
set.seed(6)
plot(g1,layout=layout_nicely(g1)) # compare this to the G19 in the attached png

graphlets <- graphlet_basis(g1)
sapply(graphlets$cliques,length) # largest graphlet is only 3 nodes (essentially the cliques)

cliques(g1,min=3) # returns the 3-node pairwise connected cliques
T.Humar
  • 1
  • 3
  • "Graphlets" are not really standard terminology, so it is best to explain in full what you need. If you want to count induced subgraphs on 3 or 4 nodes, use `motifs()`. For larger subgraphs, you may also be interested in `count_subgraph_isomorphisms()`. Use the LAD method and search for induced subgraphs. – Szabolcs Oct 07 '19 at 09:34
  • Thank you. I was interpreting graphlets as originally defined by Nataša Pržulj [link](https://en.wikipedia.org/wiki/Graphlets). It seems that `motifs()` generates pretty much what I need, at least for 3-4 nodes. I will explore a bit more on my own on how to implement those functions in my code. Thanks again. – T.Humar Oct 08 '19 at 14:45

0 Answers0