Ejemplo n.º 1
0
  private boolean addAnnotationsFromString(VariantRec var, String str)
      throws OperationFailedException {
    String[] toks = str.split("\t");
    if (!toks[0].equals(var.getContig())) {
      // We expect that sometimes we'll not get the right contig
      return false;
    }
    if (!toks[1].equals("" + var.getStart())) {
      // We expect that sometimes we'll not get the right position (not sure why exactly... tabix
      // doesn't work perfectly I guess			return;
    }

    if (toks[4].equals(var.getAlt())) {
      String rsNum = toks[2];
      var.addAnnotation(VariantRec.RSNUM, rsNum);
      return true;
    }
    return false;
  }