Closed SandeepThokala closed 1 year ago
'orf_map'
key with appropriate value to all orfs in setUp()
method of all test classes in tests\test_sequence_info.py AttributeError
were skipped.
The following was the only test that failed
FAIL: testSetSubstitutionRates (tests.test_sequence_info.TestSequence2)
----------------------------------------------------------------------
Traceback (most recent call last):
File ".tests\test_sequence_info.py", line 782, in testSetSubstitutionRates
self.assertEqual(exp_sub_rates, nt.rates) # AssertionError
AssertionError: {'A':[28 chars] None, 'G': 1.6862747125805073e-05, 'T': 6.962957017894693e-06} != {'A':[28 chars] None, 'G': 2.0888871053684082e-06, 'T': 1.920072109868503e-05}
{'A': 5.760216329605508e-06,
'C': None,
Updated all setUp()
methods of all test classes by adding 'orf_map'
key to orfs
TestSequence1
for example:
orfs = {'+0': [{'coords': [[0, 21]],
'omega_classes': 3, 'omega_shape': 1.5,
- 'omega_values': [0.1708353283825978, 0.4810288100937172, 1.1481358615121404]}],
+ 'omega_values': [0.1708353283825978, 0.4810288100937172, 1.1481358615121404],
+ 'orf_map': np.array([1])}],
'+1': [], '+2': [], '-0': [], '-1': [], '-2': []}
And fixed the AssertionError
by adding a new line random.seed(4001)
(line: 797 in File ".tests\test_sequence_info.py") before setting substitution rates for # Non-synonymous mutation in both (+) and (-) strands
Issues faced after fixing
KeyError: 'orf_map'
by making the following changes inSequence
class ofsequnce_info.py
Issues:
AssertionError
while runningtestCreateEventTree
,testSetSubstitutionRates
,testCreateProbabilityTree
,testNtInEventTree
,testCheckMutationRates
AttributeError
while runningtestCountNtsOnEventTree
,testCreateProbabilityTree
,testCountNtsOnEventTree
Updated the tests