- 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> result = db.ReadProtein();
+ ;
+ if (result == 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);