FRED-2 / OptiType

Precision HLA typing from next-generation sequencing data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OptiType crashing with message "this is indicative of a SERIOUS ERROR in the expression reuse detection scheme."

alexanderwhatley opened this issue · comments

OptiType is crashing with the following error message from the log:

mapping with 8 threads...

 0:00:59.80 Mapping PGDX3144N_HLA_filtered_fished.fastq to GEN reference...

 0:03:48.28 Generating binary hit matrix.
0:03:48.31 Loading ../OptiType_output/2017_03_07_16_43_12/2017_03_07_16_43_12_1.bam started. Number of HLA reads loaded (updated every thousand):
1K...2K...3K...4K...5K...6K...7K...8K...9K...10K...11K...12K...13K...14K...
 0:04:18.66 14383 reads loaded. Creating dataframe...
0:04:21.58 Dataframes created. Shape: 14383 x 11179, hits: 4063907 (4063907), sparsity: 1 in 39.56

 0:04:37.63 temporary pruning of identical rows and columns

 0:04:39.04 Size of mtx with unique rows and columns: (767, 1332)
0:04:39.04 determining minimal set of non-overshadowed alleles

 0:04:55.87 Keeping only the minimal number of required alleles (168,)

 0:04:55.91 Creating compact model...

starting ilp solver with 1 threads...

 0:04:58.69 Initializing OptiType model...
ERROR: Rule failed when generating expression for objective read_cov:
	RuntimeError: Expression entered generate_expression() with too few references (-1<0); this is indicative of a SERIOUS ERROR in the expression reuse detection scheme.
ERROR: Constructing component 'read_cov' from data=None failed:
	RuntimeError: Expression entered generate_expression() with too few references (-1<0); this is indicative of a SERIOUS ERROR in the expression reuse detection scheme.

The explicit error message is:

Traceback (most recent call last):
  File "OptiTypePipeline.py", line 404, in <module>
    config.get("ilp", "solver"), threads, verbosity=VERBOSE)
  File "/n/regal/nowak_lab/immunotherapy/OptiType/model.py", line 97, in __init__
    model.reconst[a] * model.x[a] for a in model.L), sense=maximize)
  File "/n/home05/aewhatley/anaconda3/lib/python3.6/site-packages/pyomo/core/base/block.py", line 484, in __setattr__
    self.add_component(name, val)
  File "/n/home05/aewhatley/anaconda3/lib/python3.6/site-packages/pyomo/core/base/block.py", line 890, in add_component
    val.construct(data)
  File "/n/home05/aewhatley/anaconda3/lib/python3.6/site-packages/pyomo/core/base/objective.py", line 307, in construct
    tmp = _init_rule(_self_parent)
  File "/n/regal/nowak_lab/immunotherapy/OptiType/model.py", line 96, in <lambda>
    rule=lambda model: sum(model.occ[r] * (model.y[r] - model.beta * (model.re[r])) for r in model.R) - sum(
  File "/n/regal/nowak_lab/immunotherapy/OptiType/model.py", line 96, in <genexpr>
    rule=lambda model: sum(model.occ[r] * (model.y[r] - model.beta * (model.re[r])) for r in model.R) - sum(
  File "/n/home05/aewhatley/anaconda3/lib/python3.6/site-packages/pyomo/core/base/numvalue.py", line 460, in __sub__
    return generate_expression(_sub,self,other)
  File "/n/home05/aewhatley/anaconda3/lib/python3.6/site-packages/pyomo/core/base/expr_coopr3.py", line 1028, in generate_expression
    other = _generate_expression__clone_if_needed(other, 0)
  File "/n/home05/aewhatley/anaconda3/lib/python3.6/site-packages/pyomo/core/base/expr_coopr3.py", line 918, in _generate_expression__clone_if_needed
    % ( getrefcount(obj) - UNREFERENCED_EXPR_COUNT, ))
RuntimeError: Expression entered generate_expression() with too few references (-1<0); this is indicative of a SERIOUS ERROR in the expression reuse detection scheme.

Do you know what the problem could be?

Not really, haven't seen this error before. Do other samples run through fine? If so, perhaps you could e-mail me the intermediate bam file so I can try to reproduce the error. It's deleted by default so make sure you set deletebam=false in your config file. Also, what solver do you use?

Just emailed you.

Hi guys,

apparently pyomo does not work with Python 3.6 (yet): http://stackoverflow.com/a/42117803
So if you downgrade to python 3.5 this error should go away.

HTH,
Clemens