compound_t_list.html 10.4 KB
Newer Older
1
<table class="table table-striped">
2
3
  <thead>
    <tr>
4
      {% include "compound_t_colhead.html" with col_id="tanimoto" col_name="Tanimoto" col_title="Tanimoto similarity" %}
5
      {% include "compound_t_colhead.html" with col_id="id" col_name="#" col_title="Compound's iPPIDB ID" %}
6
      {% include "compound_t_colhead.html" with col_id="canonical_smiles" col_name="Structure" %}
7
      {% include "compound_t_colhead.html" with col_id="common_name" col_name="common name" %}
8
9
10
      {% include "compound_t_colhead.html" with col_id="families" col_name="PPI families" %}
      {% include "compound_t_colhead.html" with col_id="pubs" col_name="Publications" col_title="Number of available publications"%}
      {% include "compound_t_colhead.html" with col_id="available_tests" col_name="Assays" col_title="Number of available assays" %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
11
      {% include "compound_t_colhead.html" with col_id="compound_action_ligand_ids" col_name="PDB ligand" col_title="PDB ligand identifier"%}
12
13
14
      {% include "compound_t_colhead.html" with col_id="molecular_weight" col_name="MW" col_title="molecular weight (g/mol)" %}
      {% include "compound_t_colhead.html" with col_id="a_log_p" col_name="AlogP" col_title="Octanol/Water partition coefficient"%}
      {% include "compound_t_colhead.html" with col_id="nb_donor_h" col_name="HBD" col_title="Number of Hydrogen Bond Donors" %}
15
16
17
18
      {% include "compound_t_colhead.html" with col_id="nb_acceptor_h" col_name="HBA" col_title="Number of Hydrogen Bond Acceptors" %}
      {% include "compound_t_colhead.html" with col_id="tpsa" col_name="TPSA (Å2)" col_title="Topological Polar Surface Area" %}
      {% include "compound_t_colhead.html" with col_id="nb_rotatable_bonds" col_name="RB" col_title="Number of Rotatable Bonds" %}
      {% include "compound_t_colhead.html" with col_id="nb_aromatic_sssr" col_name="Ar" col_title="Number of SSSR Aromatic rings" %}
19
      {% include "compound_t_colhead.html" with col_id="fsp3" col_name="Fsp3" col_title="Number of Carbon sp3/ Number of Carbon" %}
20
      {% include "compound_t_colhead.html" with col_id="nb_chiral_centers" col_name="R/S" col_title="Number of chiral centers" %}
21
22
      {% include "compound_t_colhead.html" with col_id="le" col_name="LE" col_title="Ligand Efficiency" %}
      {% include "compound_t_colhead.html" with col_id="lle" col_name="LLE" col_title="Lipophilic Efficiency" %}
23
      {% include "compound_t_colhead.html" with col_id="best_activity" col_name="Best Activity" col_title="Best pXC50 Activity" %}
24
25
26
      <button type="button" class="btn btn-primary float-right" style="width: inherit!important" data-toggle="modal" data-target="#selectColumns">
        <i class="fa fa-columns" title="customize columns"></i>
      </button>
27
28
29
30
31
    </tr>
  </thead>
  <tbody>
    {% for compound in compounds %}
      <tr>
32
        {% if compound.tanimoto != None %}
33
34
        <td title="tanimoto similarity value">{{ compound.tanimoto }}</td>
        {% endif %}
35
        <td scope="col"><span class="badge badge-dark"><a href="/compounds/{{ compound.id }}">{{ compound.id }}</a></span></td>
36
      {% if "canonical_smiles" in fields %}
37
        <td scope="col" style="width:150px">{% include "compound_smiles_draw.html" with id=compound.id smile=compound.canonical_smile width="150" height="150"%}</td>
38
      {% endif %}
39
      {% if "common_name" in fields %}
40
        <td scope="col">{{ compound.common_name|default_if_none:"-" }}</td>
41
      {% endif %}
42
      {% if "families" in fields %}
43
        <td scope="col">{% for family in compound.families %}{{ family.name }}{% if not forloop.last %}, {% endif %}{% endfor %}</td>
44
      {% endif %}
45
      {% if "pubs" in fields %}
46
        <td scope="col">{{ compound.pubs }}</td>
47
48
      {% endif %}
      {% if "available_tests" in fields %}
49
        <td scope="col">{{ compound.compoundactivityresult_set.count }}</td>
50
      {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
51
52
      {% if "compound_action_ligand_ids" in fields %}
        <td scope="col">{% for ligand_id in compound.compound_action_ligand_ids %}{{ ligand_id | default_if_none:""}}{% endfor %}</td>
53
      {% endif %}
54
      {% if "molecular_weight" in fields %}
55
        <td scope="col">{{ compound.molecular_weight}}</td>
56
      {% endif %}
57
      {% if "a_log_p" in fields %}
58
        <td scope="col">{{ compound.a_log_p }}</td>
59
60
      {% endif %}
      {% if "nb_donor_h" in fields %}
61
        <td scope="col">{{ compound.nb_donor_h }}</td>
62
      {% endif %}
63
      {% if "nb_acceptor_h" in fields %}
64
        <td scope="col">{{ compound.nb_acceptor_h }}</td>
65
      {% endif %}
66
      {% if "tpsa" in fields %}
67
        <td scope="col">{{ compound.tpsa }}</td>
68
69
      {% endif %}
      {% if "nb_rotatable_bonds" in fields %}
70
        <td scope="col">{{ compound.nb_rotatable_bonds }}</td>
71
72
      {% endif %}
      {% if "nb_aromatic_sssr" in fields %}
73
        <td scope="col">{{ compound.nb_aromatic_sssr }}</td>
74
      {% endif %}
75
      {% if "fsp3" in fields %}
76
        <td scope="col">{{ compound.fsp3|floatformat:2 }}</td>
77
      {% endif %}
78
      {% if "nb_chiral_centers" in fields %}
79
        <td scope="col">{{ compound.nb_chiral_centers }}</td>
80
      {% endif %}
81
      {% if "le" in fields %}
82
        <td scope="col">{{ compound.le|floatformat:2 }}</td>
83
84
      {% endif %}
      {% if "lle" in fields %}
85
        <td scope="col">{{ compound.lle|floatformat:2 }}</td>
86
      {% endif %}
87
88
      {% if "best_activity" in fields %}
        <td scope="col">{{ compound.best_activity|floatformat:2 }}</td>
89
      {% endif %}
90
91
92
93
      </tr>
    {% endfor %}
  </tbody>
</table>
94
95
96
97
98
99
100
101
102
103
104
105

<!-- Modal for selection of table columns to be displayed-->
<div class="modal fade" id="selectColumns" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Table columns</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
106
107
108
        <div class="row">
          <label><input type="checkbox" name="field" value="canonical_smiles" class="mr-1" {% if 'canonical_smiles' in fields %}checked="checked"{% endif %} />Structure</label>
        </div>
109
110
111
112
        <div class="row">
          <label><input type="checkbox" name="field" value="common_name" class="mr-1" {% if 'common_name' in fields %}checked="checked"{% endif %} />Common name</label>
        </div>
        <div class="row">
113
          <label><input type="checkbox" name="field" value="families" class="mr-1" {% if 'families' in fields %}checked="checked"{% endif %} />PPI families</label>
114
115
        </div>
        <div class="row">
116
117
118
119
          <label><input type="checkbox" name="field" value="pubs" class="mr-1" {% if 'pubs' in fields %}checked="checked"{% endif %} />Available publications</label>
        </div>
        <div class="row">
          <label><input type="checkbox" name="field" value="available_tests" class="mr-1" {% if 'available_tests' in fields %}checked="checked"{% endif %} />Available tests</label>
120
121
        </div>
        <div class="row">
Hervé  MENAGER's avatar
Hervé MENAGER committed
122
          <label><input type="checkbox" name="field" value="compound_action_ligand_ids" class="mr-1" {% if 'compound_action_ligand_ids' in fields %}checked="checked"{% endif %} />PDB ligands</label>
123
124
        </div>
        <div class="row">
125
          <label><input type="checkbox" name="field" value="molecular_weight" class="mr-1" {% if 'molecular_weight' in fields %}checked="checked"{% endif %} />Molecular Weight</label>
126
127
        </div>
        <div class="row">
128
          <label><input type="checkbox" name="field" value="a_log_p" class="mr-1" {% if 'a_log_p' in fields %}checked="checked"{% endif %} />AlogP</label>
129
        </div>
130
        <div class="row">
131
          <label><input type="checkbox" name="field" value="nb_donor_h" class="mr-1" {% if 'nb_donor_h' in fields %}checked="checked"{% endif %} />Number of hydrogen bond donors</label>
132
133
        </div>
        <div class="row">
134
          <label><input type="checkbox" name="field" value="nb_acceptor_h" class="mr-1" {% if 'nb_acceptor_h' in fields %}checked="checked"{% endif %} />Number of hydrogen bond acceptors</label>
135
136
137
138
139
        </div>
        <div class="row">
          <label><input type="checkbox" name="field" value="tpsa" class="mr-1" {% if 'tpsa' in fields %}checked="checked"{% endif %} />Topological Polar Surface Area (TPSA)</label>
        </div>
        <div class="row">
140
141
142
143
          <label><input type="checkbox" name="field" value="nb_rotatable_bonds" class="mr-1" {% if 'nb_rotatable_bonds' in fields %}checked="checked"{% endif %} />Number of rotatable bonds</label>
        </div>
        <div class="row">
          <label><input type="checkbox" name="field" value="nb_aromatic_sssr" class="mr-1" {% if 'nb_aromatic_sssr' in fields %}checked="checked"{% endif %} />Number of aromatic Smallest Set of System Rings (SSSR)</label>
144
145
        </div>
        <div class="row">
146
          <label><input type="checkbox" name="field" value="fsp3" class="mr-1" {% if 'fsp3' in fields %}checked="checked"{% endif %} />Number of Carbon sp3 / Number of Carbon</label>
147
        </div>
148
149
150
        <div class="row">
          <label><input type="checkbox" name="field" value="nb_chiral_centers" class="mr-1" {% if 'nb_chiral_centers' in fields %}checked="checked"{% endif %} />Number of chiral centers</label>
        </div>
151
152
153
154
155
156
        <div class="row">
          <label><input type="checkbox" name="field" value="le" class="mr-1" {% if 'le' in fields %}checked="checked"{% endif %} />Ligand Efficiency</label>
        </div>
        <div class="row">
          <label><input type="checkbox" name="field" value="lle" class="mr-1" {% if 'lle' in fields %}checked="checked"{% endif %} />Lipophilic Efficiency</label>
        </div>
157
        <div class="row">
158
          <label><input type="checkbox" name="field" value="best_activity" class="mr-1" {% if 'best_activity' in fields %}checked="checked"{% endif %} />Best pXC50 Activity</label>
159
        </div>
160
161
162
163
164
165
166
167
168
169
170
171
172
173
      </div>
      <div class="modal-footer">
        <script>
        function changeFieldsSelection(){
            var selectedFields = $('input[name=field]:checked').map(function(_, el) { return $(el).val(); }).get();
            modifyUrl('fields', selectedFields);
        }
        </script>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary" onclick="changeFieldsSelection();">Change columns</button>
      </div>
    </div>
  </div>
</div>