• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jlab / fold-grammars / 13575009990

27 Feb 2025 08:11PM UTC coverage: 36.409% (+36.4%) from 0.0%
13575009990

Pull #90

github

web-flow
Merge 2912168c2 into 0ad54ba86
Pull Request #90: Rnahybrid add targetbreaking

350 of 410 new or added lines in 9 files covered. (85.37%)

1472 of 4043 relevant lines covered (36.41%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.0
/Misc/Applications/RNAhybrid/tests/test_rnahybrid.py
1
import sys
1✔
2
from os.path import dirname, join
1✔
3
sys.path.append(dirname(__file__) + '/../')
1✔
4

5
from unittest import TestCase, main
1✔
6
from input import read_CT_file, disentangle_knots
1✔
7

8
def getFP(filepath):
1✔
9
    return join(dirname(__file__), filepath)
1✔
10

11
class TestRNAhybrid(TestCase):
1✔
12
    def setUp(self):
1✔
13
        self.CTsars = disentangle_knots(next(read_CT_file(getFP('data/SARS-CoV-2_Full_Length_Secondary_Structure_Map.ct')))[2], verbose=None)['nested']
1✔
14
        # Pairs are stored as opening: closing base pair positions, i.e. opening < closing.
15
        # To ease access, we enrich this dict by also adding in closing: opening information.
16
        self.CTsars.update({c: o for o, c in self.CTsars.items()})
1✔
17

18
    def tearDown(self):
1✔
19
        pass
1✔
20

21
    def test_getOriginalPairs(self):
1✔
22
        exp = {839: 851, 840: 850, 841: 849, 842: 848, 854: 943, 855: 942, 856: 941, 857: 940, 862: 906,  # assert that: i < j
1✔
23
               848: 842, 850: 840, 852: 838, 853: 837  # duplicate pairs where j < i
24
              }
25

26
        novel_target_pairing_partners = [int(x) for x in '839,840,841,842,843,845,846,847,848,850,852,853,854,855,856,857,858,859,862'.split(',')]
1✔
27
        obs = {o: c for o, c in {x: self.CTsars.get(x, -1) for x in novel_target_pairing_partners}.items() if c != -1}
1✔
28
        self.assertEqual(exp, obs)
1✔
29

30

31
if __name__ == '__main__':
1✔
NEW
32
    main()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc