Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should we have separate SeqLikeAnnotation and BboxLikeAnnotation classes? #150

Closed
NickleDave opened this issue Mar 28, 2022 · 0 comments · Fixed by #164
Closed

should we have separate SeqLikeAnnotation and BboxLikeAnnotation classes? #150

NickleDave opened this issue Mar 28, 2022 · 0 comments · Fixed by #164

Comments

@NickleDave
Copy link
Collaborator

  • Would be weird to be able to pass a list of annotations with bounding boxes to a GenericSeq class
  • By being "generic" these annotations kind of behave differently from others
  • we are now definitively in xkcd 927 territory
NickleDave added a commit that referenced this issue May 11, 2022
so that it can have `seq` or `bboxes` attribute,
but not both.

- need flexibility in `__init__` to achieve this,
  so it is no longer an `attrs` class
  - the `__init__` method does validation
    and sets either `seq` or `bboxes` attribute
- since it's no longer an `attrs` class,
  had to implement `__eq__`, `__ne__`,
  and `__repr__`
- `seq` is no longer "optional" (in the way it was as of #149)
  and we only need one class for both `seq` and `bbox`
  annotations (as discussed in #150)
NickleDave added a commit that referenced this issue May 11, 2022
so that it can have `seq` or `bboxes` attribute,
but not both.

- need flexibility in `__init__` to achieve this,
  so it is no longer an `attrs` class
  - the `__init__` method does validation
    and sets either `seq` or `bboxes` attribute
- since it's no longer an `attrs` class,
  had to implement `__eq__`, `__ne__`,
  and `__repr__`
- `seq` is no longer "optional" (in the way it was as of #149)
  and we only need one class for both `seq` and `bbox`
  annotations (as discussed in #150)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant