artic-network / civet

Cluster Investigation & Virus Epidemiology Tool
https://cov-lineages.org/resources/civet.html
GNU General Public License v3.0
48 stars 14 forks source link

Negative Dimensions Not Allowed #109

Closed mattloose closed 3 years ago

mattloose commented 3 years ago

Civet3 issue:

Setting a wide date range with an adm2 caused the following error:

Adding column to master metadata: catchment
Merged into 4 catchments.
[Thu Jul 15 21:24:15 2021]
Error in rule downsample_catchments:
    jobid: 0
    output: /*REDACTED*/civet_2021-07-15_7/master_metadata.csv

RuleException:
ValueError in line 167 of  /*REDACTED*/miniconda3/envs/civet3/lib/python3.9/site-packages/civet/scripts/civet.smk:
Negative dimensions are not allowed
  File " /*REDACTED*/miniconda3/envs/civet3/lib/python3.9/site-packages/civet/scripts/civet.smk", line 167, in __rule_downsample_catchments
  File " /*REDACTED*/miniconda3/envs/civet3/lib/python3.9/site-packages/civet/analysis_functions/catchment_parsing.py", line 262, in downsample_if_building_trees
  File " /*REDACTED*/miniconda3/envs/civet3/lib/python3.9/site-packages/civet/analysis_functions/catchment_parsing.py", line 164, in downsample_catchment
  File "mtrand.pyx", line 968, in numpy.random.mtrand.RandomState.choice
  File " /*REDACTED*/miniconda3/envs/civet3/lib/python3.9/concurrent/futures/thread.py", line 52, in run
Exiting because a job execution failed. Look above for error message
Exiting because a job execution failed. Look above for error message

The query range was for 3 months in a single adm2 region and civet was trying to process approx 1500 sequences.

aineniamh commented 3 years ago

Thanks! I've been trying to pinpoint this in #106- not gotten to the bottom of it yet but working on it!

aineniamh commented 3 years ago

Think this has been resolved now, with the behaviour changed slightly. Won't attempt to downsample queries, but if the trees are too big to build (configurable, default 500 tips) that tree will just be summarised in the table and the tree by-passed. Full explanation: https://github.com/artic-network/civet/issues/106.