Strainphlan_config & Not found output/mutation_rates.tsv

Hello,
I’m working with the StrainPhlan 3.0 wiki, I’m on step 5 of the wiki (StrainPhlAn 3.0 · biobakery/MetaPhlAn Wiki · GitHub). I’m getting multiple errors with this step as below:

$ strainphlan -s consensus_markers/*.pkl -m db_markers/s__Bacteroides_caccae.fna -r reference_genomes/G000273725.fna.bz2 -o output -n 8 -c s__Bacteroides_caccae --mutation_rates
Thu Apr 29 10:18:04 2021: Start StrainPhlAn 3.0 execution
Thu Apr 29 10:18:04 2021: Creating temporary directory…
Thu Apr 29 10:18:04 2021: Done.
Thu Apr 29 10:18:04 2021: Getting markers from main sample files…
Thu Apr 29 10:18:04 2021: Done.
Thu Apr 29 10:18:04 2021: Getting markers from main reference files…Warning: [blastn] Examining 5 or more matches is recommended

Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Removing bad markers / samples…
Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Writing samples as markers’ FASTA files…
Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Writing filtered clade markers as FASTA file…
Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Calculating polymorphic rates…
Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Executing PhyloPhlAn 3.0…
Thu Apr 29 10:18:05 2021: Creating PhyloPhlAn 3.0 database…
Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Generating PhyloPhlAn 3.0 configuration file…
Thu Apr 29 10:18:05 2021: Done.
Thu Apr 29 10:18:05 2021: Processing samples…Traceback (most recent call last):
File “/usr/lib64/python3.8/shutil.py”, line 780, in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: ‘output/mutation_rates.tsv’ → ‘output/s__Bacteroides_caccae.mutation’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/bin/strainphlan”, line 8, in
sys.exit(main())
File “/usr/local/lib/python3.8/site-packages/metaphlan/strainphlan.py”, line 825, in main
strainphlan(args.database, args.clade_markers, args.samples, args.references,
File “/usr/local/lib/python3.8/site-packages/metaphlan/strainphlan.py”, line 781, in strainphlan
compute_phylogeny(samples_as_markers_dir, len(cleaned_markers_matrix), tmp_dir,
File “/usr/local/lib/python3.8/site-packages/metaphlan/strainphlan.py”, line 557, in compute_phylogeny
move(output_dir+“mutation_rates.tsv”,output_dir+clade+".mutation")
File “/usr/lib64/python3.8/shutil.py”, line 794, in move
copy_function(src, real_dst)
File “/usr/lib64/python3.8/shutil.py”, line 426, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File “/usr/lib64/python3.8/shutil.py”, line 259, in copyfile
with open(src, ‘rb’) as fsrc, open(dst, ‘wb’) as fdst:
FileNotFoundError: [Errno 2] No such file or directory: ‘output/mutation_rates.tsv’

Please help me fix this error.
thanks.
Will.

PhyloPhlAn version 3.0.60 (27 November 2020)
MetaPhlAn version 3.0.1 (25 Jun 2020)
CentOS 7

Hi @WillYang
Thanks for getting in touch.
I think there is a problem when StrainPhlAn internally calls PhyloPhlAn, something went wrong in the execution and the mutation_rates files was not created.
I would suggest you to upgrade both MetaPhlAn and PhyloPhlan to the latest releases, i.e. 3.0.8 and 3.0.2 respectively.
Best,
Aitor