IndexError: list index out of range

523 views
Skip to first unread message

Hugo Pereira

unread,
Jul 2, 2013, 9:31:22 AM7/2/13
to partiti...@googlegroups.com
Hi,

I am trying to run an analysis with only one nuclear gene (no partitions), basicaly i'm trying to assess the best substitution model and i'm always getting the same error:


C:\>python "C:\Users\Hugo\Documents\Mestrado\Software\partitionfinder\PartitionF
inder.py" "C:\Users\Hugo\Documents\Mestrado\Tese mestrado\Phylogeny\Fib7\partiti
on finder"
INFO     | 2013-07-02 14:09:28,313 | You appear to have 4 cpus
INFO     | 2013-07-02 14:09:28,342 | ------------- PartitionFinder v1.0.1 ------
-----------
INFO     | 2013-07-02 14:09:28,342 | You have Python version 2.7
INFO     | 2013-07-02 14:09:28,344 | Setting datatype to 'DNA'
INFO     | 2013-07-02 14:09:28,345 | Setting working folder to: 'C:\Users\Hugo\D
ocuments\Mestrado\Tese mestrado\Phylogeny\Fib7\partition finder'
INFO     | 2013-07-02 14:09:28,346 | ------------------------ BEGINNING NEW RUN
-------------------------------
INFO     | 2013-07-02 14:09:28,348 | Loading configuration at '.\partition_finde
r.cfg'
INFO     | 2013-07-02 14:09:28,362 | Setting 'alignment' to 'fib7.phy'
INFO     | 2013-07-02 14:09:28,368 | Setting 'branchlengths' to 'linked'
INFO     | 2013-07-02 14:09:28,369 | Setting 'models' to 'beast'
INFO     | 2013-07-02 14:09:28,371 | Setting datatype to 'DNA'
INFO     | 2013-07-02 14:09:28,371 | Setting 'model_selection' to 'bic'
INFO     | 2013-07-02 14:09:28,375 | Setting 'search' to 'greedy'
INFO     | 2013-07-02 14:09:28,380 | Looking for alignment file '.\fib7.phy'...
INFO     | 2013-07-02 14:09:28,381 | Beginning Analysis
INFO     | 2013-07-02 14:09:28,381 | Removing Schemes in '.\analysis\schemes' (t
hey will be recalculated from existing subset data)
INFO     | 2013-07-02 14:09:28,392 | Reading alignment file '.\fib7.phy'
INFO     | 2013-07-02 14:09:28,437 | Making BioNJ tree for .\analysis\start_tree
\filtered_source.phy
INFO     | 2013-07-02 14:09:29,042 | Estimating GTR+I+G branch lengths on tree
INFO     | 2013-07-02 14:15:51,834 | Branchlength estimation finished
INFO     | 2013-07-02 14:15:51,835 | Starting tree with branch lengths is here:
.\analysis\start_tree\filtered_source.phy_phyml_tree.txt
INFO     | 2013-07-02 14:15:51,835 | Performing greedy analysis
INFO     | 2013-07-02 14:15:51,835 | This will result in a maximum of 1 schemes
being created
INFO     | 2013-07-02 14:15:51,836 | PartitionFinder will have to analyse a maxi
mum of 1 subsets of sites to complete this analysis
INFO     | 2013-07-02 14:15:51,838 | Analysing starting scheme (scheme 1)
INFO     | 2013-07-02 14:15:51,838 | Analysing scheme 1/1
INFO     | 2013-07-02 14:15:51,839 | Analysing subset 1/1: 100.00% done
INFO     | 2013-07-02 14:18:58,299 | ***Greedy algorithm step 1***
Traceback (most recent call last):
  File "C:\Users\Hugo\Documents\Mestrado\Software\partitionfinder\PartitionFinde
r.py", line 23, in <module>
    sys.exit(main.main("PartitionFinder", "v1.0.1", "DNA"))
  File "C:\Users\Hugo\Documents\Mestrado\Software\partitionfinder\partfinder\mai
