Strainphlan_config & line 655 TypeError

Hello,

Thanks for developing and supporting these great tools. I’m working with the StrainPhlan 3.0 wiki, in a conda-installed environment with metaphlan 3.0 (20 Mar 2020) & phylophlan 3.0.51 (11 May 2020).

I’m on step 5 of the wiki (https://github.com/biobakery/MetaPhlAn/wiki/StrainPhlAn-3.0). I’m getting multiple errors with this step as below:

strainphlan -s consensus_markers/*.pkl -m db_markers/s__
Escherichia_coli.fna -r genomes/E_coli_group_FMT3.fna -o output -n 10 -c s__Escherichia_coli --mutation_rat
es
Sat May 30 09:54:09 2020: Start StrainPhlAn 3.0 execution
Sat May 30 09:54:09 2020: Creating temporary directory…
Sat May 30 09:54:09 2020: Done.
Sat May 30 09:54:09 2020: Getting markers from main sample files…
Sat May 30 09:54:09 2020: Done.
Sat May 30 09:54:09 2020: Getting markers from main reference files…Warning: [blastn] Examining 5 or more
matches is recommended

Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Removing bad markers / samples…
Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Writing samples as markers’ FASTA files…
Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Writing filtered clade markers as FASTA file…
Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Calculating polymorphic rates…
Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Executing PhyloPhlAn 3.0…
Sat May 30 09:54:10 2020: Creating PhyloPhlAn 3.0 database…
Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Generating PhyloPhlAn 3.0 configuration file…
Sat May 30 09:54:10 2020: Done.
Sat May 30 09:54:10 2020: Processing samples…[e] “/home/mwoodwo/anaconda3/envs/metaphlan3/lib/pytho
n3.7/site-packages/phylophlan/phylophlan_configs/” folder does not exists

Sat May 30 09:54:13 2020: Done.
Sat May 30 09:54:13 2020: Done.
Sat May 30 09:54:13 2020: Writing information file…Traceback (most recent call last):
File “/home/mwoodwo/anaconda3/envs/metaphlan3/bin/strainphlan”, line 10, in
sys.exit(main())
File “/home/mwoodwo/anaconda3/envs/metaphlan3/lib/python3.7/site-packages/metaphlan/strainphlan.py”, line
830, in main
args.mutation_rates, args.print_clades_only, args.nprocs)
File “/home/mwoodwo/anaconda3/envs/metaphlan3/lib/python3.7/site-packages/metaphlan/strainphlan.py”, line
790, in strainphlan
phylophlan_mode, nprocs)
File “/home/mwoodwo/anaconda3/envs/metaphlan3/lib/python3.7/site-packages/metaphlan/strainphlan.py”, line
655, in write_info
"\nNumber of processes used: "+ str(nprocs)) + “\n”
TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’

  • Is there a recommended step for creating a phylophlan_config directory?
  • Are there any workarounds for the TypeError you might suggest?

thanks!

Mike

Hello Mike, thanks for reporting this.
I’m tagging @aitor.blancomiguez who is developing StrainPhlAn as I believe your error is on the StrainPhlAn side and not on PhyloPhlAn.

Thanks,
Francesco

Hello Mike,
The problem seem to be a missing folder. Could you please create the following directory:
/home/mwoodwo/anaconda3/envs/metaphlan3/lib/pytho
n3.7/site-packages/phylophlan/phylophlan_configs/
I think this will solve your problem

Best,
Aitor

1 Like