I’m trying to run PhyloPhlAn 3 (version 3.0.21) as a SLURM job using a singularity container to make a phylogenetic tree of a set of MAGs, but I’m running into errors when running my script. I have posted the script and errors (from logs) below in hope that somebody with more experience than
When I run the following script:
singularity exec /cvmfs/singularity.galaxyproject.org/p/h/phylophlan:3.0.3–pyhdfd78af_0 phylophlan_write_config_file
-o matrix/supermatrix_nt.cfg
-d n
–db_dna makeblastdb
–map_dna blastn
–msa mafft
–trim trimal
–tree1 fasttree
–tree2 raxml
–overwrite
–verbose
singularity exec /cvmfs/singularity.galaxyproject.org/p/h/phylophlan:3.0.3--pyhdfd78af_0 phylophlan \
-i /mnt/users/larssn/projects/Didrik/metagenomes/assembly/coassembly/MAGs \
-d phylophlan_databases/phylophlan.tar \
--diversity low \
-f matrix/supermatrix_nt.cfg
I get one or the other error message depening on whether I have made the directory, “phylophlan_databases” or not. (also the same issue if I have the phylophlan.tar file in the directory and not)
Without the directory:
phylophlan_write_config_file.py version 3.0.21 (11 June 2021)
Command line: /usr/local/bin/phylophlan_write_config_file -o ./supermatrix_nt.cfg -d n --db_dna makeblastdb --map_dna blastn --msa mafft --trim trimal --tree1 fasttree --tree2 raxml --overwrite --verbose
Arguments: {‘output’: ‘./supermatrix_nt.cfg’, ‘db_type’: ‘n’, ‘db_dna’: ‘makeblastdb’, ‘db_aa’: None, ‘map_dna’: ‘blastn’, ‘map_aa’: None, ‘msa’: ‘mafft’, ‘trim’: ‘trimal’, ‘gene_tree1’: None, ‘gene_tree2’: None, ‘tree1’: ‘fasttree’, ‘tree2’: ‘raxml’, ‘absolute_path’: False, ‘force_nucleotides’: None, ‘overwrite’: True, ‘verbose’: True}
Output file “./supermatrix_nt.cfg” will be overwritten
[w] “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan_configs/” folder does not exists
Traceback (most recent call last):
File “/usr/local/bin/phylophlan”, line 10, in
sys.exit(phylophlan_main())
File “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan.py”, line 3243, in phylophlan_main
project_name = check_args(args, sys.argv, verbose=args.verbose)
File “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan.py”, line 347, in check_args
check_and_create_folder(args.output, create=True, exit=True, verbose=verbose)
File “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan.py”, line 610, in check_and_create_folder
os.mkdir(folder, mode=0o775)
FileNotFoundError: [Errno 2] No such file or directory: ‘MAGs_phylophlan_databases/phylophlan.tar’
With the directory:
phylophlan_write_config_file.py version 3.0.21 (11 June 2021)
Command line: /usr/local/bin/phylophlan_write_config_file -o ./supermatrix_nt.cfg -d n --db_dna makeblastdb --map_dna blastn --msa mafft --trim trimal --tree1 fasttree --tree2 raxml --overwrite --verbose
Arguments: {‘output’: ‘./supermatrix_nt.cfg’, ‘db_type’: ‘n’, ‘db_dna’: ‘makeblastdb’, ‘db_aa’: None, ‘map_dna’: ‘blastn’, ‘map_aa’: None, ‘msa’: ‘mafft’, ‘trim’: ‘trimal’, ‘gene_tree1’: None, ‘gene_tree2’: None, ‘tree1’: ‘fasttree’, ‘tree2’: ‘raxml’, ‘absolute_path’: False, ‘force_nucleotides’: None, ‘overwrite’: True, ‘verbose’: True}
Output file “./supermatrix_nt.cfg” will be overwritten
[w] “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan_configs/” folder does not exists
Traceback (most recent call last):
File “/usr/local/bin/phylophlan”, line 10, in
sys.exit(phylophlan_main())
File “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan.py”, line 3243, in phylophlan_main
project_name = check_args(args, sys.argv, verbose=args.verbose)
File “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan.py”, line 347, in check_args
check_and_create_folder(args.output, create=True, exit=True, verbose=verbose)
File “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan.py”, line 610, in check_and_create_folder
os.mkdir(folder, mode=0o775)
FileExistsError: [Errno 17] File exists: ‘MAGs_phylophlan_databases/phylophlan.tar’
I am struggling to understand what the problem is and how to mitigate it. Anybody else dealt with this issue? Given that I have tried both, I am thinking it might be the warning that occurs in both instances:
[w] “/usr/local/lib/python3.10/site-packages/phylophlan/phylophlan_configs/” folder does not exists
Thank you for taking the time to read through my issue. Any help is greatly appreciated.
Best regards,
Didrik