Exemple #1
0
 def test_init_with_sequence(self):
     """Allows to skip sequence recognition"""
     s = RNAChain('file', MINI_TEMPLATE, seq=Sequence("GCGGAUUUALCUCAG"))
     self.assertEqual(s.get_sequence(), Sequence("GCGGAUUUALCUCAG"))
     # wrong sequence should also be applied
     #TODO: check whether this is OK
     s = RNAChain('file', MINI_TEMPLATE, seq=Sequence("UUULLYYDDAAGAGA"))
     self.assertEqual(s.get_sequence(), Sequence("UUULLYYDDAAGAGA"))
Exemple #2
0
    def test_PDB_file_with_negative_numbering(self):
        """Checks whether the order of residues with negative NRs is correct"""
        # ...because this was the major problem with negative numbering...
        # ...that ModeRNA read residues in a wrong order!
        s = RNAChain('file', NEG_NUM_PDB, 'E')
        self.assertEqual(s.get_sequence().seq_with_modifications, \
        'GGCUGCCUGGGUCCGCCUUGAGUGCCCGGGUGAGAAGCAUGAUCCCGGGUAAUUAUGGCGGACCCACA')

        self.assertEqual(s.get_sequence().seq_without_modifications, \
        'GGCUGCCUGGGUCCGCCUUGAGUGCCCGGGUGAGAAGCAUGAUCCCGGGUAAUUAUGGCGGACCCACA')
Exemple #3
0
 def test_init_residues(self):
     struc = PDBParser().get_structure('test', MINI_TEMPLATE)
     s = RNAChain('residues',
                  struc[0]['A'].child_list,
                  seq=Sequence("GCGGAUUUALCUCAG"))
     self.assertEqual(s.get_sequence(), Sequence("GCGGAUUUALCUCAG"))
Exemple #4
0
 def test_init_chain(self):
     struc = PDBParser().get_structure('test', MINI_TEMPLATE)
     s = RNAChain('chain', struc[0]['A'], seq=Sequence("GCGGAUUUALCUCAG"))
     self.assertEqual(s.get_sequence(), Sequence("GCGGAUUUALCUCAG"))
Exemple #5
0
 def test_get_sequence_with_hydromods(self):
     """Modifications with hydrogens should be recognized."""
     s = RNAChain('file', MOD_WITH_HYDROGENS, 'B')
     seq = s.get_sequence()
     self.assertEqual(seq, Sequence("UPA"))
Exemple #6
0
 def test_get_sequence(self):
     s = RNAChain('file', MINI_TEMPLATE)
     seq = s.get_sequence()
     self.assertEqual(seq, Sequence("GCGGAUUUALCUCAG"))