]>An Algorithm for Finding Functional Modules and Protein Complexes in Protein-Protein Interaction Networks : Algorithm 2
(1) for all node 𝑁 𝐺 do
(2)  if ( 𝑁 . 𝑐 𝐼 𝑑 𝑥 = 0 ) then { find node outside the clique }
(3)    𝑞 𝐶 𝑙 𝑖 𝑞 𝑢 𝑒 𝐶 𝑛 𝑡 𝑠 = { 𝑞 𝐶 𝑙 𝑖 𝑞 𝑢 𝑒 𝐶 𝑛 𝑡 𝑠 the number of edges, which the node N connected with different near-cliques }
(4)   for all edge 𝐸 𝑁 do
(5)    if ( 𝐸 . t a r g e t . 𝑐 𝐼 𝑑 𝑥 > 0 ) then
(6)      𝑞 𝐶 𝑙 𝑖 𝑞 𝑢 𝑒 𝐶 𝑛 𝑡 𝑠 [ 𝐸 . t a r g e t . 𝑐 𝐼 𝑑 𝑥 ] + +
(7)    end if
(8)   end for
(9)    𝑞 𝐶 v a l u e = 0 { initialize 𝑐 𝐼 𝑑 𝑥 of node N }
(10)   for all ( 𝑐 𝑞 𝐶 𝑙 𝑖 𝑞 𝑢 𝑒 𝐶 𝑛 𝑡 𝑠 ) do
(11)    if ( ( 𝑐 > 1 ) and i n d e g r e e ( 𝑥 , 𝐺 ) o u t d e g r e e ( 𝑥 , 𝐺 ) ) or ( ( 𝑐 > 1 ) and i n d e g r e e ( 𝑥 , 𝐺 ) 0 . 5 | 𝐺 | ) then { a node
         outside a clique interacts with multiple nodes in the clique, and either i n d e g r e e ( 𝑥 , 𝐺 ) o u t d e g r e e ( 𝑥 , 𝐺 ) or
          i n d e g r e e ( 𝑥 , 𝐺 ) 0 . 5 | 𝐺 | ) is true }
(12)     if ( 𝑞 𝐶 v a l u e > 0 ) then
(13)      for all 𝑡 𝑚 𝑝 𝑁 𝐺 do
(14)       if ( 𝑡 𝑚 𝑝 𝑁 . 𝑐 𝐼 𝑑 𝑥 = 𝑞 𝐶 v a l u e ) then
(15)         𝑡 𝑚 𝑝 𝑁 . 𝑐 𝐼 𝑑 𝑥 = 𝑞 𝐶 v a l u e { near-clique of type C }
(16)       end if
(17)      end for
(18)     else
(19)       𝑞 𝐶 v a l u e = 𝑐 { near-clique of type A }
(20)     end if
(21)    end if
(22)   end for
(23)    𝑁 . 𝑐 𝐼 𝑑 𝑥 = 𝑞 𝐶 v a l u e { assign 𝑞 𝐶 v a l u e to node 𝑁 as its 𝑐 𝐼 𝑑 𝑥 }
(24)  end if
(25) end for
Algorithm 2: ExtendNearClique.