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
a897d661
Commit
a897d661
authored
7 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
fastme: if alignment in phylip already exists do not redo it
parent
dc700a0e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
genomeAPCAT/tree_module/fastme_func.py
+5
-0
5 additions, 0 deletions
genomeAPCAT/tree_module/fastme_func.py
genomeAPCAT/utils.py
+4
-2
4 additions, 2 deletions
genomeAPCAT/utils.py
with
9 additions
and
2 deletions
genomeAPCAT/tree_module/fastme_func.py
+
5
−
0
View file @
a897d661
...
...
@@ -31,6 +31,11 @@ def convert2phylip(infile, outfile):
Input alignment is in fasta format. Input of fastME must be in Phylip-relaxed format.
Convert it here.
"""
if
os
.
path
.
isfile
(
outfile
):
logger
.
info
(
"
Phylip alignment file already existing.
"
)
logger
.
warning
((
"
The Phylip alignment file {} already exists. The program
"
"
will use it instead of re-converting {}.
"
).
format
(
outfile
,
infile
))
return
logger
.
info
(
"
Converting fasta alignment to PHYLIP-relaxed format.
"
)
with
open
(
infile
,
'
r
'
)
as
input_handle
,
open
(
outfile
,
'
w
'
)
as
output_handle
:
alignments
=
AlignIO
.
parse
(
input_handle
,
"
fasta
"
)
...
...
This diff is collapsed.
Click to expand it.
genomeAPCAT/utils.py
+
4
−
2
View file @
a897d661
...
...
@@ -191,8 +191,10 @@ def run_cmd(cmd, error, eof=False, **kwargs):
if
not
"
stderr
"
in
kwargs
:
kwargs
[
"
stderr
"
]
=
None
try
:
retcode
=
subprocess
.
call
(
shlex
.
split
(
cmd
),
stdout
=
kwargs
[
"
stdout
"
],
call
=
subprocess
.
Popen
(
shlex
.
split
(
cmd
),
stdout
=
kwargs
[
"
stdout
"
],
stderr
=
kwargs
[
"
stderr
"
])
call
.
wait
()
retcode
=
call
.
returncode
except
OSError
:
logger
.
error
(
error
+
"
:
"
+
"
{} does not exist
"
.
format
(
cmd
))
if
eof
:
...
...
@@ -203,7 +205,7 @@ def run_cmd(cmd, error, eof=False, **kwargs):
logger
.
error
(
error
)
if
eof
:
sys
.
exit
(
retcode
)
return
retcode
return
call
def
plot_distr
(
values
,
limit
,
outfile
,
title
,
text
):
...
...
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