From d41ecc84e61048449538fbaabc1a777d95f42618 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 19 Jul 2020 12:49:43 +0100 Subject: EBI form filling --- bh20simplewebuploader/main.py | 7 +++-- bh20simplewebuploader/static/main.js | 2 +- bh20simplewebuploader/templates/ebi-sample.xml | 43 ++++++++------------------ 3 files changed, 18 insertions(+), 34 deletions(-) (limited to 'bh20simplewebuploader') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index d524efe..b40db6f 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -937,6 +937,7 @@ def getSEQbyLocationAndSpecimenSource(): result = r.json()['results']['bindings'] return str(result) -@app.route('/api/ebi-sample.xml', methods=['GET']) -def ebi_sample(): - return render_template('ebi-sample.xml') +@app.route('/api/ebi/sample-.xml', methods=['GET']) +def ebi_sample(id): + page = render_template('ebi-sample.xml',**locals()) + return page diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index deda6ec..a12311e 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -24,7 +24,7 @@ function toDIVTable(rows) { html += '
'; html += cell(''+id+''); html += cell('FASTA'); - html += cell('EBI/ENA export XML'); + html += cell('EBI/ENA export XML'); html += '
'; }); html += ''; diff --git a/bh20simplewebuploader/templates/ebi-sample.xml b/bh20simplewebuploader/templates/ebi-sample.xml index 694c471..441e29e 100644 --- a/bh20simplewebuploader/templates/ebi-sample.xml +++ b/bh20simplewebuploader/templates/ebi-sample.xml @@ -1,62 +1,46 @@ - - human gastric microbiota, mucosal + + COVID-19 PubSeq Sample - 1284369 - stomach metagenome - + 2697049 + Severe acute respiratory syndrome coronavirus 2 + SARS-CoV-2 investigation type - mimarks-survey + {{ investigation_type }} sequencing method - pyrosequencing + {{ sequence_method }} collection date - 2010 - - - host body site - Mucosa of stomach - - - human-associated environmental package - human-associated + {{ time }} geographic location (latitude) - 1.81 + {{ latidude }} DD geographic location (longitude) - -78.76 + {{ longitude }} DD geographic location (country and/or sea) - Colombia + {{ country }} geographic location (region and locality) - Tumaco - - - environment (biome) - coast - - - environment (feature) - human-associated habitat + {{ locality }} environment (material) - gastric biopsy + {{ material }} ENA-CHECKLIST @@ -65,4 +49,3 @@ - -- cgit v1.2.3