Skip to content

Commit

Permalink
Add serialization statement in _refify for OligosynthesizeOligo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto024 committed Aug 20, 2023
1 parent 4795408 commit e3545d9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions autoprotocol/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import warnings

from collections import defaultdict
from dataclasses import dataclass, field
from dataclasses import dataclass, field, fields
from numbers import Number
from typing import Any, Dict, List, Optional, Tuple, Union

Expand Down Expand Up @@ -4197,7 +4197,6 @@ def gel_purify(

instructions = []
for pe in parsed_extracts:

lane_set = [e["lane"] for e in pe]

if len(lane_set) > max_well:
Expand Down Expand Up @@ -5090,7 +5089,7 @@ def flow_analyze(
if c.get("emission_wavelength"):
try:
Unit(c.get("emission_wavelength"))
except (UnitError) as e:
except UnitError as e:
raise UnitError(
"Each `emission_wavelength` "
"must be of type unit."
Expand All @@ -5102,7 +5101,7 @@ def flow_analyze(
if c.get("excitation_wavelength"):
try:
Unit(c.get("excitation_wavelength"))
except (UnitError) as e:
except UnitError as e:
raise UnitError(
"Each `excitation_wavelength` "
"must be of type unit."
Expand Down Expand Up @@ -5717,7 +5716,6 @@ def mag_mix(
return self._add_mag(mag, head, new_tip, new_instruction, "mix")

def image_plate(self, ref: Union[str, Container], mode: str, dataref: str):

"""
Capture an image of the specified container.
Expand Down Expand Up @@ -6594,6 +6592,7 @@ def _refify(
Ref,
Compound,
Informatics,
OligosynthesizeOligo,
],
):
"""
Expand Down Expand Up @@ -6631,6 +6630,10 @@ def _refify(
return op_data.as_dict()
elif isinstance(op_data, Informatics):
return self._refify(op_data.as_dict())
elif isinstance(op_data, OligosynthesizeOligo):
return self._refify(
{field.name: getattr(op_data, field.name) for field in fields(op_data)}
)
else:
return op_data

Expand Down

0 comments on commit e3545d9

Please sign in to comment.