This is a minuscule follow-up to #29, which introduced the mygfa.SegO class. As in #35, I noticed a place where we were doing things manually that the dataclasses library can do for us. Namely, based on a couple of rules, it can generate __hash__ for us; all you need to do is make the type immutable (frozen) and equatable (eq). Both make sense for this type, so I've done that.
I also made the docstring slightly more accurate: it's not that the segment has an orientation; it's that we're referring to one of its two orientations.
This is a minuscule follow-up to #29, which introduced the
mygfa.SegO
class. As in #35, I noticed a place where we were doing things manually that thedataclasses
library can do for us. Namely, based on a couple of rules, it can generate__hash__
for us; all you need to do is make the type immutable (frozen
) and equatable (eq
). Both make sense for this type, so I've done that.I also made the docstring slightly more accurate: it's not that the segment has an orientation; it's that we're referring to one of its two orientations.
It also occurs to me that we could use
SegO
to defineLink
: https://github.com/cucapra/pollen/blob/fce54a3bfa62364612190594ad732e18ef4eb5ea/slow_odgi/mygfa.py#L67-L70Instead of having two fields (segment orientation) for both "from" and "to", we could just have a "from"
SegO
and a "to"SegO
.