[Biopython-dev] upcoming Bio.PDB enhancements - RNA

Kristian Rother krother at rubor.de
Mon Jun 14 15:41:05 UTC 2010


Hi Peter,

> That helped - thanks. Does your Secstruc object behave like a Python
> sequence (string/list/tuple) in that it has a length and can be sliced

Yes, it does.

> If so then it should be fine to
> store in the SeqRecord's letter_annotation dictionary.

Best,
  Kristian


> On Mon, Jun 14, 2010 at 4:01 PM, Kristian Rother <krother at rubor.de> wrote:
>>
>> Hi,
>>
>> much of what I do with RNA secondary structures strongly depends on
>> iterating base pairs, e.g..
>>
>>>>> sec = Secstruc("(((...)).)")
>>>>> for bp in sec.basepairs():
>>>>>    print bp
>> (0, 9)
>> (1, 7)
>> (2, 6)
>>
>> also:
>>>>> sec.get_helices()
>>>>> sec.get_bulges()
>>>>> sec.get_hairpins()
>>>>> sec.contains_pseudoknot()
>> .. and a couple of similar ones.
>>
>> The reason why I'd prefer to have something more than a string as a sec
>> feature is that I wouldn't want to do all the time:
>>
>> sec = Secstruc(my_seq['secondary_structure'])
>> sec.get_helices()
>>
>> but
>>
>> my_seq['secondary_structure'].get_helices()
>>
>> instead.
>>
>> Best Regards,
>>   Kristian
>
> That helped - thanks. Does your Secstruc object behave like a Python
> sequence (string/list/tuple) in that it has a length and can be sliced (as
> if acting on the string representation)? If so then it should be fine to
> store in the SeqRecord's letter_annotation dictionary.
>
> Peter
>
>




More information about the Biopython-dev mailing list