Skip to content

Commit

Permalink
DAOTHER-9317: Retrieve BMRB chemical shift statitics of ILE:MG/MD
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed May 9, 2024
1 parent 6f52dc0 commit 08b94fd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion wwpdb/utils/nmr/BMRBChemShiftStat.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,13 @@ def loadStatFromCsvFile(self, file_name, primary_th, secondary_th=None, comp_id_

_atom_id = row['atom_id']

if comp_id == 'THR' and _atom_id == 'MG':
if comp_id == 'ILE':
if _atom_id == 'MG':
_atom_id = 'MG2'
elif _atom_id == 'MD':
_atom_id = 'MD1'

elif comp_id == 'THR' and _atom_id == 'MG':
_atom_id = 'MG2'

# methyl proton group
Expand Down Expand Up @@ -1121,6 +1127,12 @@ def loadStatFromCsvFile(self, file_name, primary_th, secondary_th=None, comp_id_

_atom_id = row['atom_id']

if comp_id == 'ILE':
if _atom_id == 'MG':
_atom_id = 'MG2'
elif _atom_id == 'MD':
_atom_id = 'MD1'

if comp_id == 'THR' and _atom_id == 'MG':
_atom_id = 'MG2'

Expand Down
Binary file modified wwpdb/utils/nmr/bmrb_cs_stat/aa_filt.pkl
Binary file not shown.
Binary file modified wwpdb/utils/nmr/bmrb_cs_stat/aa_full.pkl
Binary file not shown.
4 changes: 4 additions & 0 deletions wwpdb/utils/tests-nmr/test_BMRBChemShiftStat.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ def test_doh_hn1(self):
def test_daother_9317(self):
self.assertEqual([stat['atom_id'] for stat in self.bmrb_cs_stat.get('MEA') if 'avg' in stat], ['H', 'HA', 'HB1', 'HB2', 'HD1', 'HD2', 'HE1', 'HE2'])

def test_get_ile_cs_stat(self):
self.assertEqual([stat['atom_id'] for stat in self.bmrb_cs_stat.get('ILE') if 'avg' in stat and stat['desc'] == 'methyl' and stat['atom_id'][0] == 'H'],
['HD11', 'HD12', 'HD13', 'HG21', 'HG22', 'HG23'])


if __name__ == '__main__':
unittest.main()

0 comments on commit 08b94fd

Please sign in to comment.