Skip to content

Commit

Permalink
added python-ihm version and bumped report version to 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aozalevsky committed Mar 20, 2024
1 parent 847e41b commit cf90346
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ihm_validation/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from collections import Counter
import numpy as np

REPORT_VERSION = '1.1'

class WriteReport(object):
def __init__(self, mmcif_file, db, driver, cache, nocache=False):
self.mmcif_file = mmcif_file
Expand All @@ -32,6 +34,7 @@ def __init__(self, mmcif_file, db, driver, cache, nocache=False):
self.driver = driver
self.cache = cache
self.nocache = nocache
self.report_version = REPORT_VERSION


def run_entry_composition(self, Template_Dict: dict) -> dict:
Expand All @@ -50,6 +53,8 @@ def run_entry_composition(self, Template_Dict: dict) -> dict:
# to print out tables. Why Sai?--because JS is annoying and it is just easier
# to construct tables with lists than any other data struc
# utility module has functions to check outputs from python-ihm library and convert to JS friendly format
Template_Dict['report_version'] = self.report_version
Template_Dict['python_ihm_version'] = utility.get_python_ihm_version()
Template_Dict['ensemble_info'] = ensemble_info
Template_Dict['sphere'] = self.input.check_sphere()
Template_Dict['num_ensembles'] = self.input.check_ensembles()
Expand Down
5 changes: 5 additions & 0 deletions ihm_validation/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,3 +518,8 @@ def compress_cx_stats(cx_stats: dict) -> list:
out_stats.append(mgv['cx_stats']['All']['Satisfied'])

return out_stats

def get_python_ihm_version() -> str:
"""returns Python-IHM version"""
import ihm
return ihm.__version__
4 changes: 3 additions & 1 deletion templates/full_validation_pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ <h1 align="center">Integrative Structure Validation Report <a class='help1' styl
<h2 align="center">{{ date }}</h2>
<p><b> The following software was used in the production of this report:</b></p>
<ul style="list-style-type:none;">

<li><em><a href='https://github.com/ihmwg/python-ihm'>Python-IHM</a> Version {{ python_ihm_version }}</em></li>

{% if molprobity_version is not none %}
<li><em><a href='http://molprobity.biochem.duke.edu/'>Molprobity</a> Version {{ molprobity_version }}</em></li>
Expand All @@ -148,7 +150,7 @@ <h2 align="center">{{ date }}</h2>
<li><em><a href='https://www.embl-hamburg.de/biosaxs/software.html'>ATSAS</a> Version {{atsas_version }}</em></li>
{% endif %}

<li><em><a href='https://github.com/salilab/IHMValidation'>Integrative Modeling Validation</a> Version 1.0</em></li>
<li><em><a href='https://github.com/salilab/IHMValidation'>Integrative Modeling Validation</a> Version {{ report_version }}</em></li>

</ul>
</div>
Expand Down
5 changes: 4 additions & 1 deletion templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ <h3></h3>
<p style=margin-bottom:1cm;> </p>
<p align="justify">The following software was used in the production of this report.</p>
<ul style="list-style-type:none;">

<li><em><a href='https://github.com/ihmwg/python-ihm'>Python-IHM</a> Version {{ python_ihm_version }}</em></li>

{% if molprobity_version is not none %}
<li><em><a href='http://molprobity.biochem.duke.edu/'>Molprobity</a> Version {{ molprobity_version }}</em></li>
{% endif %}
Expand All @@ -194,7 +197,7 @@ <h3></h3>
<li><em><a href='https://www.embl-hamburg.de/biosaxs/software.html'>ATSAS</a> Version {{ atsas_version }}</em></li>
{% endif %}

<li><em><a href='https://github.com/salilab/IHMValidation'>Integrative Modeling Validation</a> Version 1.0</em></li>
<li><em><a href='https://github.com/salilab/IHMValidation'>Integrative Modeling Validation</a> Version {{ report_version }}</em></li>
</ul>
</div>
<!-- end column -->
Expand Down

0 comments on commit cf90346

Please sign in to comment.