From 17a826c27653b2c0c93b67f7dc942bcf82b0c608 Mon Sep 17 00:00:00 2001 From: Adrian Viehweger Date: Fri, 12 May 2017 12:46:29 +0200 Subject: [PATCH] fix seq sequence discordance #3 --- zoo/load.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zoo/load.py b/zoo/load.py index 5443413..355017d 100644 --- a/zoo/load.py +++ b/zoo/load.py @@ -96,9 +96,7 @@ def write_record(out, accession, record, fmt): with open(os.path.join(out, accession + ext[fmt]), 'w') as output: print(record, file=output) elif fmt == 'json': - record['seq'] = record.pop('sequence') - # Biopython calls sequence field "sequence" while we want to work - # with "seq". Inconvenient. + record = record.replace('sequence', 'seq') # TODO: this is too hacky with open(out, 'a+') as output: print(record, file=output) # 'a+' append to file