Maybe this will help:
Select[VertexList[depgraph],
Context @@ MakeExpression[#, StandardForm] === "Global`" &]
Your definitions are probably in the Global context. This should filter out calls to built-in functions which are in the System or some other context. If your definitions are in some other context, you have to modify "Global`"
. If you don't know what the context is, execute Context[main]
, where main
is your function in question. It will tell you the context of main
.
I should say that I wouldn't want to go down the road of parsing your notebook. I'm sure it can be done. I could probably figure it out. Given enough hours. If the above doesn't filter out enough, try quitting the kernel and then executing the definitions in your notebook. Then the above should make the job feasible, unless you've loaded up your init.m with loads of other definitions.