/**
   * Check that any _rna_edit attribute represents a substitution rather than an insertion or
   * deletion
   */
  private boolean checkRnaEditAttributes(final DatabaseRegistryEntry dbre) {
    boolean ok = true;

    RowMapper<Attrib> mapper =
        new RowMapper<Attrib>() {
          public Attrib mapRow(ResultSet rs, int row) throws SQLException {
            return new Attrib(rs.getString(1), rs.getLong(2), rs.getString(3));
          }
        };

    String sql =
        "select sr.name, sr.seq_region_id, sra.value "
            + "from seq_region sr join seq_region_attrib sra using (seq_region_id) "
            + "join attrib_type at using (attrib_type_id) where at.code =?";

    List<Attrib> attributes = getSqlTemplate(dbre).queryForList(sql, mapper, "_rna_edit");

    for (Attrib a : attributes) {
      if (!a.isOk()) {
        ReportManager.warning(this, dbre.getConnection(), a.toString());
        ok = false;
      }
    }
    if (!ok) {
      ReportManager.problem(
          this,
          dbre.getConnection(),
          "Detected sequence regions with incorrectly formatted _rna_edit attributes. Check warnings");
    }

    return ok;
  }
Esempio n. 2
0
    @Override
    public void activate(int fbufWidth, int fbufHeight) {
      prog.bind();
      uScreenSize.bind(fbufWidth, fbufHeight);

      vertices.bind(GL20.GL_ARRAY_BUFFER);
      aMatrix.bind(VERTEX_STRIDE, 0);
      aTranslation.bind(VERTEX_STRIDE, 16);
      aPosition.bind(VERTEX_STRIDE, 24);
      if (aTexCoord != null) aTexCoord.bind(VERTEX_STRIDE, 32);
      aColor.bind(VERTEX_STRIDE, 40);

      elements.bind(GL20.GL_ELEMENT_ARRAY_BUFFER);
      ctx.checkGLError("Shader.prepare bind");
    }