OSError: [Errno 13] Permission denied

33 views
Skip to first unread message

nicolas hazzi

unread,
Apr 3, 2025, 10:27:33 PMApr 3
to PartitionFinder
Hi everyone

I was running partition finder using this command on a WSL windows and I got the following error. Someone could help me to diagnose what is the problem?

best regards

Nicolas

(py27) nicolashazzi@hazzi:~/partitionfinder-2.1.1$ python PartitionFinder.py partition_finder.cfg
INFO     | 2025-04-01 09:03:24,995 | Note: NumExpr detected 16 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
INFO     | 2025-04-01 09:03:24,995 | NumExpr defaulting to 8 threads.
INFO     | 2025-04-01 09:03:25,737 | ------------- PartitionFinder 2.1.1 -----------------
INFO     | 2025-04-01 09:03:25,737 | You have Python version 2.7
INFO     | 2025-04-01 09:03:25,737 | Command-line arguments used: PartitionFinder.py partition_finder.cfg
INFO     | 2025-04-01 09:03:25,738 | ------------- Configuring Parameters -------------
INFO     | 2025-04-01 09:03:25,738 | Setting datatype to 'DNA'
INFO     | 2025-04-01 09:03:25,738 | Setting phylogeny program to 'phyml'
INFO     | 2025-04-01 09:03:25,739 | Program path is here /home/nicolashazzi/partitionfinder-2.1.1/programs
INFO     | 2025-04-01 09:03:25,739 | Setting working folder to: '/home/nicolashazzi/partitionfinder-2.1.1'
INFO     | 2025-04-01 09:03:25,739 | Loading configuration at './partition_finder.cfg'
INFO     | 2025-04-01 09:03:25,746 | Setting 'alignment' to 'conca.phy'
INFO     | 2025-04-01 09:03:25,747 | Setting 'branchlengths' to 'linked'
INFO     | 2025-04-01 09:03:25,748 | You set 'models' to: JC, JC+G, HKY
INFO     | 2025-04-01 09:03:25,776 | This analysis will use the following 3 models of molecular evolution
INFO     | 2025-04-01 09:03:25,776 | JC, JC+G, HKY
INFO     | 2025-04-01 09:03:25,777 | Setting 'model_selection' to 'aic'
INFO     | 2025-04-01 09:03:25,780 | Setting 'search' to 'all'
INFO     | 2025-04-01 09:03:25,781 | ------------------------ BEGINNING NEW RUN -------------------------------
INFO     | 2025-04-01 09:03:25,781 | Looking for alignment file './conca.phy'...
INFO     | 2025-04-01 09:03:25,781 | Using 16 cpus
INFO     | 2025-04-01 09:03:25,781 | Beginning Analysis
INFO     | 2025-04-01 09:03:25,814 | Reading alignment file './conca.phy'
INFO     | 2025-04-01 09:03:25,816 | Reading alignment file './analysis/start_tree/source.phy'
INFO     | 2025-04-01 09:03:25,822 | Starting tree will be estimated from the data.
INFO     | 2025-04-01 09:03:25,823 | Estimating Maximum Likelihood tree with RAxML fast experimental tree search for ./analysis/start_tree/filtered_source.phy
INFO     | 2025-04-01 09:03:25,824 | Using a separate GTR+G model for each data block
Traceback (most recent call last):
  File "PartitionFinder.py", line 25, in <module>
    sys.exit(main.main("PartitionFinder", "DNA"))
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/main.py", line 401, in main
    run_analysis(cfg, options)
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/main.py", line 334, in run_analysis
    anal = method(cfg, options.force_restart, options.processes)
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/analysis.py", line 66, in __init__
    self.make_tree(cfg.user_tree_topology_path)
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/analysis.py", line 192, in make_tree
    self.filtered_alignment_path, the_config.datatype, the_config.cmdline_extras, tree_scheme, self.threads)
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/raxml.py", line 124, in make_ml_topology
    run_raxml_pthreads(command, cpus)
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/raxml.py", line 77, in run_raxml_pthreads
    util.run_program(_raxml_pthreads_binary, command)
  File "/home/nicolashazzi/partitionfinder-2.1.1/partfinder/util.py", line 77, in run_program
    stderr=subprocess.PIPE)
  File "/home/nicolashazzi/miniconda3/envs/py27/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/home/nicolashazzi/miniconda3/envs/py27/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

Rob Lanfear

unread,
Apr 3, 2025, 10:29:23 PMApr 3
to PartitionFinder
Hi Nicolas,

Most likely this is due to you not having permission to access the RAxML executable on your machine. I'm afraid I don't know how to fix that. Still, it would be a good idea to move to IQ-TREE to do the partition merging.

Yours,

Rob

nepenthesbaphomet

unread,
Nov 10, 2025, 4:17:25 PMNov 10
to PartitionFinder
I know Rob is suggesting that we use IQTree, and I agree. But IQTree doesnt have the parameters I would like to use. Primarily, I use paritionfinder to create a minimum subset size in order to optimize partitions in my bayesian analyses.

e.g., "python partitionfinder-2.1.1/PartitionFinder.py ...--min-subset-size 2000"

I have a PF2 conda environment created using:

"conda/mamba create -n PF2 python=2.7 numpy pandas pytables pyparsing scipy scikit-learn raxml"

I then download the partition finder software. But I found that partition finder doesn't like the conda environment and get the same no permission error. In order to fix this I modify the partitionfinder-2.1.1/partfinder/raxml.py script 
Lines 40-50 should look something like this:

# This is set as the binary name because the previously compiled raxml had a
# bug when calculating site likelihoods, this needs to be changed back to
# "raxml" once a newer version without the bug is compiled.
_binary_name = '[YOUR_CONDA_ENV_PATH]/PF2/bin/raxmlHPC'
_binary_name_pthreads = '[YOUR_CONDA_ENV_PATH]/PF2/bin/raxmlHPC-PTHREADS'
#if sys.platform == 'win32':
#    _binary_name            += ".exe"
#    _binary_name_pthreads   += ".exe"
#if sys.platform == "linux" or sys.platform == "linux2":
#    _binary_name            += ".linux"
#    _binary_name_pthreads   += ".linux"

I use the partitions generated in partitionfinder and then the modelfinder in IQTree to infer the models for BEAST:

iqtree -s ... -p partitionfinder2_best-scheme.nex -m MF -mset K80,TN93,SYM,HKY,GTR,TNe,GTR -mrate E,I,G,I+G -merit BIC ...

Tested on:
Ubuntu 16.04.4 LTS
conda 22.9.0

Rob Lanfear

unread,
Nov 10, 2025, 4:19:28 PMNov 10
to PartitionFinder
Just a quick one - as far as I know, the -min-subset-size should only work with k-means, i.e. with morphological datasets. In principle, it shouldn't do anything if you specify it with a DNA dataset.

Rob

nepenthesbaphomet

unread,
Nov 13, 2025, 8:54:42 AMNov 13
to PartitionFinder
Hi Rob,

Thanks for letting me know thats not the intended behavior. Maybe its something else in PF2 that does it? When ever I use PF2 to merge partitions using -min-subset-size with locus data I end up with partitions no smaller than the flag and get messages in the log like:
"INFO     | 2025-09-29 17:35:31,332 | analysis_m |       4 subsets merged because of --min-subset-size and/or --all-states settings"

I haven't tried running it without -min-subset-size, but when I tried generating merged partitions in IQTree I always end up with substantially more partitions than PF2 would with the -min-subset-size flag.

I hope this doesn't derail this thread too much.
Best!
Reply all
Reply to author
Forward
0 new messages