Error on iqtree step

Hello,

I’m trying to build a phylogenetic tree from a custom database of MAGs.
When running phylophlan with the following settings:
phylophlan
-i bins
-d phylophlan
-f 02_tol.cfg
–diversity high
–fast
-o output_tol
–nproc 16
–verbose 2>&1 | tee phylophlan.log

I successfully run the script all the way through generating the output_tol/bins_concatenated.aln. At the last step in iqtree, I receive the error:

[e] Command ‘[’/miniconda3/bin/iqtree’, ‘-quiet’, ‘-nt’, ‘AUTO’, ‘-m’, ‘LG’, ‘-s’, ‘output_tol/bins_concatenated.aln’, ‘-pre’, ‘/output_tol/bins.tre’]’ returned non-zero exit status 2.

I can see that iqtree seems to be the right version and functioning properly (/miniconda3/bin/iqtree --help generates the help list).
When I try to run the command by itself I get the error “Sequence XXX contains too many characters”, and it appears that my sequence alignment file contain gaps, but all samples do not have the same lengths.
Is there a parameter I missed in the phytophlan function call to remedy this error?
Thanks!

Hi, thanks for using PhyloPhlAn and reporting this.

This is very strange. So, first of all, can you provide the version of PhyloPhlAn you’re running? Also, am I right assuming that the configuration file you used has been created using the very same command as here?

Many thanks,
Francesco

Hello,

I’m using PhyloPhlAn version 3.0.60 (27 November 2020).

I created a Markdown file using the following commands (as on the website):

phylophlan_write_config_file
-d a
-o 02_tol.cfg
–db_aa diamond
–map_dna diamond
–map_aa diamond
–msa mafft
–trim trimal
–tree1 iqtree
–verbose 2>&1 | tee phylophlan_write_config_file.log

I’m currently re-running the program with --msa muscle and --tree1 fasttree in hopes that works, since the error (as far as I can tell…) seems to come from mafft not outputing alignments of the same size. (or maybe the trimal not working if that is what is supposed to make the alignments the same size?)

Thanks,
Becca

Thanks Becca for the info.

Either MAFFT or trimAl should not make MSA inconsistent, so if there is something not working there it could be due to something else.
I’m thinking about two things:

  1. The PhyloPhlAn repo contains a slightly newer version, so maybe you can clone and try with the new version. This will make it easier to identify where in the code I should look at in case we need to fix something there.
  2. Did you run only once the command you provided in your first message? Because PhyloPhlAn is able to resume a halted execution (and when there are errors it tries to clean broken files), but if some incomplete files remained that could result in problems in future runs on the same data.

Many thanks,
Francesco

Hi Francesco,

I’ll try downloading the updated code and running it once. My guess is it’s the same issue as was posted previously (I hadn’t seen it until just now): Supermatrix alignment has varying length -> error in tree build.
I only ran the program once, so I don’t think it’s an issue with cleaning broken files.

Thanks,
Becca

Hello,

For what it’s worth - the program did not have the same error when I ran it with MUSCLE & Fasttree (the following config file):
[db_aa]
program_name = ~miniconda3/bin/diamond
params = makedb
threads = --threads
input = --in
output = --db
version = version
command_line = #program_name# #params# #threads# #input# #output#

[map_dna]
program_name = ~miniconda3/bin/diamond
params = blastx --quiet --threads 1 --outfmt 6 --more-sensitive --id 50 --max-hsps 35 -k 0
input = --query
database = --db
output = --out
version = version
command_line = #program_name# #params# #input# #database# #output#

[map_aa]
program_name = ~miniconda3/bin/diamond
params = blastp --quiet --threads 1 --outfmt 6 --more-sensitive --id 50 --max-hsps 35 -k 0
input = --query
database = --db
output = --out
version = version
command_line = #program_name# #params# #input# #database# #output#

[msa]
program_name = ~miniconda3/bin/muscle
params = -quiet -maxiters 2
input = -in
output = -out
version = -version
command_line = #program_name# #params# #input# #output#

[trim]
program_name = ~miniconda3/bin/trimal
params = -gappyout
input = -in
output = -out
version = --version
command_line = #program_name# #params# #input# #output#

[tree1]
program_name =~miniconda3/bin/FastTreeMP
params = -quiet -pseudo -spr 4 -mlacc 2 -slownni -fastest -no2nd -mlnni 4 -lg
output = -out
command_line = #program_name# #params# #output# #input#
environment = OMP_NUM_THREADS=3

Best,
Becca

Thanks Becca.
Yes, I’m aware of the other discussion about this topic, but I never got a reply to do some debug on that case, and I don’t think it is related to the PhyloPhlAn markers as if it were PhyloPhlAn should always fail (which is not the case).
I’m happy it worked with the other settings, so I’m wondering where it could be due to some problems with MAFFT in your first trial.

I have the command line and the config file from your previous messages, if you can send me (by email if you prefer) your input folder, I’ll be happy to run some tests here to see if I can reproduce your error.

Many thanks,
Francesco