Commit b5f7b4bb authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix export query fasta: use reverse complement for reversed contigs, Fixes #86

parent 68ceea7c
......@@ -192,7 +192,13 @@ class Functions:
for name, props in index.items():
sequence = seq[name]
if props["to_reverse"]:
sequence = sequence[::-1]
s_id =
s_name =
s_description = sequence.description
sequence = sequence.reverse_complement() = s_id = s_name
sequence.description = s_description
SeqIO.write(sequence, fasta_out, "fasta")
if is_compressed:
......@@ -241,7 +241,7 @@ def build_fasta(id_res):
if os.path.exists(lock_query):
return jsonify({"success": True, "status": 1, "status_message": "In progress"})
return jsonify({"success": True, "status": 2, "status_message": "Done",
"gzip": query_fasta.endswith(".gz") or query_fasta.endswith(".gz.sorted")})
"gzip": False})
return jsonify({"success": True, "status": 1, "status_message": "In progress"})
elif is_sorted and os.path.exists(lock_query):
Supports Markdown
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