<commit_before>{% extends 'analysispage.html' %}

{% load compress %}

{% block title %}Gene Search &#187; <span>{{ gene.symbol }}{% endblock %}

{% block links %}
    Project: <a href="{% url 'project_home' project.project_id %}">{{ project }}</a>
{% endblock %}

{% block desc %}
	Project-wide search for rare variants in a single gene. 
{% endblock %}

{% block innercontent %}
    
    <div class="container">
    	<div style='width:500px;' id="select-gene-container"></div>
	
	    
        <div id="knockouts-container"></div>
        <div id="interesting-variants-container"></div>
    </div>
    <script type="text/javascript">
        var username = "{{ request.user.username }}";
        var GENE = {{ gene_json|safe }};
        var RARE_VARIANTS = {{ rare_variants_json|safe }};
        var INDIVIDUALS = {{ individuals_json|safe }};
        var KNOCKOUTS = {{ knockouts_json|safe }};
    </script>

    {% include 'javascript.html' %}

    <script type='text/javascript' src='{{ STATIC_URL }}js/gene_quicklook.js'></script>

	<script type="text/javascript">
    $(document).ready(function() {
        var select_gene_view = new SelectGeneView();
        $('#select-gene-container').html(select_gene_view.render().el);
        select_gene_view.on('gene-selected', function(gene_id) {
            window.location.href = "{% url 'project_gene_quicklook' project.project_id %}/" + gene_id;
        })
    });
    </script>
	
{% endblock %}<commit_msg>handle null values when no gene specified<commit_after>{% extends 'analysispage.html' %}

{% load compress %}

{% block title %}Gene Search &#187; <span>{{ gene.symbol }}{% endblock %}

{% block links %}
    Project: <a href="{% url 'project_home' project.project_id %}">{{ project }}</a>
{% endblock %}

{% block desc %}
	Project-wide search for rare variants in a single gene. 
{% endblock %}

{% block innercontent %}
    
    <div class="container">
    	<div style='width:500px;' id="select-gene-container"></div>
	
	    
        <div id="knockouts-container"></div>
        <div id="interesting-variants-container"></div>
    </div>
    <script type="text/javascript">
        var username = "{{ request.user.username }}";
        var GENE = {{ gene_json|default_if_none:'null'|safe}};
        var RARE_VARIANTS = {{ rare_variants_json|default_if_none:'null'|safe }};
        var INDIVIDUALS = {{ individuals_json|default_if_none:'null'|safe }};
        var KNOCKOUTS = {{ knockouts_json|default_if_none:'null'|safe }};
    </script>

    {% include 'javascript.html' %}

    <script type='text/javascript' src='{{ STATIC_URL }}js/gene_quicklook.js'></script>

	<script type="text/javascript">
    $(document).ready(function() {
        var select_gene_view = new SelectGeneView();
        $('#select-gene-container').html(select_gene_view.render().el);
        select_gene_view.on('gene-selected', function(gene_id) {
            window.location.href = "{% url 'project_gene_quicklook' project.project_id %}/" + gene_id;
        })
    });
    </script>
	
{% endblock %}
{'fraction_non_alphanumeric': 0.17528830313014826, 'fraction_numerical': 0.003953871499176277, 'mean_word_length': 3.38728323699422, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6811168', 'n_tokens_mistral': 1041, 'n_tokens_neox': 948, 'n_words': 186}