Skip to content

Commit

Permalink
DAOTHER-1820: Fix for V5.30 unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Jan 28, 2025
1 parent 54d58a8 commit 59db9a9
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions wwpdb/utils/nmr/ann/OneDepAnnTasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,7 @@ def merge(self, master_entry: pynmrstar.Entry, nmrif) -> bool:
list_ids.append(1)

list_ids = sorted(list_ids)

# map_code: '5' @see https://github.com/bmrb-io/onedep2bmrb/blob/master/pdbx2bmrb/convert.py#L148
list_id_dict = {list_id: order for order, list_id in enumerate(list_ids, 1)}
sf_framecodes = []
Expand Down Expand Up @@ -1361,7 +1362,7 @@ def merge(self, master_entry: pynmrstar.Entry, nmrif) -> bool:
sf = pynmrstar.Saveframe.from_scratch(sf_framecode, sf_tag_prefix)
sf.add_tag('Sf_framecode', sf_framecode)
sf.add_tag('Sf_category', sf_category)
sf.add_tag('ID', str(list_id))
sf.add_tag('ID', str(list_id_dict[list_id]))
if sf_name is not None and sf_name != sf_framecode:
sf.add_tag('Name', sf_name)

Expand Down Expand Up @@ -1392,7 +1393,7 @@ def merge(self, master_entry: pynmrstar.Entry, nmrif) -> bool:
sf = pynmrstar.Saveframe.from_scratch(sf_framecode, sf_tag_prefix)
sf.add_tag('Sf_framecode', sf_framecode)
sf.add_tag('Sf_category', sf_category)
sf.add_tag('ID', str(list_id))
sf.add_tag('ID', str(list_id_dict[list_id]))
if sf_name is not None and sf_name != sf_framecode:
sf.add_tag('Name', sf_name)
reset = True
Expand Down Expand Up @@ -1538,7 +1539,7 @@ def merge(self, master_entry: pynmrstar.Entry, nmrif) -> bool:
continue
_row = [None] * len(lp.tags)
if lp_list_id_col != -1:
_row[lp_list_id_col] = str(list_id)
_row[lp_list_id_col] = str(list_id_dict[list_id])
if entry_id_col != -1:
_row[entry_id_col] = self.__entryId
if type_col != -1:
Expand Down Expand Up @@ -1715,9 +1716,6 @@ def replace_none(array, default: str = '.'):
cifObj.addCategory(self.__entryId, cif_category, item_tags)
cifObj.appendRowList(self.__entryId, cif_category, row_list)

# DAOTHER-3018, 3848: force to reset 'pdbx_nmr_representative.conformer_id'
cifObj.updateMultipleValue(self.__entryId, 'pdbx_nmr_representative', 'conformer_id', '?')

try:
cifObj.writeToFile(file_path)
except Exception:
Expand Down Expand Up @@ -2211,9 +2209,6 @@ def replace_none(array, default: str = '.'):
cifObj.addCategory(self.__entryId, cif_category, cR.getAttributeList(cif_category))
cifObj.appendRowList(self.__entryId, cif_category, row_list)

# DAOTHER-3018, 3848: force to reset 'pdbx_nmr_representative.conformer_id'
cifObj.updateMultipleValue(self.__entryId, 'pdbx_nmr_representative', 'conformer_id', '?')

try:
cifObj.writeToFile(file_path)
except Exception:
Expand Down

0 comments on commit 59db9a9

Please sign in to comment.