Hey, Niklas can you please help me with this post?
Thanks in advance.
Dear all,
I am trying to figure out a way of creating a Dot-Bracket structure for an RNA with arbitrary pseudoknots. The input data is a list of base pairs like this one:
5 17
6 16
7 15
10 20
11 19
The output should look like this:
....(((..[[...))).]]
AUGUACCGUCCUUUUGGAGG
Since there is no restriction on the pseudoknots there could also be a base pair 12 30 which would need a different set of brackets, e.g. { }.
Does anyone know an effective way of doing this? Any help would be appreciated!
Regards Nick
Ok, I just solved it :-)
I create a stack for each kind of brackets I use and for each new base pair I check if it crosses any of the base pairs on one stack. If it doesn't I put it on this stack and use the corresponding brackets, if not I move on to the next stack.
I don't know if it's the most efficient way but it's sufficient.
Hey, Niklas can you please help me with this post?
Thanks in advance.
Log in to answer this question.
Closing as "no longer relevant", since you quickly answered your own question.