Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amandine PERRIN
pipeline_annotation
Commits
136e1c33
Commit
136e1c33
authored
Sep 16, 2021
by
Amandine PERRIN
Browse files
gene name starting by genome name
parent
072bbd29
Pipeline
#65317
passed with stages
in 6 minutes and 30 seconds
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
PanACoTA/align_module/post_align.py
View file @
136e1c33
...
...
@@ -326,14 +326,9 @@ def get_genome(header, all_genomes):
header
=
header
.
split
(
">"
)[
1
].
split
()[
0
]
for
genome
in
all_genomes
:
if
genome
in
header
:
# header should be genome<something>_num
# -> header.split(genome) should be empty for the first field
# If not empty, means that genome name is included into another genome name, so
# we must not return this genome.
# For example, genome "8-KG" is in header "98-KG_xxx", but the correct genome for this
# header is "98-KG"
if
not
header
.
split
(
genome
)[
0
]:
if
header
.
startswith
(
genome
):
# header should start with the genome name. Nothing before it.
# Ex: >86KG_12345 is from genome 86KG. >6KG_12345 is from genome 6KG, not 86KG
return
genome
logger
.
error
((
f
"Protein
{
header
}
does not correspond to any genome name "
f
"given...
{
all_genomes
}
"
))
...
...
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