Commit ba6f41fd authored by Bertrand  NÉRON's avatar Bertrand NÉRON
Browse files

FIX parsing of taxonomy

when the taxonomy ends with '.' or ';' the 'ast char must be removed
there was an error, only the last term was assigned to the taxonomy
which induce javascript error on the sever side
in the by_taxonomy view

taxonomy.join(', ') is not a function
parent 08285e20
......@@ -45,7 +45,9 @@ def replicon_parser(replicon_data):
taxonomy = fields[4].split('; ')
# remove ending dot or semi-colon from the last term of taxonnomy
if taxonomy[-1].endswith('.') or taxonomy[-1].endswith(';'):
taxonomy = taxonomy[-1][:-1]
last_term = taxonomy[-1][:-1]
taxonomy = taxonomy[:-1]
replicon_type = fields[5]
replicon_db[replicon_id] = Replicon_info(replicon_id, ncbi_id, taxid, strain,
......@@ -226,7 +228,6 @@ def fill_db(server_uri, db_name, user, passwd, replicon_db, system_db, force_upd
if __name__ == '__main__':
import argparse
import sys
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment