Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
D-GENIES
Commits
5255692b
Commit
5255692b
authored
Feb 21, 2018
by
Floreal Cabanettes
Browse files
Close SeqIO
parent
c6d4f0ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dgenies/lib/functions.py
View file @
5255692b
...
...
@@ -166,8 +166,8 @@ class Functions:
is_compressed
=
fasta_file
.
endswith
(
".gz"
)
if
is_compressed
:
fasta_file
=
Functions
.
uncompress
(
fasta_file
)
seq
=
SeqIO
.
index
(
fasta_file
,
"fasta"
)
fasta_file_o
=
fasta_file
+
".sorted"
seq
=
SeqIO
.
index
(
fasta_file
,
"fasta"
)
with
open
(
fasta_file_o
,
"w"
)
as
fasta_out
:
for
name
,
props
in
index
.
items
():
sequence
=
seq
[
name
]
...
...
@@ -180,6 +180,7 @@ class Functions:
sequence
.
name
=
s_name
sequence
.
description
=
s_description
SeqIO
.
write
(
sequence
,
fasta_out
,
"fasta"
)
seq
.
close
()
if
is_compressed
:
os
.
remove
(
fasta_file
)
if
compress
:
...
...
src/dgenies/lib/paf.py
View file @
5255692b
...
...
@@ -758,6 +758,7 @@ class Paf:
seq
=
query_f
[
contig
]
seq
.
id
+=
"_unaligned"
SeqIO
.
write
(
seq
,
out
,
"fasta"
)
query_f
.
close
()
if
uncompressed
:
os
.
remove
(
query_fasta
)
status
=
"success"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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