I know the question of p value for gene set overlap is answered.
But this is different; In my situation, there are (undirected) edges between genes.
Given pathway A and B, each consisting of gene 1,2,3,4,5 (for A) and 6,7,8,9,10 (for B).
And the edges are as follows: 1<->6, 2<->7, 3<->8, 1<->9.
As you can see, edges can overlap genes.
Each pathway has edges toward the rest of the genes.
For example, if there are gene 11 to 20 outside of the pathways, edges can be 1<->11, 3<->12, 5<->13 (from A), and 6<->14, 6<->15, 10<->16 (from B).
Now the null hypothesis is pathway A and B are as connected to each other as to the rest (gene 11 to 20).
What kind of statistical test can I use?
Thanks in advance,