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

Jose Blanca jblanca at btc.upv.es
Tue Jun 15 01:55:45 EDT 2010


On Monday 14 June 2010 16:44:50 Peter wrote:
> Hi all,
>
> You may recall late last year I posted about adding a reverse
> complement method to the SeqRecord, and addition support:
> http://lists.open-bio.org/pipermail/biopython-dev/2009-September/006850.htm
>l http://lists.open-bio.org/pipermail/biopython-dev/2009-October/006851.html
>
> SeqRecord addition was included in Biopython 1.53, but
> not the reverse_complement() method - which is something
> I wanted to use again today to reverse complement an
> annotated GenBank file and have all the SeqFeature
> locations flipped for me. I've rescued my old code and
> its unit tests and created a new branch for it:
> http://github.com/peterjc/biopython/commits/seqrecord-rc
>
> As I said at the end of last year, I think the general idea of
> a SeqRecord reverse_complement() method is nice but the
> details about handling the annotation is tricky. When we
> discussed slicing and addition, it was agreed that we
> should be cautious to avoid blindly transferring annotation
> inappropriately. The code on this branch allows the user to
> choose for each annotation type if it should be dropped
> (False), kept (True) or set to a supplied new value. The
> docstring has examples of how this works (which double
> as doctests).

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.

Regards,


-- 
Jose M. Blanca Postigo
Instituto Universitario de Conservacion y
Mejora de la Agrodiversidad Valenciana (COMAV)
Universidad Politecnica de Valencia (UPV)
Edificio CPI (Ciudad Politecnica de la Innovacion), 8E
46022 Valencia (SPAIN)
Tlf.:+34-96-3877000 (ext 88473)


More information about the Biopython-dev mailing list