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
9b0e251e
Commit
9b0e251e
authored
8 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
Add message at the beggining of Fasttree run
parent
cdcaa54d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
genomeAPCAT/subcommands/tree.py
+1
-1
1 addition, 1 deletion
genomeAPCAT/subcommands/tree.py
genomeAPCAT/tree_module/fasttree_func.py
+8
-3
8 additions, 3 deletions
genomeAPCAT/tree_module/fasttree_func.py
genomeAPCAT/utils.py
+2
-0
2 additions, 0 deletions
genomeAPCAT/utils.py
with
11 additions
and
4 deletions
genomeAPCAT/subcommands/tree.py
+
1
−
1
View file @
9b0e251e
...
...
@@ -41,7 +41,7 @@ def main(align, boot, outfile, threads, verbose, quiet):
logger
=
logging
.
getLogger
()
ft
.
define_nb_threads
(
threads
)
ft
.
run_fasttree
(
align
file
,
boot
,
outfile
)
ft
.
run_fasttree
(
align
,
boot
,
outfile
,
quiet
)
def
build_parser
(
parser
):
...
...
This diff is collapsed.
Click to expand it.
genomeAPCAT/tree_module/fasttree_func.py
+
8
−
3
View file @
9b0e251e
...
...
@@ -24,10 +24,11 @@ def define_nb_threads(threads):
os
.
environ
[
"
OMP_NUM_THREADS
"
]
=
str
(
threads
)
def
run_fasttree
(
alignfile
,
boot
,
treefile
):
def
run_fasttree
(
alignfile
,
boot
,
treefile
,
quiet
):
"""
Run fasttree on given alignment
"""
logger
.
info
(
"
Running FasttreeMP...
"
)
if
not
boot
:
bootinfo
=
"
-nosupport
"
else
:
...
...
@@ -35,8 +36,12 @@ def run_fasttree(alignfile, boot, treefile):
logfile
=
alignfile
+
"
.fasttree.log
"
if
not
treefile
:
treefile
=
alignfile
+
"
.fasttree_tree.nwk
"
cmd
=
"
FastTreeMP -nt -gtr -noml -nocat -log {} {} {}
"
.
format
(
logfile
,
alignfile
,
bootinfo
)
cmd
=
"
FastTreeMP -nt -gtr -noml -nocat {} -log {} {}
"
.
format
(
bootinfo
,
logfile
,
alignfile
)
if
quiet
:
FNULL
=
open
(
os
.
devnull
,
'
w
'
)
else
:
FNULL
=
None
stdout
=
open
(
treefile
,
"
w
"
)
error
=
(
"
Problem while running Fasttree. See log file ({}) for
"
"
more information.
"
).
format
(
logfile
)
utils
.
run_cmd
(
cmd
,
error
,
stdout
=
stdout
,
eof
=
True
,
logger
=
logger
)
utils
.
run_cmd
(
cmd
,
error
,
stdout
=
stdout
,
eof
=
True
,
logger
=
logger
,
stderr
=
FNULL
)
This diff is collapsed.
Click to expand it.
genomeAPCAT/utils.py
+
2
−
0
View file @
9b0e251e
...
...
@@ -184,6 +184,8 @@ def run_cmd(cmd, error, eof=False, **kwargs):
"""
if
not
"
logger
"
in
kwargs
:
logger
=
logging
.
getLogger
(
"
utils.run_cmd
"
)
else
:
logger
=
kwargs
[
"
logger
"
]
if
not
"
stdout
"
in
kwargs
:
kwargs
[
"
stdout
"
]
=
None
if
not
"
stderr
"
in
kwargs
:
...
...
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