ENH: Add from_annot
and/or from_seq
/ from_bbox
classmethods to format classes?
#208
Labels
ENH: enhancement
New feature or request
One can make a format from a sequence by unpacking keywords one-by-one, but why not provide a classmethod as a convenience method that does this on a per-class basis? (Since some will require diff't keywords depending on their attributes)
For
seq
formats, thefrom_annot
method can just check that it has aseq
attribute and then callfrom_seq
with that attribute. Same for abbox
format, except we check for abbox
attribute.This also makes the use case easier where one wants to convert back to a method -- e.g., I have a
Sequence
(orAnnotation
with aseq
). As in #207, I could writeNotMat.from_seq(seq).to_notmat(notmat_path)
.The text was updated successfully, but these errors were encountered: