Skip to content
Snippets Groups Projects
Commit c8bd6fc0 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add AlogP cutoff filter to compounds list

Former-commit-id: 700dd6db21f76e9330ff3effffd2468fba4ae793
parent 0137e3f6
No related branches found
No related tags found
No related merge requests found
......@@ -39,10 +39,11 @@
{% include "multiselection_button.html" with label="Organism" param_name="taxonomy" %}
{% include "multiselection_button.html" with label="Bound complex" param_name="boundcomplex" %}
{% include "slider_button.html" with label="Molecular weight" param_name="molecular_weight" %}
{% include "slider_button.html" with label="AlogP" param_name="a_log_p" %}
</div>
<div class="row">
<span class="col-md-6"><span>{{ compounds.paginator.count }} compounds</span>
{% if selected_ppis or selected_diseases or selected_taxonomies or selected_boundcomplexes or molecular_weight != molecular_weight_max %}
{% if selected_ppis or selected_diseases or selected_taxonomies or selected_boundcomplexes or molecular_weight != molecular_weight_max or a_log_p != a_log_p_max %}
<span>&nbsp;-&nbsp;filters:&nbsp;</span>
{% if selected_ppis %}
{% for selected in selected_ppis %}
......@@ -67,6 +68,9 @@
{% if molecular_weight != molecular_weight_max %}
{% include "slider_badge.html" with param_name="molecular_weight" param_value=molecular_weight param_label="MW cutoff" %}
{% endif %}
{% if a_log_p != a_log_p_max %}
{% include "slider_badge.html" with param_name="a_log_p" param_value=a_log_p param_label="AlogP cutoff" %}
{% endif %}
{% endif %}
</span>
<div class="dropdown">
......@@ -139,5 +143,6 @@
{% include "multiselection_modal.html" with label="Organism" selected_list=selected_taxonomies unselected_list=taxonomies param_name="taxonomy" all_param_name="taxonomies_all" all_param_value=taxonomies_all %}
{% include "multiselection_modal.html" with label="Bound complex" selected_list=selected_boundcomplexes unselected_list=boundcomplexes param_name="boundcomplex" all_param_name="boundcomplexes_all" all_param_value=boundcomplexes_all %}
{% include "slider_modal.html" with label="Molecular Weight" param_name="molecular_weight" param_min=molecular_weight_min param_max=molecular_weight_max param_value=molecular_weight step='0.01' param_label='Select a cutoff value for the molecular weight of the compounds to be selected'%}
{% include "slider_modal.html" with label="AlogP" param_name="a_log_p" param_min=a_log_p_min param_max=a_log_p_max param_value=a_log_p step='0.01' param_label='Select a cutoff value for the AlogP of the compounds to be selected'%}
{% endblock %}
......@@ -204,6 +204,7 @@ def compound_list(request):
compounds = compounds.filter(compoundaction__ppi_id__ppicomplex__complex__id__in=request.GET.getlist('boundcomplex'))
context['compounds'] = compounds
context = process_cutoff_value('molecular_weight', context, request)
context = process_cutoff_value('a_log_p', context, request)
selected_families = PpiFamily.objects.filter(id__in=request.GET.getlist('family'))
families = PpiFamily.objects.exclude(id__in=request.GET.getlist('family'))
selected_ppis = Ppi.objects.filter(id__in=request.GET.getlist('ppi'))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment