Fi bug for wrong job selection
[proteocache.git] / server / compbio / statistic / CassandraRequester.java
index 1791c0f..1e2d00b 100755 (executable)
@@ -201,17 +201,17 @@ public class CassandraRequester {
        /*
         * query: protein feature
         */
+
        public Map<String, String> readProteinsPrediction(String feature, int percent) {
-               Map<String, String> result = db.ReadProtein();
-               ;
-               if (result == null)
+               Map<String, String> results = db.ReadProtein();
+               if (results == null)
                        return null;
                Map<String, String> query = new HashMap<String, String>();
-               for (Map.Entry<String, String> entry : result.entrySet()) {
-                       String pred = entry.getValue();
-                       if (pred.replaceAll("[^" + feature + "]", "").length() > pred.length() * percent / 100 && (!entry.getKey().equals(""))) {
-                               // if (!entry.getKey().equals(""))
-                               query.put(entry.getKey(), pred);
+               for (Map.Entry<String, String> entry : results.entrySet()) {
+                       String prediction = entry.getValue();
+                       String protein = entry.getKey();
+                       if (prediction.replaceAll("[^" + feature + "]", "").length() > prediction.length() * percent / 100 && !protein.equals("")) {
+                               query.put(protein, prediction);
                        }
                }
                return query;