MCPcopy
hub / github.com/google-deepmind/alphagenome / from_str

Method from_str

src/alphagenome/data/genome.py:62–71  ·  view source on GitHub ↗
(cls, strand: str)

Source from the content-addressed store, hash-verified

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:

Calls

no outgoing calls