1. Fix bug in SequenceReader
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Thu, 23 Jan 2014 14:26:59 +0000 (14:26 +0000)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Thu, 23 Jan 2014 14:26:59 +0000 (14:26 +0000)
2. Simpligy links to dynamic pages

datadb/compbio/cassandra/readers/SequenceReader.java
server/compbio/controllers/SequenceController.java
webapp/view/query/Sequence.jsp
webapp/view/reports/Sequences.jsp

index 3c0d6e6..7e77126 100644 (file)
@@ -56,6 +56,7 @@ public class SequenceReader extends CassandraReader {
                                String protein = r.getString("Protein");
                                if (protein.matches("(.*)" + sequence + "(.*)")) {
                                        ProteinBean foundsequence = new ProteinBean(protein, r.getMap("Predictions", String.class, String.class));
+                                       foundsequence.setJobid(r.getString("JobID"));
                                        query.add(foundsequence);
                                }
                        }
index 4eb5844..76b5e20 100644 (file)
@@ -76,7 +76,7 @@ public class SequenceController extends BasicController {
         *            be searched
         * @return link to the report JSP page
         */
-       @RequestMapping(value = "sequence/results", method = RequestMethod.GET)
+       @RequestMapping(value = "results", method = RequestMethod.GET)
        public String findSequence(@RequestParam("sequence") String sequence, @RequestParam("searchtype") String searchtype,
                        Map<String, Object> model) {
                model.put("username", getPrincipalName());
@@ -123,6 +123,10 @@ public class SequenceController extends BasicController {
                                        }
                                }
                        }
+               } else {
+                       model.put("error", "The sequence after trimming is empty");
+                       model.put("value", sequence);
+                       return "query/Sequence";
                }
                model.put("csvfile", csvline.toString());
 
index e9cff65..18d50a7 100644 (file)
@@ -11,7 +11,7 @@
 <body>
        <div class="container">
        <jsp:include page="../fragments/mainmenu.jsp" />
-       <spring:url value="/sequence/sequence/results" var="query"/>
+       <spring:url value="/sequence/results" var="query"/>
 
        <div class="panel panel-default">
                <div class="panel-heading">
index b0f384a..a75f0bb 100644 (file)
@@ -92,7 +92,7 @@
                                                                        </c:if>
                                                                </tr>
                                                                <tr>
-                                                                       <td     style="text-align: center; font-weight: bold; font-family: monospace">
+                                                                       <td style="text-align: center; font-weight: bold; font-family: monospace">
                                                                                Jnetpred
                                                                        </td>
                                                                        <td style="text-align: left; border-buttom: dotted; font-family: monospace">