import com.datastax.driver.core.Row;
public class PredictionReader extends CassandraReader {
-
+
public PredictionReader() {
super();
}
-
+
/**
* query: protein feature
*
- * @param feature
- * a feature of secondary structure: Helix or Beta Sheet
- *
- * @param percent
- * fraction the feature in the protein
+ * @param feature
+ * a feature of secondary structure: Helix or Beta Sheet
+ *
+ * @param percent
+ * fraction the feature in the protein
*
* @return Map<String, String> to the controller SSFeaturesController
*
for (Row r : rows) {
String prot = r.getString("Protein");
String prediction = findJnetpred(r.getMap("Predictions", String.class, String.class));
- if (prot != null || prediction != null) {
- if (prediction.replaceAll("[^"+feature+"]", "").length() > prediction.length() * percent / 100) {
+ if (prot != null || prediction != null) {
+ if (prediction.replaceAll("[^" + feature + "]", "").length() > prediction.length() * percent / 100) {
query.put(prot, prediction);
}
}
return query;
}
- private String findJnetpred (Map<String,String> pred) {
+ private String findJnetpred(Map<String, String> pred) {
if (pred != null) {
- if (pred.containsKey("jnetpred"))
+ if (pred.containsKey("jnetpred"))
return pred.get("jnetpred");
}
return null;