use of au.edu.wehi.idsv.graph.MaximumCliqueIntervalGraph in project gridss by PapenfussLab.
the class Models method maximalInterval.
private static Node maximalInterval(LinearGenomicCoordinate lgc, BreakendDirection dir, List<BreakendSummary> breaks, List<Long> weights) {
MaximumCliqueIntervalGraph calc = new MaximumCliqueIntervalGraph();
List<Node> nodes = new ArrayList<Node>(breaks.size());
for (int i = 0; i < breaks.size(); i++) {
BreakendSummary bs = breaks.get(i);
long weight = weights.get(i);
if (bs == null)
continue;
if (bs.direction != dir)
continue;
if (weight > 0) {
nodes.add(new Node(lgc.getLinearCoordinate(bs.referenceIndex, bs.start), lgc.getLinearCoordinate(bs.referenceIndex, bs.end), weight));
}
}
if (nodes.size() == 0)
return null;
return calc.calculateMaximumClique(nodes);
}
Aggregations