Exemplo n.º 1
0
  public List<String> getVariationList() throws IOException {
    Set<String> vars = new HashSet<String>();
    List<SizeResult> results = queryTable(new Column("bp", "max", 10));
    for (SizeResult sr : results) vars.add(sr.getVariation());

    return new ArrayList<String>(vars);
  }
Exemplo n.º 2
0
  public Probability getProbabilityFor(String variation) throws IOException, ProbabilityException {
    List<SizeResult> results = queryTable(new Column("var", "name", variation));

    Map<Object, Double> probs = new TreeMap<Object, Double>();
    for (SizeResult sr : results) probs.put(sr.getMaxbp(), sr.getProb());

    return new Probability(probs, 4);
  }
Exemplo n.º 3
0
 @Override
 protected SizeResult createResult(Result result) {
   if (result.getRow() != null) {
     SizeResult size = new SizeResult(result.getRow());
     size.setProbability(result.getValue(Bytes.toBytes("bp"), Bytes.toBytes("prob")));
     return size;
   }
   return null;
 }