Skip to content

Commit

Permalink
Skip TrimAL, fix error reporting of phylophlan
Browse files Browse the repository at this point in the history
  • Loading branch information
PuncocharM committed Jan 30, 2024
1 parent de48935 commit d475a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions metaphlan/utils/external_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def generate_phylophlan_config_file(output_dir, configuration):
conf_file = os.path.join(output_dir, "phylophlan.cfg")
params = {
"program_name": "phylophlan_write_config_file",
"params": "-d n --db_dna makeblastdb --map_dna {} --msa {} --trim {} --tree1 {}".format(configuration['map'], configuration['aligner'], configuration['trim'], configuration['tree1']),
"params": "-d n --db_dna makeblastdb --map_dna {} --msa {} --tree1 {}".format(configuration['map'], configuration['aligner'], configuration['tree1']),
"output": "-o",
"command_line": "#program_name# #output# #params#"
}
Expand Down Expand Up @@ -265,11 +265,9 @@ def run_command(cmd, shell=False, **kwargs):
stdout = stdout.decode()
if isinstance(stderr, bytes):
stderr = stderr.decode()
error('Execution failed for command', cmd)
print('stdout: ')
print(stdout)
print('stderr: ')
print(stderr)
error(f'Execution failed for command {cmd}', exit=False)
error(f'stdout:\n{stdout}', exit=False)
error(f'stderr:\n{stderr}', exit=False)
error('Exiting', exit=True)

return r
1 change: 0 additions & 1 deletion metaphlan/utils/phylophlan_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def get_phylophlan_configuration():
configuration = {
'map': 'blastn',
'aligner': 'mafft',
'trim': 'trimal',
'tree1': 'raxml'
}
return configuration
Expand Down

0 comments on commit d475a8a

Please sign in to comment.