diff --git a/ippisite/ippidb/templates/about-general.html b/ippisite/ippidb/templates/about-general.html index 2b950dedc27c72204ef610978ce9317fe4ecd932..b9c896e2baea041f180b9cd4c9648a24e8cd7b35 100644 --- a/ippisite/ippidb/templates/about-general.html +++ b/ippisite/ippidb/templates/about-general.html @@ -5,30 +5,59 @@ {% block pagetitle %}GENERAL INFORMATION{% endblock%} {% block view_content %} -<div class="row"> -<ul style="columns: 2;" class="list-unstyled mx-auto"> - <li>Number of compounds: {{ compounds_count }}</li> - <li>Total number of binding data: {{ car_count }}</li> - <li>Total number of biochemical binding data: {{ bioch_car_count }}</li> - <li>Total number of cellular binding data: {{ cell_car_count }}</li> - <li>Number of proteins: {{ proteins_count }}</li> - <li>Number of families: {{ families_count }}</li> - <li>Number of PPI targets: {{ ppis_count }}</span></li> - <li>Number of bibliographic sources: {{ biblio_count }}</span></li> -</ul> +<div class="row justify-content-center"> + <div class="col-6 text-center border rounded-top"> + <h3>Summary Data: Protein Interaction Explorer</h3> + </div> +</div> +<div class="row justify-content-center"> + <div class="col-6 border rounded-bottom"> + <ul style="columns: 2;" class="list-unstyled mx-auto"> + <li>Number of pockets: {{ cavitiescount }}</li> + <li>Number of orthosteric pockets: {{ orthocount }}</li> + <li>Number of liganded orthosteric competitive pockets: + {{ ortho_comp }}</li> + <li>Number of liganded orthosteric non competitive pockets: + {{ ortho_nocomp }}</li> + <li>Number of allosteric pockets: {{ allostcount }}</li> + <li>Number of proteins: {{ proteincount }}</li> + <li>Number of organisms: {{ organismcount }}</li> + </ul> + </div> +</div> + +<div class="row mt-5 justify-content-center"> + <div class="col-6 text-center border rounded-top"> + <h3>Summary Data: Compounds</h3> + </div> +</div> +<div class="row justify-content-center"> + <div class="col-6 border rounded-bottom"> + <ul style="columns: 2;" class="list-unstyled mx-auto"> + <li>Number of compounds: {{ compounds_count }}</li> + <li>Total number of binding data: {{ car_count }}</li> + <li>Total number of biochemical binding data: {{ bioch_car_count }}</li> + <li>Total number of cellular binding data: {{ cell_car_count }}</li> + <li>Number of proteins: {{ proteins_count }}</li> + <li>Number of families: {{ families_count }}</li> + <li>Number of PPI targets: {{ ppis_count }}</span></li> + <li>Number of bibliographic sources: {{ biblio_count }}</span></li> + </ul> + </div> </div> -<h2 class="mt-5 text-center">What are the iPPI-DB standards ?</h2> + +<h2 class="mt-5 text-center">What are the iPPI-DB compounds standards ?</h2> <div class="row justify-content-center"> <div class="col-md-auto"> - Here is some guidance to submit binding data that comply with iPPI-DB standards : - <ul class="list-styled"> - <li>The PPI target must have a known functional mechanism</li> - <li>No peptide will be considered</li> - <li>Only dose response-based measures of activity are considered (e.g IC50, EC50, Kd, Ki)</li> - <li>Only activities below 30 μM will qualify the corresponding compounds</li> - </ul> + Here is some guidance to submit binding data that comply with iPPI-DB standards : + <ul class="list-styled"> + <li>The PPI target must have a known functional mechanism</li> + <li>No peptide will be considered</li> + <li>Only dose response-based measures of activity are considered (e.g IC50, EC50, Kd, Ki)</li> + <li>Only activities below 30 μM will qualify the corresponding compounds</li> + </ul> </div> </div> @@ -43,12 +72,13 @@ <div class="row justify-content-center"> <div class="col-md-auto"> - We collect some of your personal data: - <ul class="list-styled"> - <li>IP address, date and time of visit to the service, operating system, browser user agent, for all users</li> - <li>ORCID ID or email for registered users</li> - </ul> -</div> + We collect some of your personal data: + <ul class="list-styled"> + <li>IP address, date and time of visit to the service, operating system, browser user agent, for all users + </li> + <li>ORCID ID or email for registered users</li> + </ul> + </div> </div> @@ -58,21 +88,23 @@ <div class="col-md-auto"> <p>We use cookies to manage sessions and user authentication across this website.</p> - {% if gacode %} - - <p>We use <a href="https://analytics.google.com" target="_blank" class="ml-1 mr-1">Google Analytics</a> to collect statistics about iPPI-DB.</p> - <p>These statistics are not used to track users individually, but rather to monitor the performance and the usage of the website.</p> - <p>Therefore, some data regarding your use of this website is sent to this third party, including:</p> - <ul class="list-styled"> - <li>IP address</li> - <li>Date and time of a visit to the service</li> - <li>Operating system</li> - <li>Browser</li> - <li>Amount of data transmitted</li> - </ul> - {% endif %} + {% if gacode %} + + <p>We use <a href="https://analytics.google.com" target="_blank" class="ml-1 mr-1">Google Analytics</a> to + collect statistics about iPPI-DB.</p> + <p>These statistics are not used to track users individually, but rather to monitor the performance and the + usage of the website.</p> + <p>Therefore, some data regarding your use of this website is sent to this third party, including:</p> + <ul class="list-styled"> + <li>IP address</li> + <li>Date and time of a visit to the service</li> + <li>Operating system</li> + <li>Browser</li> + <li>Amount of data transmitted</li> + </ul> + {% endif %} </div> </div> -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/about-pie.html b/ippisite/ippidb/templates/about-pie.html deleted file mode 100644 index eed8ffa25bbb1a7100a1b528decb54feb8707d5c..0000000000000000000000000000000000000000 --- a/ippisite/ippidb/templates/about-pie.html +++ /dev/null @@ -1,50 +0,0 @@ -{% extends "index.html" %} - - -{% block title %}about Protein Interaction{% endblock %} - -{% block content %} -<div class="inner-wrap"> - <div id="main-wrapper" class="page"> - <div id="main"> - <div id="content" class="main-content"> - <div class="section"> - <main role="main"> - <h1 class="page-title"> {% block pagetitle %}GENERAL INFORMATION{% endblock%} </h1> - <div class="tabs"></div> - <div class="main__inner"> - <div class="region region-content"> - <div class="page-intro"> - </div> - <div class="color-wrap"> - <div class="region region-content"> - <div class="block block-system block-system-main"> - <div class="content"> - <div class="view-content"> - <div class="row"> - <ul style="columns: 2;" class="list-unstyled mx-auto"> - <li>Number of pockets: {{ cavitiescount }}</li> - <li>Number of orthosteric pockets: {{ orthocount }}</li> - <li>Number of liganded orthosteric competitive pockets: - {{ ortho_comp }}</li> - <li>Number of liganded orthosteric non competitive pockets: - {{ ortho_nocomp }}</li> - <li>Number of allosteric pockets: {{ allostcount }}</li> - <li>Number of proteins: {{ proteincount }}</li> - <li>Number of organisms: {{ organismcount }}</li> - </ul> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </main><!-- .site-main --> - </div> - </div> - </div><!-- div main --> - </div> -</div> -{% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/about.html b/ippisite/ippidb/templates/about.html index 236bdc9258b1618c9165a608d33509903678f6e6..ade6895e1614215eaca9cb432d7f7f60febc498b 100644 --- a/ippisite/ippidb/templates/about.html +++ b/ippisite/ippidb/templates/about.html @@ -12,7 +12,7 @@ <nav class="secondary-nav"> <ul> <li> - <a href="/about-compound-general">General</a> + <a href="/about-general">General</a> </li> <li> <a href="/about-pharmacology">Pharmacology</a> diff --git a/ippisite/ippidb/templates/base.html b/ippisite/ippidb/templates/base.html index 4286ee6dece7a9c23388c9e04c6d579c6d83ad20..08afeaa4a75c2ad88f641c98f2ef7f2464c584a4 100644 --- a/ippisite/ippidb/templates/base.html +++ b/ippisite/ippidb/templates/base.html @@ -51,7 +51,7 @@ {% if gacode %} <div id="consent" class="fixed-bottom pl-5 pr-5 pt-2 pb-2 text-light bg-dark text-center"> By using the site you are agreeing to the use of third party cookies for statistical purposes. You can read more - about our policy <a href="/about-compounds-general/#terms-privacy"><b>here</b></a>. + about our policy <a href="/about-general/#terms-privacy"><b>here</b></a>. <button id="consentBtn" class="btn btn-dark ml-2" type="button" aria-label="Accept">Accept </button> </div> @@ -95,16 +95,16 @@ <a href="{% url 'index' %}">Home</a> </li> <li> - <a href="{% url 'compound_list' %}">Query compounds</a> + <a href="{% url 'general' %}">About</a> </li> <li> - <a href="{% url 'general' %}">About compounds</a> + <a href="{% url 'compound_list' %}">Query compounds</a> </li> <li> - <a href="{% url 'cavities' %}">Protein Interaction Explorer</a> + <a href="{% url 'admin-session'%}">Contribute</a> </li> <li> - <a href="{% url 'aboutpi' %}">About Protein Interaction</a> + <a href="{% url 'cavities' %}">Protein Interaction Explorer</a> </li> <li> <a href="{% url 'tutorials' %}">Tutorials</a> @@ -112,9 +112,6 @@ <li> <a href="{% url 'faq' %}">FAQ</a> </li> - <li> - <a href="{% url 'admin-session'%}">Contribute</a> - </li> {% if request.user.is_staff %} <li> <a href="/admin">Admin</a> @@ -166,14 +163,11 @@ <a href="/compounds">Query compounds</a> </li> <li> - <a href="/about-compounds-general">About Compounds</a> + <a href="/about-general">About</a> </li> <li> <a href="/targetcentric">Protein Interaction Explorer</a> </li> - <li> - <a href="/about-pi-general">About Protein Interaction</a> - </li> <li> <a href="/tutorials">Tutorials</a> </li> diff --git a/ippisite/ippidb/urls.py b/ippisite/ippidb/urls.py index 59190f867666f9095d37757bb95eb639988e0ea4..f689530c11375665b9bb28525ea7ceae36c31fb4 100644 --- a/ippisite/ippidb/urls.py +++ b/ippisite/ippidb/urls.py @@ -63,8 +63,7 @@ urlpatterns = [ re_path(r"^credits/$", views.credits, name="credits"), re_path(r"^citation/$", views.citation, name="citation"), re_path(r"^news/$", views.news, name="news"), - re_path(r"^about-pi-general/$", views.about_pi_general, name="aboutpi"), - re_path(r"^about-compounds-general/$", views.about_general, name="general"), + re_path(r"^about-general/$", views.about_general, name="general"), re_path(r"^about-pharmacology/$", views.about_pharmacology, name="pharmacology"), re_path(r"^about-le-lle/$", views.about_le_lle, name="le_lle"), re_path( diff --git a/ippisite/ippidb/views/__init__.py b/ippisite/ippidb/views/__init__.py index 1a8ee369256bc83ae507dfd39464798d2d5b0d97..2168f69bcb926f1cd8d715c70736f27a656c30ab 100644 --- a/ippisite/ippidb/views/__init__.py +++ b/ippisite/ippidb/views/__init__.py @@ -31,7 +31,6 @@ from .targetcentric import ( JobViewSet, pocketome_html, LinkedPDBViewSet, - about_pi_general, ) from .contribute import ippidb_wizard_view, ContributionDetailView from .compound_query import ( @@ -56,9 +55,7 @@ from .about import ( ContributorListView, ContributorDetailView, ) -from .faq import ( - FaqView -) +from .faq import FaqView from django.conf import settings @@ -128,7 +125,6 @@ __all__ = [ about_pca, about_pharmacology, about_physicochemistry, - about_pi_general, ContributorListView, ContributorDetailView, PdbViewSet, diff --git a/ippisite/ippidb/views/about.py b/ippisite/ippidb/views/about.py index a59f871fb2d4c49358dc102e70573bc9849db233..dfe3e568f61ddb4b4dfffb97997c2a957faaa0c6 100644 --- a/ippisite/ippidb/views/about.py +++ b/ippisite/ippidb/views/about.py @@ -20,9 +20,17 @@ from ippidb.models import ( Bibliography, Protein, Contributor, + Cavity, + Chain, ) +def about_pi_general(request): + context = {} + + return render(request, "about-pie.html", context=context) + + def about_general(request): compounds_count = Compound.objects.count() car_count = CompoundActivityResult.objects.count() @@ -36,6 +44,18 @@ def about_general(request): families_count = PpiFamily.objects.count() ppis_count = Ppi.objects.count() biblio_count = Bibliography.objects.count() + cavitiescount = Cavity.objects.all().count() + proteincount = Chain.objects.all().values("protein__uniprot_id").distinct().count() + organismcount = ( + Chain.objects.all().values("protein__organism__name").distinct().count() + ) + orthocount = Cavity.objects.filter(type="orthosteric").count() + allostcount = Cavity.objects.filter(type="liganded_allosteric").count() + ortho_comp = Cavity.objects.filter(type="liganded_orthosteric_competitive").count() + ortho_nocomp = Cavity.objects.filter( + type="liganded_orthosteric_noncompetitive" + ).count() + context = { "compounds_count": compounds_count, "car_count": car_count, @@ -45,6 +65,13 @@ def about_general(request): "families_count": families_count, "ppis_count": ppis_count, "biblio_count": biblio_count, + "cavitiescount": cavitiescount, + "proteincount": proteincount, + "organismcount": organismcount, + "orthocount": orthocount, + "allostcount": allostcount, + "ortho_comp": ortho_comp, + "ortho_nocomp": ortho_nocomp, } return render(request, "about-general.html", context=context) diff --git a/ippisite/ippidb/views/targetcentric.py b/ippisite/ippidb/views/targetcentric.py index 3642f530f9a9fb4bd1de402bd9cc1340cb00de9d..419b06ff9e547bed369713664742e9e1600d2682 100644 --- a/ippisite/ippidb/views/targetcentric.py +++ b/ippisite/ippidb/views/targetcentric.py @@ -580,28 +580,3 @@ class SummaryView(TemplateView): """ template_name = "summary-table.html" - - -def about_pi_general(request): - context = {} - cavitiescount = Cavity.objects.all().count() - proteincount = Chain.objects.all().values("protein__uniprot_id").distinct().count() - organismcount = ( - Chain.objects.all().values("protein__organism__name").distinct().count() - ) - orthocount = Cavity.objects.filter(type="orthosteric").count() - allostcount = Cavity.objects.filter(type="liganded_allosteric").count() - ortho_comp = Cavity.objects.filter(type="liganded_orthosteric_competitive").count() - ortho_nocomp = Cavity.objects.filter( - type="liganded_orthosteric_noncompetitive" - ).count() - - context["cavitiescount"] = cavitiescount - context["proteincount"] = proteincount - context["organismcount"] = organismcount - context["orthocount"] = orthocount - context["allostcount"] = allostcount - context["ortho_comp"] = ortho_comp - context["ortho_nocomp"] = ortho_nocomp - - return render(request, "about-pie.html", context=context)