Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
genotoul-bioinfo
D-GENIES
Commits
82b3e7e1
Commit
82b3e7e1
authored
Nov 17, 2017
by
Floreal Cabanettes
Browse files
Fix sort if nothing to sort
parent
2de5cc19
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/paf.py
View file @
82b3e7e1
#!/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
:
self
.
reorient_contigs_in_paf
(
reorient_contigs
)
else
:
sorted_file
=
self
.
paf
+
".sorted"
shutil
.
copyfile
(
self
.
paf
,
sorted_file
)
self
.
paf
=
sorted_file
# Update index:
self
.
_update_query_index
(
reorient_contigs
)
...
...
srv/main.py
View file @
82b3e7e1
...
...
@@ -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
)
print
(
query_fasta
)
if
query_fasta
is
not
None
:
if
query_fasta
.
endswith
(
".gz"
)
or
query_fasta
.
endswith
(
".gz.sorted"
):
content
=
get_file
(
query_fasta
,
True
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment