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
1c5a5a58
Commit
1c5a5a58
authored
5 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
better logs
parent
aea238cf
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/utils.py
+4
-5
4 additions, 5 deletions
PanACoTA/utils.py
with
4 additions
and
5 deletions
PanACoTA/utils.py
+
4
−
5
View file @
1c5a5a58
...
@@ -309,7 +309,7 @@ def run_cmd(cmd, error, eof=False, **kwargs):
...
@@ -309,7 +309,7 @@ def run_cmd(cmd, error, eof=False, **kwargs):
call
.
wait
()
call
.
wait
()
retcode
=
call
.
returncode
retcode
=
call
.
returncode
except
OSError
:
except
OSError
:
logger
.
error
(
error
+
"
:
"
+
"
{
} does not exist
"
.
format
(
cmd
)
)
logger
.
error
(
"
error
: {cmd
} does not exist
"
)
if
eof
:
if
eof
:
sys
.
exit
(
1
)
sys
.
exit
(
1
)
else
:
else
:
...
@@ -392,14 +392,14 @@ def write_warning_skipped(skipped, do_format=False, prodigal_only=False, logfile
...
@@ -392,14 +392,14 @@ def write_warning_skipped(skipped, do_format=False, prodigal_only=False, logfile
logger
=
logging
.
getLogger
(
"
utils
"
)
logger
=
logging
.
getLogger
(
"
utils
"
)
list_to_write
=
"
\n
"
.
join
([
"
\t
-
"
+
genome
for
genome
in
skipped
])
list_to_write
=
"
\n
"
.
join
([
"
\t
-
"
+
genome
for
genome
in
skipped
])
if
not
do_format
:
if
not
do_format
:
logger
.
info
(
"
WARNING: Some genomes could not be annotated. See {
0}
"
.
format
(
logfile
)
)
logger
.
info
(
f
"
WARNING: Some genomes could not be annotated. See
{
soft
}
"
)
logger
.
warning
(
"
{
0
} had problems while annotating some genomes, or
"
logger
.
warning
(
f
"
{
soft
}
had problems while annotating some genomes, or
"
"
did not find any gene. Hence, they are not formatted, and absent
"
"
did not find any gene. Hence, they are not formatted, and absent
"
"
from your output database. Please look at the
"
"
from your output database. Please look at the
"
"
current error log
"
"
current error log
"
"
(<output_directory>/PanACoTA-annotate_list_genomes[-date].log.err) to get more
"
"
(<output_directory>/PanACoTA-annotate_list_genomes[-date].log.err) to get more
"
"
information on the problems. Here are those
"
"
information on the problems. Here are those
"
"
genomes:
\n
{1}
"
.
format
(
soft
,
list_to_write
)
)
"
genomes:
\n
{
list_to_write
}
"
)
else
:
else
:
logger
.
info
(
f
"
WARNING: Some genomes could not be formatted. See
{
logfile
}
"
)
logger
.
info
(
f
"
WARNING: Some genomes could not be formatted. See
{
logfile
}
"
)
logger
.
warning
((
"
Some genomes were annotated by {0}, but could not be formatted,
"
logger
.
warning
((
"
Some genomes were annotated by {0}, but could not be formatted,
"
...
@@ -447,7 +447,6 @@ def write_genomes_info(genomes, kept_genomes, list_file, res_path, qc=False):
...
@@ -447,7 +447,6 @@ def write_genomes_info(genomes, kept_genomes, list_file, res_path, qc=False):
logger
.
info
(
"
{} genomes were discarded.
"
.
format
(
nb_disc
))
logger
.
info
(
"
{} genomes were discarded.
"
.
format
(
nb_disc
))
# Get input list file name (without path)
# Get input list file name (without path)
_
,
name_lst
=
os
.
path
.
split
(
list_file
)
_
,
name_lst
=
os
.
path
.
split
(
list_file
)
# if not QC, write discarded genomes to a file "discarded-[list_file].lst"
# if not QC, write discarded genomes to a file "discarded-[list_file].lst"
if
not
qc
:
if
not
qc
:
outdisc
=
os
.
path
.
join
(
res_path
,
outdisc
=
os
.
path
.
join
(
res_path
,
...
...
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