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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amandine PERRIN
panacota
Commits
633e7fb5
Commit
633e7fb5
authored
5 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
Correct mmseq functions for pangenome
parent
b5c7cd3c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PanACoTA/pangenome_module/mmseqs_functions.py
+11
-6
11 additions, 6 deletions
PanACoTA/pangenome_module/mmseqs_functions.py
with
11 additions
and
6 deletions
PanACoTA/pangenome_module/mmseqs_functions.py
+
11
−
6
View file @
633e7fb5
...
@@ -12,6 +12,8 @@ import os
...
@@ -12,6 +12,8 @@ import os
import
time
import
time
import
multiprocessing
import
multiprocessing
import
progressbar
import
progressbar
import
copy
from
PanACoTA
import
utils
from
PanACoTA
import
utils
logger
=
logging
.
getLogger
(
"
pangnome.mmseqs
"
)
logger
=
logging
.
getLogger
(
"
pangnome.mmseqs
"
)
...
@@ -363,22 +365,25 @@ def create_mmseqs_db(mmseqdb, prt_path, logmmseq):
...
@@ -363,22 +365,25 @@ def create_mmseqs_db(mmseqdb, prt_path, logmmseq):
if
os
.
path
.
isfile
(
mmseqdb
):
if
os
.
path
.
isfile
(
mmseqdb
):
for
file
in
[
mmseqdb
+
ext
for
ext
in
outext
]:
for
file
in
[
mmseqdb
+
ext
for
ext
in
outext
]:
if
not
os
.
path
.
isfile
(
file
):
if
not
os
.
path
.
isfile
(
file
):
break
continue
files_existing
.
append
(
file
)
files_existing
.
append
(
file
)
if
len
(
files_existing
)
!=
len
(
outext
):
if
len
(
files_existing
)
!=
len
(
outext
):
logger
.
warning
(
f
"
mmseq database
{
mmseqdb
}
already exists, but at least 1 associated
"
logger
.
warning
(
f
"
mmseq
s
database
{
mmseqdb
}
already exists, but at least 1 associated
"
"
file (.dbtype, .index etc). is missing. The program will
"
"
file (.dbtype, .index etc). is missing. The program will
"
"
remove existing files and recreate the database.
"
)
"
remove existing files and recreate the database.
"
)
files_remaining
=
copy
.
deepcopy
(
files_existing
)
for
file
in
files_existing
:
for
file
in
files_existing
:
os
.
remove
(
file
)
os
.
remove
(
file
)
# Delete file
logger
.
details
(
"
Removing {}
"
.
format
(
file
))
files_remaining
.
remove
(
file
)
# Remove file from list of existing files
logger
.
details
(
f
"
Removing
'
{
file
}
'
.
"
)
files_existing
=
copy
.
deepcopy
(
files_remaining
)
else
:
else
:
logger
.
warning
(
"
mmseq database {mmseqdb} already exists. The program will
"
logger
.
warning
(
f
"
mmseq
s
database
{
mmseqdb
}
already exists. The program will
"
"
use it.
"
)
"
use it.
"
)
return
0
return
0
if
len
(
files_existing
)
!=
len
(
outext
):
if
len
(
files_existing
)
!=
len
(
outext
):
logger
.
info
(
"
Creating database
"
)
logger
.
info
(
"
Creating database
"
)
logger
.
details
(
"
Exiting files: {}
"
.
format
(
len
(
files_existing
)))
logger
.
details
(
"
Exi
s
ting files: {}
"
.
format
(
len
(
files_existing
)))
logger
.
details
(
"
Expected extentions: {}
"
.
format
(
len
(
outext
)))
logger
.
details
(
"
Expected extentions: {}
"
.
format
(
len
(
outext
)))
cmd
=
f
"
mmseqs createdb
{
prt_path
}
{
mmseqdb
}
"
cmd
=
f
"
mmseqs createdb
{
prt_path
}
{
mmseqdb
}
"
msg
=
(
f
"
Problem while trying to convert database
{
prt_path
}
to mmseqs
"
msg
=
(
f
"
Problem while trying to convert database
{
prt_path
}
to mmseqs
"
...
...
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