(cls, strand: str)
| 60 | |
| 61 | @classmethod |
| 62 | def from_str(cls, strand: str) -> Self: |
| 63 | match strand: |
| 64 | case '+': |
| 65 | return cls.POSITIVE |
| 66 | case '-': |
| 67 | return cls.NEGATIVE |
| 68 | case '.': |
| 69 | return cls.UNSTRANDED |
| 70 | case _: |
| 71 | raise ValueError(f'Strand needs to be in {STRAND_OPTIONS}') |
| 72 | |
| 73 | def to_proto(self) -> dna_model_pb2.Strand: |
| 74 | match self: |
no outgoing calls