Edinburgh-Genome-Foundry / DnaWeaver

A route planner for DNA assembly
https://dnaweaver.genomefoundry.org
MIT License
29 stars 9 forks source link

Bug: When quote.assembly_plan is None #9

Open andrewshvv opened 3 years ago

andrewshvv commented 3 years ago

When quote.assembly plan is None and the source quote returns an error quote, the assembly plan of the second quote is None, and an exception happens.

https://github.com/Edinburgh-Genome-Foundry/DnaWeaver/blob/6a26b08d9571fbaf91ac7058d45ed0706333e05d/dnaweaver/DnaQuote/PostProcessingMixin.py#L32

[WARNING][2021-05-06 21:51:29,214][__init__.py:261 - <module>()] gel simulation will NOT be available. Missing modules: mpldatacursor, pint
Traceback (most recent call last):
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/src/order_parser/backend/decomposition/expression_vector.py", line 34, in decompose_expression_vector
    golden_gate_parts = decompose_insert(insert=insert,
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/src/order_parser/backend/decomposition/synthesis.py", line 92, in decompose_insert
    assembly_plan_report = quote.to_assembly_plan_report()
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/venv/lib/python3.9/site-packages/dnaweaver/DnaQuote/ExportsMixin.py", line 163, in to_assembly_plan_report
    self.compute_fragments_final_locations()
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/venv/lib/python3.9/site-packages/dnaweaver/DnaQuote/PostProcessingMixin.py", line 57, in compute_fragments_final_locations
    self.compute_full_assembly_plan()
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/venv/lib/python3.9/site-packages/dnaweaver/DnaQuote/PostProcessingMixin.py", line 43, in compute_full_assembly_plan
    rec(self)
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/venv/lib/python3.9/site-packages/dnaweaver/DnaQuote/PostProcessingMixin.py", line 29, in rec
    segments = {
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/venv/lib/python3.9/site-packages/dnaweaver/DnaQuote/PostProcessingMixin.py", line 30, in <dictcomp>
    segment: rec(subquote)
  File "/Users/Andrey/PycharmProjects/cloning-facility-core/venv/lib/python3.9/site-packages/dnaweaver/DnaQuote/PostProcessingMixin.py", line 32, in rec
    quote.assembly_plan.items(), key=lambda item: item[0]
AttributeError: 'NoneType' object has no attribute 'items