Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
panacota
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amandine PERRIN
panacota
Commits
136e1c33
Commit
136e1c33
authored
3 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
gene name starting by genome name
parent
072bbd29
No related branches found
No related tags found
No related merge requests found
Pipeline
#65317
passed
3 years ago
Stage: test
Stage: coverage
Stage: doc
Stage: deploy
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PanACoTA/align_module/post_align.py
+4
-9
4 additions, 9 deletions
PanACoTA/align_module/post_align.py
with
4 additions
and
9 deletions
PanACoTA/align_module/post_align.py
+
4
−
9
View file @
136e1c33
...
...
@@ -326,15 +326,10 @@ 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
]:
return
genome
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
}
"
))
return
None
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment