Skip to content

Commit

Permalink
DAOTHER-9317: Retrieve missing statistics of geminal, aromatic-opposi…
Browse files Browse the repository at this point in the history
…te, geminal methyl groups if possible
  • Loading branch information
yokochi47 committed Apr 22, 2024
1 parent 55ccdb6 commit 23f9c83
Show file tree
Hide file tree
Showing 2 changed files with 13 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 @@ -1082,6 +1082,8 @@ def loadStatFromCsvFile(self, file_name, primary_th, secondary_th=None, comp_id_

self.__detectMajorResonance(comp_ids, atm_list, primary_th, secondary_th)

# DAOTHER-9317: retrieve missing statistics of geminal, aromatic opposit, and gemenal methyl groups

__atm_list = copy.deepcopy(atm_list)

atm_list = []
Expand All @@ -1099,6 +1101,15 @@ def loadStatFromCsvFile(self, file_name, primary_th, secondary_th=None, comp_id_
if not self.__ccU.updateChemCompDict(comp_id):
continue

cc_rel_status = self.__ccU.lastChemCompDict['_chem_comp.pdbx_release_status']

if cc_rel_status == 'OBS' and '_chem_comp.pdbx_replaced_by' in self.__ccU.lastChemCompDict:
replaced_by = self.__ccU.lastChemCompDict['_chem_comp.pdbx_replaced_by']
if replaced_by in emptyValue or not self.__ccU.updateChemCompDict(replaced_by):
continue

comp_id = replaced_by

prev_atm_list = [item for item in __atm_list if item['comp_id'] == comp_id]

# peptide_like = self.__ccU.peptideLike()
Expand Down Expand Up @@ -1440,8 +1451,9 @@ def loadStatFromCsvFile(self, file_name, primary_th, secondary_th=None, comp_id_
if item['desc'] == _item['desc'] and item['atom_id'].startswith(_item['atom_id'][:-2]) and item['atom_id'] != _item['atom_id']]

if len(others) > 0 and not any('avg' in item for item in prev_atm_list if item['atom_id'] in others):
others.append(_atom_id)

for __atom_id in sorted([_atom_id, others]):
for __atom_id in sorted(others):
_row = {}
_row['comp_id'] = comp_id
_row['atom_id'] = __atom_id
Expand Down
Binary file modified wwpdb/utils/nmr/bmrb_cs_stat/others.pkl
Binary file not shown.

0 comments on commit 23f9c83

Please sign in to comment.