1675e2873db77528ef1dee6fc49aaccfca9a369b,src/biotite/structure/dotbracket.py,,dot_bracket,#Any#Any#Any#,60

Before Change


    for s, solution in enumerate(pseudoknot_order):
        // Bases whose partners have an opened bracket
        opened_brackets = set()
        for pos in range(length):
            if pos not in basepairs:
                notations[s] += "."
            else:
                // Get position in ``basepairs`` and ``pseudoknot_order``
                bp_pos = np.where(basepairs == pos)[0][0]
                if pos in opened_brackets:
                    notations[s] += _CLOSING_BRACKETS[solution[bp_pos]]
                else:
                    for base in basepairs[bp_pos]:
                        if base != pos:
                            opened_brackets.add(base)
                    notations[s] += _OPENING_BRACKETS[solution[bp_pos]]

    return notations

def base_pairs_from_dot_bracket(dot_bracket_notation):
    

After Change


    // Each optimal pseudoknot order solution is represented in
    // dot-bracket-notation
    notations = [
        bytearray(("."*length).encode()) for _ in range(len(pseudoknot_order))
    ]
    for s, solution in enumerate(pseudoknot_order):
        for basepair, order in zip(basepairs, solution):
            notations[s][basepair[0]] = _OPENING_BRACKETS_BYTES[order]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: biotite-dev/biotite
Commit Name: 1675e2873db77528ef1dee6fc49aaccfca9a369b
Time: 2020-11-27
Author: tom.mueller@beachouse.de
File Name: src/biotite/structure/dotbracket.py
Class Name:
Method Name: dot_bracket


Project Name: huazhengwang/BanditLib
Commit Name: 10a3aff02e633faa4f546bfc482e746f2f0d6b7f
Time: 2018-02-25
Author: bjw4ph@virginia.edu
File Name: Rewards/Reward.py
Class Name: Reward
Method Name: getOptimalReward


Project Name: fxsjy/jieba
Commit Name: b367690eebc97a2fea3da1c1694ba365c72fd713
Time: 2014-10-18
Author: abcdoyle888@gmail.com
File Name: jieba/__init__.py
Class Name:
Method Name: add_word