salilab / IHMValidation

Validation software for integrative models deposited to PDB
MIT License
2 stars 2 forks source link

Missing restraint_types in _ihm_derived_distance_restraint in the PDBDEV_00000054 #57

Closed aozalevsky closed 2 years ago

aozalevsky commented 2 years ago

I believe that with the 1.10 update of the IHM dictionary explicit setting of _ihm_derived_distance_restraint.restraint_type became mandatory thus the following record now produce an error:

loop_                                                                                                                                                                                                      _ihm_derived_distance_restraint.id                                                                                                                                                                         
_ihm_derived_distance_restraint.group_id                                                                                                                                                                   
_ihm_derived_distance_restraint.feature_id_1                                                                                                                                                               
_ihm_derived_distance_restraint.feature_id_2                                                                                                                                                               
_ihm_derived_distance_restraint.restraint_type                                                                                                                                                             
_ihm_derived_distance_restraint.dataset_list_id                                                                                                                                                            
1 1 1 2 . 2                                                                                                                                                                                                
2 1 1 3 . 2      
/usr/local/lib/python3.8/dist-packages/ihm/reader.py in __call__(self, id, group_id, dataset_list_id, feature_id_1, feature_id_2, restraint_type, group_conditionality, probability, mic_value, distance_lower_limit, distance_upper_limit)
   2105         r.feature2 = self.sysr.features.get_by_id(feature_id_2)
   2106         print(restraint_type)
-> 2107         r.distance = _handle_distance[restraint_type](distance_lower_limit,
   2108                                                       distance_upper_limit,
   2109                                                       self.get_float)

KeyError: None

I guess it should be fixed in the entry? @brindakv

brindakv commented 2 years ago

Mandatory fields can be set to . but I'll fix the data in this case.

aozalevsky commented 2 years ago

Mandatory fields can be set to . but I'll fix the data in this case.

But in this case, it also has the associated Controlled Vocabulary. Does it mean that even fields like this can have . values?

brindakv commented 2 years ago

Mandatory fields can be set to . but I'll fix the data in this case.

But in this case, it also has the associated Controlled Vocabulary. Does it mean that even fields like this can have . values?

Yes.

This is a legacy entry that was recently released and the depositor did not provide the values for restraint_type distance_lower_limit and distance_upper_limit. It is not meaningful to add restraint_type without the distance value(s). Perhaps better to address this in the code.

aozalevsky commented 2 years ago

then I guess this issue also goes to @benmwebb and IHM.