n.py", line 157, in main
    results = anal.analyse()
  File "C:\Users\Hugo\Documents\Mestrado\Software\partitionfinder\partfinder\ana
lysis.py", line 82, in analyse
    self.do_analysis()
  File "C:\Users\Hugo\Documents\Mestrado\Software\partitionfinder\partfinder\ana
lysis_method.py", line 107, in do_analysis
    lumpings = algorithm.lumpings(start_description)
  File "C:\Users\Hugo\Documents\Mestrado\Software\partitionfinder\partfinder\alg
orithm.py", line 71, in lumpings
    while lump.count(sub[1])>0:
IndexError: list index out of range

I have a dataset of 54 species and i had no problem with the mitochondrial genes.
Probablly i'm missing something quite simple but i can't figure it out.
Any hints?

Best regards,
Hugo

Rob Lanfear

unread,
Jul 2, 2013, 10:14:41 AM7/2/13
to partiti...@googlegroups.com
Hi Hugo,

All you need to do is change the search from "greedy" to "user", and then specify a partitioning scheme with your one subset in it. E.g. if your gene is called "gene1" you would do this:

search = user;

scheme1 = (gene1);

Then it should work. 

The issue you're having with the greedy algorithm is a known bug, which I'll fix for the next release. 

Cheers,

Rob

Hugo Pereira

unread,
Jul 4, 2013, 5:04:27 AM7/4/13
to partiti...@googlegroups.com
Hi,

Thanks Rob it worked.

Best,
Hugo

Mark Miller

unread,
May 22, 2017, 9:07:28 PM5/22/17
to PartitionFinder

Hi,

I am doing some benchmarking of speed v threads for PF2 v.2.1.1, and am seeing the "list index out of range" message, but only intermittently. Sometimes the jobs complete, sometimes they crash.
Crashes were most frequent with 2 threads/cores (3/4 crashed), and did not occur when there were 8 or more threads/cores. 1/4 crashed with 4 threads/cores. These are jobs that run a couple of days, so they are good sized. I am appending the message I see, do you have any advice?

Best,
Mark


IndexError: list index out of range

Traceback (most recent call last):
  File "/share/apps/compute/partitionfinder/PartitionFinder.py", line 25, in <module>
    sys.exit(main.main("PartitionFinder", "DNA"))
  File "/share/apps/compute/partitionfinder/partfinder/main.py", line 401, in main
    run_analysis(cfg, options)
  File "/share/apps/compute/partitionfinder/partfinder/main.py", line 335, in run_analysis
    results = anal.analyse()
  File "/share/apps/compute/partitionfinder/partfinder/analysis.py", line 93, in analyse
    self.do_analysis()
  File "/share/apps/compute/partitionfinder/partfinder/logtools.py", line 159, in indented_fn
    fn(*args, **kwargs)
  File "/share/apps/compute/partitionfinder/partfinder/analysis_method.py", line 207, in do_analysis
    self.analyse_list_of_subsets(new_subs)
  File "/share/apps/compute/partitionfinder/partfinder/analysis.py", line 299, in analyse_list_of_subsets
    self.run_threaded(tasks)
  File "/share/apps/compute/partitionfinder/partfinder/analysis.py", line 264, in run_threaded
    pool.join()
  File "/share/apps/compute/partitionfinder/partfinder/threadpool.py", line 105, in join
    raise self.exception
OSError: [Errno 5] Input/output error

Rob Lanfear

unread,
May 22, 2017, 9:38:14 PM5/22/17
to PartitionFinder
Hi Mark,

Just to clarify - do you have a job that runs fine on 8 cores, but gives this error on 2 cores?

If so, can you try running on 1 core with '-v' for verbose output and post the results here (I'm hoping it also crashes on one core).

Otherwise, feel free to send me the offending dataset off-list and I can try and figure out and fix the bug.

Thanks for reporting!

Cheers,

Rob

--
You received this message because you are subscribed to the Google Groups "PartitionFinder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to partitionfinder+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rob Lanfear
Ecology, Evolution, and Genetics,
The Australian National University,
Canberra
Reply all
Reply to author
Forward
0 new messages