salilab / IHMValidation

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

SAS processing is unaware of measuring units #55

Open aozalevsky opened 2 years ago

aozalevsky commented 2 years ago

It looks like the code is hardcoded for the 1/A units, thus it is failing on files with 1/nm units (related to #53)

There are multiple places using a hardcoded A to nm conversion:

https://github.com/salilab/IHMValidation/blob/c3bb0ef65f6104368a103ee429dcf264285ba936/master/pyext/src/validation/sas.py#L190

https://github.com/salilab/IHMValidation/blob/c3bb0ef65f6104368a103ee429dcf264285ba936/master/pyext/src/validation/sas.py#L217

https://github.com/salilab/IHMValidation/blob/c3bb0ef65f6104368a103ee429dcf264285ba936/master/pyext/src/validation/sas.py#L421

https://github.com/salilab/IHMValidation/blob/c3bb0ef65f6104368a103ee429dcf264285ba936/master/pyext/src/validation/sas.py#L481

https://github.com/salilab/IHMValidation/blob/c3bb0ef65f6104368a103ee429dcf264285ba936/master/pyext/src/validation/sas.py#L483

https://github.com/salilab/IHMValidation/blob/c3bb0ef65f6104368a103ee429dcf264285ba936/master/pyext/src/validation/sas.py#L491

The information about units is stored in the sascif file:

SASDC29

_sas_scan.unit                      1/A

SASDDD6

_sas_scan.unit                      1/nm
aozalevsky commented 2 years ago

SASDDD6 is the only one affected at the moment

SASDBV9.sascif:_sas_scan.unit                      1/A
SASDBW9.sascif:_sas_scan.unit                      1/A
SASDBX9.sascif:_sas_scan.unit                      1/A
SASDBY9.sascif:_sas_scan.unit                      1/A
SASDBZ9.sascif:_sas_scan.unit                      1/A
SASDC29.sascif:_sas_scan.unit                      1/A
SASDCG7.sascif:_sas_scan.unit                      1/A
SASDDD6.sascif:_sas_scan.unit                      1/nm
SASDEE2.sascif:_sas_scan.unit                      1/A
SASDG85.sascif:_sas_scan.unit                      1/A
benmwebb commented 2 years ago

IIRC, Sai had a few entries that didn't have corresponding data in SASBDB, so she couldn't reliably determine the units. But agreed, if we know the units are 1/nm (or you can use a heuristic to figure it out) then we should not hardcode 1/A.

aozalevsky commented 4 months ago

this is addressed in the dev_2.0 branch with a complete rewrite of sas code.

https://github.com/salilab/IHMValidation/blob/ebfbe791b49f5443a186f1649f854968e05fc0dc/ihm_validation/sas.py#L434-L435

I'll keep the issue open until the merge.