- for (AnnotatedProteinSequenceBean entry : res) {
- DataBase db = new DataBase();
- db.setProt(entry.getSequence());
- db.setPredictions(entry);
- db.setId(entry.getJobid());
- if (flag.equals("part")) {
- db.setSubProt(CreateSubprot (entry.getSequence(), protIn));
+
+ if (searchtype.equals("partial")) {
+ for (ProteinBean entry : result) {
+ entry.setSubProt(CreateSubprot(entry.getSequence(), protIn));
+ }
+ }
+ return result;
+ }
+
+ /*
+ * query: protein feature
+ */
+
+ public Map<String, String> readProteinsPrediction(String feature, int percent) {
+ 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 : 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);