Commit 82b3e7e1 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix sort if nothing to sort

parent 2de5cc19
#!/usr/bin/env python3
import os
import shutil
from math import sqrt
from numpy import mean
from pathlib import Path
......@@ -357,6 +358,10 @@ class Paf:
# Re-orient contigs:
if len(reorient_contigs) > 0:
sorted_file = self.paf + ".sorted"
shutil.copyfile(self.paf, sorted_file)
self.paf = sorted_file
# Update index:
......@@ -272,7 +272,6 @@ def dl_fasta(id_res, filename):
is_sorted = os.path.exists(os.path.join(res_dir, ".sorted"))
if not os.path.exists(lock_query) or not is_sorted:
query_fasta = Functions.get_fasta_file(res_dir, "query", is_sorted)
if query_fasta is not None:
if query_fasta.endswith(".gz") or query_fasta.endswith(".gz.sorted"):
content = get_file(query_fasta, True)
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