[Biopython-dev] Quality scores (and per-letter-annotation) in a SeqRecord?
Jose Blanca
jblanca at btc.upv.es
Mon Feb 23 08:25:21 EST 2009
> This sounds like a possible consensus :)
Great
> In terms of names, we've have per_symbol_annotations and
> per_letter_annotations (to match the existing annotations dictionary),
> which are long but explicit. We could also have letter_annotations,
> symbol_annotations (shorter but more ambiguous), or even pas or pla
> (too short?).
I don't like pla or pas, their not clear, I would vote for letter_annotations.
I think it's the clearest one.
> For the implementation, we could start with a simple dictionary and
> see if any kind of safety feature should be added later if is seems
> necessary. What I had in mind was a dict subclass which takes the
> sequence length, and by overriding the __setitem__ method checks only
> python sequences (objects with __len__ and __getitem__) of the
> appropriate length can be added.
I'm not sure how to implement that. What would you think about creating a new
class based on dict but with an extra property, parent? parent would be a
reference to the SeqRecord. This new class would check the length of its
parent before adding the letter_annotation. I'm just asking because I'm
curious about the best way to implement it.
Best regards,
Jose Blanca
More information about the Biopython-dev
mailing list