[Biopython-dev] [Biopython - Feature #3438] (New) Allow modifications of sequence in SFF objects

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Fri Jun 28 14:56:51 UTC 2013


Issue #3438 has been reported by Martin Mokrejš.

----------------------------------------
Feature #3438: Allow modifications of sequence in SFF objects
https://redmine.open-bio.org/issues/3438

Author: Martin Mokrejš
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 
URL: 


I find it a bit awkward but namely, with unnecessary overhead, to edit a sequence in a SFF object. I am fine with the requirement that the length of the sequence must stay same is the length of qualities and other annotation lists. However, to edit a sequence I have to do now:

<pre>
    if _was_modified:
        _letter_annotations = _record.letter_annotations
        _annotations = _record.annotations
        _record.letter_annotations = {}
        _record.annotations = {}
        _record.seq = Seq(_sequence, generic_dna)
        _record.letter_annotations = _letter_annotations
        _record.annotations = _annotations

        _new_record = SeqRecord(Seq(_sequence, generic_dna), id=_record.id, name=_record.name, description=_record.description, annotations=_record.annotations, letter_annotations=_record.letter_annotations)

        _wrote = SeqIO.write(_new_record, _fh, 'sff')
    else:
        _wrote = SeqIO.write(_record, _fh, 'sff')
</pre>

The whole work in backup&restore of annotation lists is not necessary in my eyes. I think providing _record.rewrite_sequence('tcagnnnnnnnn') would be quite helpful here.


----------------------------------------
You have received this notification because this email was added to the New Issue Alert plugin


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org




More information about the Biopython-dev mailing list