int limit = 10;
int k = 0;
int t = 0;
BioPAXGraph graph = globalSearch ? main.getRootGraph() : main.getPathwayGraph();
if (targets.isEmpty()) targets = null;
Map<Node, Map<Integer, List<CausativePath>>> allMap =
AlgoRunner.searchCausativePaths(graph, targets, limit, t, k);
// Search the paths map for each target and
// prepare the result paths to visualize
List<String> pathIDs = new ArrayList<String>();
idMap = new HashMap<String, CausativePath>();
// Collect all paths in a list to be used in excising the original graph and displaying the
// merge graph
List<Path> paths = new ArrayList<Path>();
for (Map<Integer, List<CausativePath>> integerListMap : allMap.values())
{
for (List<CausativePath> list : integerListMap.values())
{
paths.addAll(list);
}
}
// Open merge graph of result pathways in a new view
if (!paths.isEmpty() && globalSearch)
{
pathwayGraph = graph.excise(paths, false, true);
pathwayGraph.setName("Causative Paths");
main.createNewTab(pathwayGraph);
new CoSELayoutAction(main).run();
new ColorWithExperimentAction(main, pathwayGraph, ExperimentData.EXPRESSION_DATA).run();