[Biopython-dev] [Biopython] SeqRecord reverse complement method?

Peter biopython at maubp.freeserve.co.uk
Tue Jun 15 09:42:47 UTC 2010


On Tue, Jun 15, 2010 at 10:23 AM, Jose Blanca <jblanca at btc.upv.es> wrote:
> On Tuesday 15 June 2010 11:08:14 Peter wrote:
>> On Tue, Jun 15, 2010 at 6:55 AM, Jose Blanca <jblanca at btc.upv.es> wrote:
>> > Having a reverse_complement method would be useful for us. But it could
>> > be quite tricky to reverse complement some features. For instance we have
>> > SNP features that include a reference nucleotide. We would had to
>> > complement that nucleotide too.
>>
>> Could you give an example? I assume you are talking about the annotation
>> of the feature (i.e. the qualifiers dictionary of a SeqFeature object).
>
> That is right in some instances the qualifiers should be modified. For
> instance if we have an ORF with a qualifier 'forward':True, it should be
> changed. I don't think this change can be done automatically .

Yes, that sort of thing would be very difficult to do automatically. We come
back to the question of what the default should be - blindly copy, or
just drop this information. I would say for most feature annotation (and
I am thinking about GenBank and EMBL style files here) there isn't
anything strand specific to worry about, so in general copying is fine.
Clearly this is not a safe assumption for SNP features.

Peter



More information about the Biopython-dev mailing list