related.addAll(node.getUpstream());
related.addAll(node.getDownstream());
if (node instanceof ComplexMember)
{
Complex cmp = ((ComplexMember) node).getParentComplex();
related.addAll(cmp.getUpstream());
related.addAll(cmp.getDownstream());
}
}
}
BioPAXGraph graph = main.getRootGraph().excise(related);