Skip to content

Commit

Permalink
bulk update: static paths to resources; html directory structure cons…
Browse files Browse the repository at this point in the history
…istent with pdb-dev website; minor fixes
  • Loading branch information
aozalevsky committed Feb 21, 2024
1 parent 94c350f commit d21252b
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 135 deletions.
14 changes: 8 additions & 6 deletions ihm_validation/ihm_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
help="Path to a directory where the output will be written")
parser.add_argument('--output-prefix', type=str, default=None,
help="Prefix of the output directory. Default is a stem of the mmCIF file")
parser.add_argument('--html-mode', type=str, default='local',
parser.add_argument('--html-mode', type=str, default='pdb-dev',
choices=['local', 'pdb-dev'],
help="HTML mode affects paths to various statis resources")
parser.add_argument('--html-resources',
Expand Down Expand Up @@ -139,8 +139,8 @@
"model_quality.html",
"model_composition.html",
"formodeling.html",
"about_validation.html",
"validation_help.html",
# "about_validation.html",
# "validation_help.html",
]

# Get the UTC time from ruser
Expand Down Expand Up @@ -172,9 +172,9 @@

dirNames.update(
{
'images': str(Path(dirNames['html'], 'images')),
'csv': str(Path(dirNames['html'], 'csv')),
'pdf': str(Path(dirNames['html'], 'pdf')),
'images': str(Path(dirNames['root_html'], 'images')),
'csv': str(Path(dirNames['root_html'], 'csv')),
'pdf': str(Path(dirNames['root_html'], 'pdf')),
# 'json': str(Path(output_path, 'json')),
}
)
Expand Down Expand Up @@ -297,6 +297,7 @@ def write_json(mmcif_file: str, template_dict: dict, dirName: str, dirName_Outpu
template_dict, molprobity_dict, exv_data = report.run_model_quality(
template_dict, csvDirName=dirNames['csv'], htmlDirName=dirNames['html'])

template_dict['enable_sas'] = args.enable_sas
if args.enable_sas:
logging.info("SAS validation")
template_dict, sas_data, sas_fit = report.run_sas_validation(template_dict)
Expand All @@ -310,6 +311,7 @@ def write_json(mmcif_file: str, template_dict: dict, dirName: str, dirName_Outpu
sas_fit = {}

# uncomment below to run CX analysis
template_dict['enable_cx'] = args.enable_cx
if args.enable_cx:
logging.info("CX validation")
template_dict, cx_data, cx_ertypes = report.run_cx_validation(template_dict)
Expand Down
12 changes: 6 additions & 6 deletions templates/data_quality.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="card-header" style="background-color: #FFF;">
<div class="row">
<div class="col-lg-12">
<h4 class="ex2" align="center"><u><a name='first'>Data quality</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#dataquality'>?</a>
<h4 class="ex2" align="center"><u><a name='first'>Data quality</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#dataquality'>?</a>
</h4>
</div>
</div>
Expand Down Expand Up @@ -43,7 +43,7 @@ <h5 class= ex2 align= center>
<div class="col-lg-12">
<!-- potential nesting inconsistency -->
<h5 class= ex2 align= center>
<u><a name=firstI>SAS:Scattering profile</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#scattering'>?</a>
<u><a name=firstI>SAS:Scattering profile</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#scattering'>?</a>
</h5>
<p align=justify>
SAS data used in this integrative model was obtained from {{sasdb_code_html|length|int}} deposited SASBDB entry (entries).
Expand Down Expand Up @@ -76,7 +76,7 @@ <h5 class= ex2 align= center>
<div class="col-lg-12">
<div class="card-header" style="background-color: #FFF;">
<h5 class= ex2 align= center>
<u><a name=firstE>Key experimental estimates</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#expt'>?</a>
<u><a name=firstE>Key experimental estimates</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#expt'>?</a>
</h5>
<p class=ex2 align='justify'>
<u>Molecular weight (MW) estimates from experiments and analysis</u>: true molecular weight can be compared to the Porod estimate from scattering profiles.
Expand All @@ -99,7 +99,7 @@ <h5 class= ex2 align= center>
<div class="col-lg-12">
{% if sas|length > 0 and sasdb_sascif|length > 0 %}
<h5 class= ex2 align= center>
<u><a name=firstF>Flexibility analysis</a> </u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#flexibility'>?</a>
<u><a name=firstF>Flexibility analysis</a> </u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#flexibility'>?</a>
</h5>
{% endif %}
</div>
Expand Down Expand Up @@ -127,7 +127,7 @@ <h5 class= ex2 align= center>
<!-- header -->
<div class="col-lg-12">
<h5 align= center>
<u><a name=firstP>Pair-distance distribution analysis</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#pofr'>?</a>
<u><a name=firstP>Pair-distance distribution analysis</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#pofr'>?</a>
</h5>
<p class=ex2 align='justify'>
<u>P(r) analysis:</u> P(r) represents the distribution of distances between all pairs of atoms within the particle weighted by the respective electron densities. P(r) is the Fourier transform of I(s) (and vice versa). R<sub>g</sub> can be estimated from integrating the P(r) function. Agreement between the P(r) and Guinier-determined R<sub>g</sub> (table below) is a good measure of the self-consistency of the SAS profile. R<sub>g</sub> is a measure for the overall size of a macromolecule; e.g. a protein with a smaller R<sub>g</sub> is more compact than a protein with a larger R<sub>g</sub>, provided both have the same molecular weight (MW). The point where P(r) is decaying to zero is called D<sub>max</sub> and represents the maximum size of the particle.
Expand Down Expand Up @@ -156,7 +156,7 @@ <h5 align= center>
<div class="row">
<!-- description -->
<div class="col-lg-12">
<h5 class= ex2 align= center><u><a name=firstG> Guinier analysis </a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#guinier'>?</a>
<h5 class= ex2 align= center><u><a name=firstG> Guinier analysis </a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#guinier'>?</a>
</h5>
<p class=ex2 align='justify'>
<u> Guinier analysis:</u> agreement between the P(r) and Guinier-determined R<sub>g</sub> (table below) is a good measure of the self-consistency of the SAS profile. Molecular weight estimates can also be compared to Porod and sample molecular weights for consistency.
Expand Down
4 changes: 2 additions & 2 deletions templates/formodeling.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="row">
<div class="col-lg-12">
<h4 class="ex2" align="center">
<u><a name='first'>Fit of model to data used for modeling</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#fittodata'>?</a>
<u><a name='first'>Fit of model to data used for modeling</a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#fittodata'>?</a>
</h4>
</div>
</div>
Expand All @@ -35,7 +35,7 @@ <h5 class= ex2 align= center><u> Fit of model(s) to SAS data</u></h5>
<div class="row">
<div class="col-lg-6">
<h5 class= ex2 align= center>
<u><a name='second'>Cormap p-value analysis of fits </a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='validation_help.html#cormap'>?</a>
<u><a name='second'>Cormap p-value analysis of fits </a></u><a class='help' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=16px' href='https://pdb-dev.wwpdb.org/validation_help.html#cormap'>?</a>
</h5>
{% if number_of_fits > 0 %}
<p class =ex2>
Expand Down
8 changes: 4 additions & 4 deletions templates/full_validation_pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -600,18 +600,18 @@ <h5 align=center>
</h5>

{% if molp_b|length > 1 %}
<i>There are {{ bond }} bond outliers in this entry. A summary is provided below, and a detailed list of outliers can be found <a href=https://pdb-dev.wwpdb.org/{{ ID_MP }}/html/bond_outliers.html>here</a>.</i>
<i>There are {{ bond }} bond outliers in this entry. A summary is provided below, and a detailed list of outliers can be found <a href=https://pdb-dev.wwpdb.org/Validation/{{ ID_MP[0] }}/htmls/bond_outliers.html>here</a>.</i>
{{ write_table(molp_b) }}
{% else %}
<i> Bond length outliers can not be evaluated for this model</i>
{% endif %}

<!-- Angle outliers -->
<h5 align=center>
<u><a name='geometry2'>Standard geometry: angle outliers</a></u><a class='help1' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=12px' href='../../../validation_help.html#molprobity'>?</a></h5>
<u><a name='geometry2'>Standard geometry: angle outliers</a></u><a class='help1' title='help' style='background-color:#228B22;color:#000000;text-decoration:none font-size=12px' href='https://pdb-dev.wwpdb.org/validation_help.html#molprobity'>?</a></h5>

{% if molp_a|length > 1 %}
<i>There are {{ angle }} angle outliers in this entry. A summary is provided below, and a detailed list of outliers can be found <a href=https://pdb-dev.wwpdb.org/{{ ID_MP }}/html/angle_outliers.html>here</a>.</i>
<i>There are {{ angle }} angle outliers in this entry. A summary is provided below, and a detailed list of outliers can be found <a href=https://pdb-dev.wwpdb.org/Validation/{{ ID_MP[0] }}/htmls/angle_outliers.html>here</a>.</i>
{{ write_table(molp_a) }}
{% else %}
<i>Bond angle outliers do not exist or can not be evaluated for this model</i>
Expand Down Expand Up @@ -795,7 +795,7 @@ <h4 align="center">
<p align="justify"><em>Implementation of validation methods for SAS data and SAS-based models are funded by <a href='https://www.rcsb.org/'>RCSB PDB</a> (grant number DBI-1832184). Dr. Stephen Burley, Dr. John Westbrook, and Dr. Jasmine Young from <a href='https://www.rcsb.org/'>RCSB PDB</a>, Dr. Jill Trewhella, Dr. Dina Schneidman, and members of the <a href='https://www.sasbdb.org/'>SASBDB</a> repository are acknowledged for their advice and support in implementing SAS validation methods.</em></p>
</li>
<li>
<p align="justify"><em>Members of the <a href='http://www.wwpdb.org/task/hybrid'>wwPDB Integrative/Hybrid Methods Task Force</a> provided recommendations and community support for the project. </em> </p>
<p align="justify"><em>Members of the <a href='https://www.wwpdb.org/task/hybrid'>wwPDB Integrative/Hybrid Methods Task Force</a> provided recommendations and community support for the project. </em> </p>
</li>
</ul>
</div>
Expand Down
30 changes: 15 additions & 15 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<link rel="stylesheet" href="static/css/main.css">
<link rel="stylesheet" href="static/css/layout.css">
{% else %}
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/layout.css">
<link rel="stylesheet" href="https://pdb-dev.wwpdb.org/css/main.css">
<link rel="stylesheet" href="https://pdb-dev.wwpdb.org/css/layout.css">
{% endif %}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
Expand Down Expand Up @@ -41,7 +41,7 @@
{% if html_mode == 'local' %}
<img src="static/images/logon.png" class="float-left" alt="PDBDEV.org" height="100" width="110" style="margin-top: 0px; margin-bottom: 0px" />
{% else %}
<img src="/images/logon.png" class="float-left" alt="PDBDEV.org" height="100" width="110" style="margin-top: 0px; margin-bottom: 0px" />
<img src="https://pdb-dev.wwpdb.org/images/logon.png" class="float-left" alt="PDBDEV.org" height="100" width="110" style="margin-top: 0px; margin-bottom: 0px" />
{% endif %}
<p>
<h1 style="margin-left: 0px; color: #003366;">PDB-Dev</h1>
Expand Down Expand Up @@ -83,7 +83,7 @@ <h5>

<!-- About validation -->
<li class="nav-item mr-4 dropdown">
<a class="btn btn-primary " href="about_validation.html"><span class="overview">About <br> Validation</span></a>
<a class="btn btn-primary " href="https://pdb-dev.wwpdb.org/about_validation.html"><span class="overview">About <br> Validation</span></a>
</li>
<li class="nav-item mr-4 dropdown">
<a class="dropdown-toggle" data-toggle="dropdown"><button type="button" class="btn btn-primary" onclick=window.location='main.html';>Validation <br> Overview</button></a>
Expand All @@ -107,18 +107,18 @@ <h5>

<!-- Model details -->
<li class="nav-item mr-4 dropdown">
{% if 'SAS DATA' in Data %}
{% if ('SAS DATA' in Data) and enable_sas %}
<a class="dropdown-toggle" data-toggle="dropdown"><button type="button" class="btn btn-primary" onclick=window.location="data_quality.html";>Data <br> Quality </button></a>

{% elif 'SAS DATA' not in Data and Unique_dataset|length > 0 %}
{% elif (('SAS DATA' not in Data) or not enable_sas) and Unique_dataset|length > 0 %}
<a class="dropdown-toggle" data-toggle="dropdown"><button type="button" class="btn btn-primary">Data <br> Quality </button></a>

{% else %}
<a class="btn btn-success dropdown-toggle button4" value="Disabled" disabled background-color: #555555 ><span >Data <br>Quality</span></a>
{% endif %}

<div class="dropdown-menu">
{% if 'SAS DATA' in Data and sasdb_sascif|length > 0 %}
{% if ('SAS DATA' in Data) and (sasdb_sascif|length > 0) and enable_sas %}
<a class="dropdown-item colorclass" dropdown-toggle href=data_quality.html#first>SAS</a>
<ul class=dropdown-submenu>
<li>
Expand All @@ -141,7 +141,7 @@ <h5>
<a class=dropdown-item2 href=data_quality.html#firstG>Guinier analysis </a>
</li>
</ul>
{% elif 'SAS DATA' in Data and sasdb_sascif|length < 1 %}
{% elif ('SAS DATA' in Data) and (sasdb_sascif|length < 1) and enable_sas %}
<a class="dropdown-item colorclass" dropdown-toggle type=button href=data_quality.html#first>SAS</a>
{% endif %}

Expand Down Expand Up @@ -169,7 +169,7 @@ <h5>

<!-- Fit to data used for modeling -->
<li class="nav-item mr-4 dropdown">
{% if 'SAS DATA' in Data or 'CX-MS DATA' in Data%}
{% if (('SAS DATA' in Data) and enable_sas) or (('CX-MS DATA' in Data) and enable_cx) %}
<a class="dropdown-toggle" data-toggle="dropdown"><button type="button" class="btn btn-primary" onclick=window.location="formodeling.html";>Fit to Data <br> Used for Modeling </button></a>

{% elif Unique_dataset|length > 0 %}
Expand All @@ -180,7 +180,7 @@ <h5>
{% endif %}

<div class="dropdown-menu">
{% if 'SAS DATA' in Data and sasdb_sascif|length > 0 %}
{% if ('SAS DATA' in Data) and (sasdb_sascif|length > 0) and enable_sas %}
<a class="dropdown-item colorclass" dropdown-toggle href=formodeling.html>SAS</a>
<ul class=dropdown-submenu>
<li>
Expand All @@ -190,11 +190,11 @@ <h5>
<a class=dropdown-item2 href=formodeling.html#second>Cormap analysis </a>
</li>
</ul>
{% elif 'SAS DATA' in Data and sasdb_sascif|length < 1 %}
{% elif ('SAS DATA' in Data) and (sasdb_sascif|length < 1) and enable_sas%}
<a class=dropdown-item dropdown-toggle type=button href=data_quality.html#first>SAS</a>
{% endif %}

{% if 'CX-MS DATA' in Data %}
{% if ('CX-MS DATA' in Data) and enable_cx %}
<a class="dropdown-item colorclass" dropdown-toggle href=formodeling.html#cxms>
CX-MS
</a>
Expand Down Expand Up @@ -227,7 +227,7 @@ <h5>
</div>
</li>
<li class="nav-item mr-4 dropdown">
<a class="btn btn-primary " href="validation_help.html"><span class="overview">Validation <br> Help</span></a>
<a class="btn btn-primary " href="https://pdb-dev.wwpdb.org/validation_help.html"><span class="overview">Validation <br> Help</span></a>
</li>
</ul>
</div>
Expand All @@ -241,11 +241,11 @@ <h5>
<div class="container-fluid">
<div class="row" style="/color:#FFF; background-color: rgba(102,153,102, 0.5); padding-top: 10px; padding-bottom: 2px;">
<div class="col-sm-6" style="padding-top: 10px; padding-bottom: 10px;">
<a href="http://www.wwpdb.org/" target="_blank">
<a href="https://www.wwpdb.org/" target="_blank">
{% if html_mode == 'local' %}
<img src="static/images/wwpdb-logo11.png" alt="wwpdb" height="35px" width="160px"></a>
{% else %}
<img src="/images/wwpdb-logo11.png" alt="wwpdb" height="35px" width="160px"></a>
<img src="https://pdb-dev.wwpdb.org/images/wwpdb-logo11.png" alt="wwpdb" height="35px" width="160px"></a>
{% endif %}
</div>
<div class="col-sm-6">
Expand Down
2 changes: 1 addition & 1 deletion templates/macro.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{% macro insert_sas_plot(id, sasdb_id, plot_name) %}
<div class=col-lg-6>
<div class=box text-center container-fluid no-padding style=height:60vh>
<iframe src=images/{{id}}{{sasdb_id}}{{plot_name}}.html frameborder=0 scrolling=yes width=100% height=550vh style=position:relative>
<iframe src=../images/{{id}}{{sasdb_id}}{{plot_name}}.html frameborder=0 scrolling=yes width=100% height=600vh style=position:relative>
</iframe>
</div>
</div>
Expand Down
Loading

0 comments on commit d21252b

Please sign in to comment.