Template source: designselection.html

{% extends "common/selection.html" %}
{% load static %}

{% block addon_js %}
    <script>

        var type_of_selection = '{{ type_of_selection }}';
        var selection_only_receptors = '{{ selection_only_receptors }}';
        var redirect_url = '{{ buttons.continue.url }}'
        var redirect_on_select = '{{ redirect_on_select }}'


    $(document).ready(function() {
        $(function(){
          // bind change event to select
          $('#preloaded_xtals').on('change', function () {
            var url = window.location.href;

            if (url.substr(-1) == '/') url = url.substr(0, url.length - 2);

            url = url.split('/');
            url.pop();
            url = url.join('/')+"/interaction/"+$(this).val(); // get selected value
            if (url) { // require a URL
                window.location = url; // redirect
            }

            toggleButtonClass('selection-button');
            $("#selection-targets").html("<p><span class='selection-heading-text'>Selected targets</span></p>"+$(this).val());
            return false;
          });
        });
    }); 

        function submitupload() {
            $("#errormsg").remove();
            // var pdbid = $('#form').find('input#id_pdbname').val() ;
            // var filename = $('input[type=file]').val().split('\\').pop();
              // if (pdbid) {
              //   $("#selection-targets").html("<p><span class='selection-heading-text'>Selected targets</span></p>PDB code: "+pdbid);
              //   document.getElementById("form").submit();
              // } else if (filename) {
              //   $("#selection-targets").html("<p><span class='selection-heading-text'>Selected targets</span></p>File: "+filename);
              //   document.getElementById("form").submit();
              // } else 
              if ($(".target-selection").length) {
                var url = window.location.href;

                if (url.substr(-1) == '/') url = url.substr(0, url.length - 2);

                url = url.split('/');
                url.pop();
                url = url.join('/')+"/tool"; // get selected value
                if (url) { // require a URL
                    window.location = url; // redirect
                }
                //toggleButtonClass('selection-button');
                return false
                //document.getElementById("form").submit();
              } else {
                $("#form").parent('div').parent('div').parent('div').after('<div id="errormsg" class="col-md-12 panel panel-primary">' +
                    '<div class="panel-body">' +
                    'Please make a selection' +
                    '</div>' +
                    '</div>');
                toggleButtonClass('selection-button');
              }
        };

    </script>
    <script src="{% static 'home/js/selection.js' %}"></script>
    <script src="{% static 'home/js/selection-autocomplete.js' %}"></script>
    <script src="{% static 'home/js/selection-filters.js' %}"></script>

{% endblock %}



{% block middle_column %}


<!--             <div class="col-md-12 panel panel-primary">
                <div class="panel-body">
                    <h4>January 2017</h4>
    <button type="button" id="cterm_button" class="btn btn-primary" onclick='$("#myModal").modal("show");'>
      New features!
    </button>
    </div>
    </div> -->

<div class="modal bd-example-modal-lg" id="myModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="myModalLabel">New Features</h4>
      </div>
      <div class="modal-body" id="ModalBody">
       <ul>
        <li>Completely redesigned interface to be more intuitive.
        <ul>
        <li>Instead of extensive drop downs each&nbsp;<em>method</em>now open in separate windows so it is easier to manage.</li>
        <li>General design improvements.</li>
        <li>Snake plot has been given more space in order to give a clearer visual representation</li>
        </ul>
        </li>
        <li>Ability to sort suggestions by either homology level or over all frequency.&nbsp;</li>
        <li>Ability to filter truncation suggestions based on Fusion Protein.</li>
        <li>Ability to use separate sources for start and end of ICL truncations.</li>
        <li>Separate underlying data by choosing whether to base truncations no active/inactive data set, and whether to have truncations for ICL regions from a dataset with or without fusion proteins.</li>
        <li>Ability to export all suggestions to excel</li>
        <li>Ability to export chosen modifications along with modified sequence (WT sequence minus truncations and with mutations inserted).</li>
        <li>Ability to import a previously generated excel sheet.
        <ul>
        <li>Useful to continue a previous design, to use same modifications on a different target, or to make modifications locally and visualise using tool.</li>
        </ul>
        </li>
        <li>Allow ICL2 truncations for class B and C.&nbsp;</li>
        <li>Do not suggestions ICL3 truncation if ICL3 is less than 9 residues.</li>
        <li>Implemented a list of mutation suggestions from various sources
        <ul>
        <li>Some are rule based (devised by David)</li>
        <li>Some are conservation based - e.g. Mutate to conserved residue in receptor structures.</li>
        <li>Some are from literature data set for thermostability.</li>
        <li>Some are from annotated structure mutations.&nbsp;</li>
        </ul>
        </li>
        <li>Ability to create custom modifications (Mutation or truncation)</li>
        <li>Dataset has been cleaned up to more correctly identify fusion proteins and sites.&nbsp;</li>
        </ul>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>


            {% if filters %}
            <div class="col-md-12 panel panel-primary">
                <div class="panel-body">
                    <h4>Filter</h4>
                    <div id="filters-species">
                    {% include 'common/selection_filters_species.html' %}
                    </div>
                    <br \>
                    <div id="filters-annotation">
                    {% include 'common/selection_filters_annotation.html' %}
                    </div>
                </div>
            </div>
            {% endif %}

            <div class="col-md-12 panel panel-primary">
                <div class="panel-body">
                    <h4>Search</h4>
                    <div>
                        <input id="selection-autocomplete" class="form-control" size="15">
                    </div>
                </div>
            </div>


<!--             <div class="col-md-12 panel panel-primary">
                <div class="panel-body">
                    <h4>Select from interactions pre-calculated</h4>
                    <div>
                    <select id='preloaded_xtals'>
                    <option>Select from list</option>
                    {% for structure in structures %}
                        <option value="{{structure.structure_ligand_pair__structure__pdb_code__index}}">{{structure.structure_ligand_pair__structure__pdb_code__index}} ({{structure.structure_ligand_pair__structure__protein_conformation__protein__parent__entry_name}}) </option>
                    {% endfor %}
                    </select>
                    </div>
                </div>
            </div>
 -->
<!--             <div class="col-md-12 panel panel-primary">
                <div class="panel-body">
                    <h4>Run a new calculation</h4>
                    <div>
                        Enter a PDB code to analyse:
                            <form action="calculate" id="form" method="post" enctype="multipart/form-data">
                        {% csrf_token %}
                            <label for="pdbname">PDB code</label>
                            {{ form.pdbname }} <br> or
                            <p>{{ form.file.label_tag }}  </p> {{ form.file }}
                        </form>
                    </div>
                </div>
            </div> -->
{% endblock %}