Open krother opened 10 years ago
Would the structure be the template or the model? Can I use it for both (e.g. when modeling multiple templates or fragments?
I would like to have a method that renumbers a small section:
def renumber_section(index_start, index_end)
E.g. for renumbering a fragment at a specific location. If no alignment is given, the indices can be interpreted as residue numbers directly.
Would the structure be the template or the model? Can I use it for both (e.g. when modeling multiple templates or fragments?
I think that it would be best to operate on both template and model (since they are both descendants of ModernaStructure).
def renumber_section(index_start, index_end)
Could you explain that?
The idea was to use Renumerator to renumber a fragment before inserting it. For that, Renumerator needs to know which part of the model it belongs to. Or would we create a proxy alignment for each fragment?
I agree that Renumerator could operate on both templates and models.
The idea was to use Renumerator to renumber a fragment before inserting it. For that, Renumerator needs to know which part of the model it belongs to. Or would we create a proxy alignment for each fragment?
Hmm... I didn't think of it that way... I always thought of the renumerator as a tool to insert gaps into structures (templates and models). Maybe we might need to rethink the idea of the renumerator to be more versatile.
OK now I understand better. For that the interface you propose is very sound. I think this part is ready to be implemented. No need to mix responsibilities.
We also need to figure out where to put the renumeration code from Fragments. Could be a separate place.
Ok, so let's wait for Lena's opinion. When we reach consensus, I'll start implementing the logic (basically copypasting from renumber_template()).
OK, I agree that there can be one class for renumbering Template and Model and separate for renumbering Fragment.
Some comments on renumeration from Asia in #30.
Maybe something like that would do the job?
When alignment is given, the constructor automatically inserts required gaps, basing on that alignment. If not, it is assumed that nothing will be inserted unless the user invokes _insertgap() manually.
Inserts a gap at a given position.
Applies all the insertions to the structure passed to the constructor.