From 21886a47f2568aa3acd0b4c0e89732e48211a570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bertrand=20N=C3=A9ron?= <bneron@pasteur.fr> Date: Mon, 18 Jan 2016 10:51:56 +0100 Subject: [PATCH] modify template and validator to new structure of the dosuments the documents have not any longer fields: gene.full_score gene.evalue gene.best_domain_score gene.best_domain_evalue gene.c_value gene.coverage_profile but there are now new fields: replicon.ncbi_id gene.score gene.i_evalue gene.coverage --- .../secreton/templates/secretion_system.html | 24 ++++++++----------- src/couchapp/secreton/validate_doc_update.js | 8 +++++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/couchapp/secreton/templates/secretion_system.html b/src/couchapp/secreton/templates/secretion_system.html index d2f4e08..01b827d 100644 --- a/src/couchapp/secreton/templates/secretion_system.html +++ b/src/couchapp/secreton/templates/secretion_system.html @@ -269,10 +269,12 @@ <h2>Replicon</h2> <ul> {{#replicon}} + <li>name: {{name}}</li> + <li>ncbi_id: {{ncbi_id}}</li> <li>taxid: {{taxid}}</li> + <li>strain: {{strain}}</li> <li>taxonomy: {{taxonomy}}</li> - <li>type: {{type}}</li> - <li>name: {{name}}</li> + <li>type: {{type}}</li> {{/replicon}} </ul> @@ -291,12 +293,9 @@ <th>Begin</th> <th>End</th> <th>Match</th> - <th>Full-score</th> - <th>Evalue</th> - <th>Best-domain-score</th> - <th>Best-domain-evalue</th> - <th>c-Evalue</th> - <th>Coverage-profile</th> + <th>Score</th> + <th>i-evalue</th> + <th>Coverage</th> <th>Match-begin</th> <th>Match-end</th> <th>Gene-name</th> @@ -313,12 +312,9 @@ <td>{{begin}}</td> <td>{{end}}</td> <td>{{match}}</td> - <td>{{full_score}}</td> - <td>{{e_value}}</td> - <td>{{best_domain_score}}</td> - <td>{{best_domain_evalue}}</td> - <td>{{c_value}}</td> - <td>{{coverage_profile}}</td> + <td>{{score}}</td> + <td>{{i_evalue}}</td> + <td>{{coverage}}</td> <td>{{match_begin}}</td> <td>{{match_end}}</td> <td>{{name}}</td> diff --git a/src/couchapp/secreton/validate_doc_update.js b/src/couchapp/secreton/validate_doc_update.js index 7262d8b..bdde65f 100644 --- a/src/couchapp/secreton/validate_doc_update.js +++ b/src/couchapp/secreton/validate_doc_update.js @@ -5,11 +5,15 @@ function(newDoc, oldDoc, userCtx, secObj) { } else { if (!newDoc.code) throw({forbidden : "Secretion system must have a code"}); if (!newDoc.genes) throw({forbidden : "Secretion system must have a genes"}); - if (!newDoc.T3SS_family) throw({forbidden : "Secretion system must have a T3SS_family"}); + if (!newDoc.predicted_system) throw({forbidden : "Secretion system must have a predicted system"}); + if (!newDoc.system_status) throw({forbidden : "Secretion system must have a system_status"}); if (!newDoc.replicon) throw({forbidden : "Secretion system must have a replicon"}); + if (!newDoc.replicon.name) throw({forbidden : "Replicon must have a name"}); + if (!newDoc.replicon.ncbi_id) throw({forbidden : "Replicon must have a ncbi_id"}); + if (!newDoc.replicon.taxid) throw({forbidden : "Replicon must have a taxid"}); if (!newDoc.replicon.strain) throw({forbidden : "Replicon must have a strain"}); + if (!newDoc.replicon.taxonomy) throw({forbidden : "Replicon must have a taxonomy"}); if (!newDoc.replicon.type) throw({forbidden : "Replicon must have a type"}); - if (!newDoc.replicon.name) throw({forbidden : "Replicon must have a name"}); } } -- GitLab