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
miniannotator
Commits
60e89176
Commit
60e89176
authored
Aug 21, 2018
by
Floreal Cabanettes
Browse files
Fix fix of contigs + new orf sequence build
parent
e6f253ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
fixreference.py
View file @
60e89176
...
...
@@ -208,8 +208,6 @@ def fix_contig(reference, protein, ref_seq, id_ref, id_prot, reverse, fixed_orf_
len_gap
=
len
(
item
)
if
len_gap
>=
GAP_BLOCK_SIZE_MIN
:
gaps_block
.
append
((
position
,
position
+
(
len_gap
*
3
),
"ref"
))
new_refseq
+=
ref_seq
[
position
:
position
+
(
len_gap
*
3
)]
# Remove this to remove gaps in new map
position
+=
len_gap
*
3
elif
re
.
match
(
"^[A-Za-z*]+$"
,
item
)
is
not
None
:
if
len
(
item
)
>=
GAP_BLOCK_SIZE_MIN
:
gaps_block
.
append
((
position
,
len
(
item
),
"prot"
))
...
...
@@ -232,6 +230,7 @@ def fix_contig(reference, protein, ref_seq, id_ref, id_prot, reverse, fixed_orf_
if
reverse
:
# Restore intial sequence
new_refseq
=
str
(
Seq
(
new_refseq
).
reverse_complement
())
ref_seq
=
str
(
Seq
(
ref_seq
).
reverse_complement
())
contig_seq
=
fasta
.
fetch
(
id_ref
)
fixed_contig
=
contig_seq
.
replace
(
ref_seq
,
new_refseq
)
...
...
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