I am working with networks in igraph, I have a network where there are short connected nodes that overlap eachother and so we donot exaclt see the edge. I want to delete al such short connected nodes as they are not connected to the main network. The degree thing doesnt work here as the nodes are not 0 degree., they are either connected to 1 or more genes but still not in the main network.Even the main network shows some overlapping genes, I want to correct that too.
net <- simplify(InnatedGraph, remove.multiple = T, remove.loops = T, )
bad.vs<-V(net)[degree(net) == 0]
net <-delete.vertices(net, bad.vs)
plot(net,vertex.label=NA, edge.curved=.1, edge.width = 1,edge.arrow.width = 0.3,vertex.size = 3,asp=-1,edge.arrow.size = 0.5,vertex.label.cex = 0.3)
After doing all this i get a network like this
The genes you see around the main network are not isolated nodes but connected to other nodes that are overlapped. Is there are way to delete these genes and prevent overlapping in the main network.