[Biopython-dev] RNA Alphabet: request for comments
Kristian Rother
krother at rubor.de
Wed Jun 16 04:32:29 EDT 2010
Hi Peter,
> Why not create a Seq subclass instead of your class ModifiedRNAString(str)?
This turned out to be a lot simpler. Worked right away. New commit at:
http://github.com/krother/biopython/commit/b0a6071f2b08a4f9bfee33a8d675c0e21b60ba70
more comments welcome.
Next steps from my side would be:
1) add all modifications to the Alphabet.
2) add some RNA-specific methods.
3) add more tests.
4) sync with latest master branch.
5) request code merge.
Best regards,
Kristian
Quoting Peter <biopython at maubp.freeserve.co.uk>:
> On Tue, Jun 15, 2010 at 3:06 PM, Kristian Rother <krother at rubor.de> wrote:
>>
>> Hi,
>>
>> I've commited a proof-of-concept implementation how modified RNA bases
>> could be made compatible to Biopython Alphabets. Comments are very
>> welcome, especially because I had to change two lines in the Seq class to
>> make it work.
>>
>> The code can be viewed on:
>> http://github.com/krother/biopython/commit/d9f942936d6165703512099a6a2d84452fea27aa
>> (on github: krother/biopython, branch rna_alphabet).
>>
>> The two main classes are:
>> RNAAlphabetEntry(str) that contains different abbreviations for one base.
>> and
>> ModifiedRNAString(str) that behaves like a string except that it iterates
>> through RNAAlphabetEntry objects.
>>
>
> Why not create a Seq subclass instead of your class ModifiedRNAString(str)?
> This would then implement suitable (reverse) complement etc.
>
> I would also have __iter__ and __getitem__ for a single letter return
> an instance
> of RNAAlphabetEntry (which would act like a single character string).
>
> Peter
>
>
>
>
More information about the Biopython-dev
mailing list