<commit_before>{# Public Data Set Filter Template #}
<div id="{{ program.id }}-data" class="tab-pane data-tab" role="tabpanel">
    <div id="{{ program.id }}-data-filter-panel" class="col-lg-3 filter-panel" role="tabpanel" {% if cohort.id %}style="display:none;"{% endif %} data-prog-id="{{ program.id }}" data-prog-displ-name="{{ program.name }}">
        <div class="tabpanel" role="tabpanel">
            <ul class="nav nav-tabs nav-tabs-filters" role="tablist">
                <li role="presentation" class="filter-tab active"><a href="#clinical-filters-{{ program.id }}" role="tab" data-toggle="tab" title="Case Filters">Case</a></li>
                <li role="presentation" class="filter-tab {% if data_types.keys|length <= 0 %}disabled{% endif %}"><a href="#data-filters-{{ program.id }}" role="tab" data-toggle="tab" title="Data Type Filters">Data</a></li>
                <li role="presentation" class="filter-tab {% if molecular_attr.keys|length <= 0 %}disabled{% endif %}"><a class="molecular-filters" href="#p-{{ program.id }}-molecular-filters" role="tab" data-toggle="tab" title="Molecular Filters">Molec.</a></li>
            </ul>
            <div class="tab-content">
                <!-- case filters tab -->
                <div role="tabpanel" class="tab-pane active" id="clinical-filters-{{ program.id }}">
                    <ul class="list-group" id="clin-accordion-{{ program.id }}" role="tablist" aria-multiselectable="true">
                        {% for attr in clin_attr|get_sorted_items %}
                            {% if attr_counts|list_contains_name:attr.name %}
                                <li class="list-group-item">
                                    <div id="{{ program.id }}-heading-{{attr.name}}" class="list-group-item__heading">
                                        <a role="button" data-toggle="collapse" data-parent="#clin-accordion-{{ program.id }}" href="#{{ program.id }}-collapse-{{ attr.name }}" aria-expanded="false" aria-controls="collapse-{{ attr.name }}">
                                            <i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i> {{ attr.displ_name }}
                                        </a>
                                    </div>

                                    <div id="{{ program.id }}-collapse-{{ attr.name }}" class="list-group-item__body collapse cohort-feature-select-block" role="tabpanel" data-feature-type="donor"
                                         aria-labelledby="{{ program.id }}-heading-{{ attr.name }}" data-feature-name="{{ attr.name }}" data-feature-displ-name="{{ attr.displ_name }}"
                                         data-feature-id="{% if attr_counts|get_named_item:attr.name|get_item:'id' %}{{ attr_counts|get_named_item:attr.name|get_item:'id' }}{% endif %}">
                                        <ul class="search-checkbox-list" id="{{ program.id }}-{{ attr.name }}">
                                            {% with attr_counts|get_named_item:attr.name|get_item:'values'|how_many_more:6 as num_more %}
                                                {% for v in attr_counts|get_named_item:attr.name|get_item:'values'|check_for_order:attr.name %}
                                                    {% if forloop.counter0 < 6 %}
                                                        <li class="checkbox">
                                                            <label title="{% if v.tooltip %}{{ v.tooltip }}{% else %} {% endif %}">
                                                                <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                                       id="{% if v.full_id %}{{ program.id }}-{{ v.full_id }}{% endif %}"
                                                                       data-value-displ-name="{% if v.displ_name %}{{ v.displ_name }}{% endif %}"
                                                                       data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                                {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name|get_readable_name:attr.name }}{% else %}{{ v.value|get_readable_name:attr.name }}{% endif %}
                                                                 <span class="count">({{ v.count }})</span>
                                                            </label>
                                                        </li>
                                                    {% elif forloop.counter0 == 6 and num_more > 0 %}
                                                        <p class="more-checks"><a class="show-more">{{ num_more }} more</a><span class="checks"><a class="check-all">Check All</a> / <a class="uncheck-all">Uncheck All</a></span></p>
                                                        <li class="extra-values checkbox" style="display:none;">
                                                            <label title="{% if v.tooltip %}{{ v.tooltip }}{% else %} {% endif %}">
                                                                <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                                       id="{% if v.full_id %}{{ program.id }}-{{ v.full_id }}{% endif %}"
                                                                       data-value-displ-name="{% if v.displ_name %}{{ v.displ_name }}{% endif %}"
                                                                       data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                                {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name|get_readable_name:attr.name }}{% else %}{{ v.value|get_readable_name:attr.name }}{% endif %}
                                                                 <span class="count">({{ v.count }})</span>
                                                            </label>
                                                        </li>
                                                    {% else %}
                                                        <li class="extra-values checkbox" style="display:none;">
                                                            <label title="{% if v.tooltip %}{{ v.tooltip }}{% else %} {% endif %}">
                                                                <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                                       id="{% if v.full_id %}{{ program.id }}-{{ v.full_id }}{% endif %}"
                                                                       data-value-displ-name="{% if v.displ_name %}{{ v.displ_name }}{% endif %}"
                                                                       data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                                {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name|get_readable_name:attr.name }}{% else %}{{ v.value|get_readable_name:attr.name }}{% endif %}
                                                                 <span class="count">({{ v.count }})</span>
                                                            </label>
                                                        </li>
                                                    {% endif %}
                                                {% endfor %}
                                                {% if num_more > 0 %}
                                                    <p class="less-checks" style="display: none;"><a class="show-less">less</a><span class="checks"><a class="check-all">Check All</a> / <a class="uncheck-all">Uncheck All</a></span></p>
                                                {% endif %}
                                            {% endwith %}
                                        </ul>
                                    </div>
                                </li>
                            {% endif %}
                        {% endfor %}
                    </ul>
                </div>
{#              <!-- data filters tab -->#}
                <div role="tabpanel" class="tab-pane" id="data-filters-{{ program.id }}">
                    <ul class="list-group" id="data-type-accordion" role="tablist" aria-multiselectable="true">
                        {% for attr in data_types|get_sorted_items %}
                            <li class="list-group-item">
                                <div class="list-group-item__heading" role="tab" id="{{ program.id }}-heading-{{ attr.name }}">
                                    <a role="button" data-toggle="collapse" data-parent="#data-type-accordion" href="#{{ program.id }}-collapse-{{ attr.name }}"
                                       aria-expanded="false" aria-controls="collapse-{{ attr.name }}" {% if 'mRNA' in attr.name or 'miRNA' in attr.name %}style="text-transform:none!important"{% endif %}>
                                        <i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i> {{ attr.displ_name|check_special_casing }}
                                    </a>
                                </div>
                                <div id="{{ program.id }}-collapse-{{ attr.name }}" class="list-group-item__body collapse cohort-feature-select-block" role="tabpanel"
                                     aria-labelledby="{{ program.id }}-heading-{{ attr.name }}" data-feature-name="{{ attr.name }}" data-feature-displ-name="{{ attr.displ_name }}"
                                     data-feature-type="datatype" data-feature-id="data_type">
                                    <ul class="search-checkbox-list" id="{{ program.id }}-{{ attr.name }}">
                                        {% if data_type_counts|list_contains_name:attr.name %}
                                            {% for v in data_type_counts|get_named_item:attr.name|get_item:'values' %}
                                                <li class="checkbox">
                                                    <label>
                                                        <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                               data-value-displ-name="{% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name }}{% else %}{{ v.value }}{% endif %}"
                                                               data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                         {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name }}{% else %}{{ v.value }}{% endif %} <span class="count">({{ v.count }})</span>
                                                    </label>
                                                </li>
                                            {% endfor %}
                                        {% endif %}
                                    </ul>
                                </div>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
{#                <!-- molecular filters tab -->#}<commit_msg>-> Don't display a case/data category if there are no entries for it (mostly relevant to extant cohorts which might cause certain data types to drop out)<commit_after>{# Public Data Set Filter Template #}
<div id="{{ program.id }}-data" class="tab-pane data-tab" role="tabpanel">
    <div id="{{ program.id }}-data-filter-panel" class="col-lg-3 filter-panel" role="tabpanel" {% if cohort.id %}style="display:none;"{% endif %} data-prog-id="{{ program.id }}" data-prog-displ-name="{{ program.name }}">
        <div class="tabpanel" role="tabpanel">
            <ul class="nav nav-tabs nav-tabs-filters" role="tablist">
                <li role="presentation" class="filter-tab active"><a href="#clinical-filters-{{ program.id }}" role="tab" data-toggle="tab" title="Case Filters">Case</a></li>
                <li role="presentation" class="filter-tab {% if data_types.keys|length <= 0 %}disabled{% endif %}"><a href="#data-filters-{{ program.id }}" role="tab" data-toggle="tab" title="Data Type Filters">Data</a></li>
                <li role="presentation" class="filter-tab {% if molecular_attr.keys|length <= 0 %}disabled{% endif %}"><a class="molecular-filters" href="#p-{{ program.id }}-molecular-filters" role="tab" data-toggle="tab" title="Molecular Filters">Molec.</a></li>
            </ul>
            <div class="tab-content">
                <!-- case filters tab -->
                <div role="tabpanel" class="tab-pane active" id="clinical-filters-{{ program.id }}">
                    <ul class="list-group" id="clin-accordion-{{ program.id }}" role="tablist" aria-multiselectable="true">
                        {% for attr in clin_attr|get_sorted_items %}
                            {% if attr_counts|list_contains_name:attr.name %}
                                <li class="list-group-item">
                                    <div id="{{ program.id }}-heading-{{attr.name}}" class="list-group-item__heading">
                                        <a role="button" data-toggle="collapse" data-parent="#clin-accordion-{{ program.id }}" href="#{{ program.id }}-collapse-{{ attr.name }}" aria-expanded="false" aria-controls="collapse-{{ attr.name }}">
                                            <i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i> {{ attr.displ_name }}
                                        </a>
                                    </div>

                                    <div id="{{ program.id }}-collapse-{{ attr.name }}" class="list-group-item__body collapse cohort-feature-select-block" role="tabpanel" data-feature-type="donor"
                                         aria-labelledby="{{ program.id }}-heading-{{ attr.name }}" data-feature-name="{{ attr.name }}" data-feature-displ-name="{{ attr.displ_name }}"
                                         data-feature-id="{% if attr_counts|get_named_item:attr.name|get_item:'id' %}{{ attr_counts|get_named_item:attr.name|get_item:'id' }}{% endif %}">
                                        <ul class="search-checkbox-list" id="{{ program.id }}-{{ attr.name }}">
                                            {% with attr_counts|get_named_item:attr.name|get_item:'values'|how_many_more:6 as num_more %}
                                                {% for v in attr_counts|get_named_item:attr.name|get_item:'values'|check_for_order:attr.name %}
                                                    {% if forloop.counter0 < 6 %}
                                                        <li class="checkbox">
                                                            <label title="{% if v.tooltip %}{{ v.tooltip }}{% else %} {% endif %}">
                                                                <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                                       id="{% if v.full_id %}{{ program.id }}-{{ v.full_id }}{% endif %}"
                                                                       data-value-displ-name="{% if v.displ_name %}{{ v.displ_name }}{% endif %}"
                                                                       data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                                {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name|get_readable_name:attr.name }}{% else %}{{ v.value|get_readable_name:attr.name }}{% endif %}
                                                                 <span class="count">({{ v.count }})</span>
                                                            </label>
                                                        </li>
                                                    {% elif forloop.counter0 == 6 and num_more > 0 %}
                                                        <p class="more-checks"><a class="show-more">{{ num_more }} more</a><span class="checks"><a class="check-all">Check All</a> / <a class="uncheck-all">Uncheck All</a></span></p>
                                                        <li class="extra-values checkbox" style="display:none;">
                                                            <label title="{% if v.tooltip %}{{ v.tooltip }}{% else %} {% endif %}">
                                                                <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                                       id="{% if v.full_id %}{{ program.id }}-{{ v.full_id }}{% endif %}"
                                                                       data-value-displ-name="{% if v.displ_name %}{{ v.displ_name }}{% endif %}"
                                                                       data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                                {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name|get_readable_name:attr.name }}{% else %}{{ v.value|get_readable_name:attr.name }}{% endif %}
                                                                 <span class="count">({{ v.count }})</span>
                                                            </label>
                                                        </li>
                                                    {% else %}
                                                        <li class="extra-values checkbox" style="display:none;">
                                                            <label title="{% if v.tooltip %}{{ v.tooltip }}{% else %} {% endif %}">
                                                                <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                                       id="{% if v.full_id %}{{ program.id }}-{{ v.full_id }}{% endif %}"
                                                                       data-value-displ-name="{% if v.displ_name %}{{ v.displ_name }}{% endif %}"
                                                                       data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                                {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name|get_readable_name:attr.name }}{% else %}{{ v.value|get_readable_name:attr.name }}{% endif %}
                                                                 <span class="count">({{ v.count }})</span>
                                                            </label>
                                                        </li>
                                                    {% endif %}
                                                {% endfor %}
                                                {% if num_more > 0 %}
                                                    <p class="less-checks" style="display: none;"><a class="show-less">less</a><span class="checks"><a class="check-all">Check All</a> / <a class="uncheck-all">Uncheck All</a></span></p>
                                                {% endif %}
                                            {% endwith %}
                                        </ul>
                                    </div>
                                </li>
                            {% endif %}
                        {% endfor %}
                    </ul>
                </div>
{#              <!-- data filters tab -->#}
                <div role="tabpanel" class="tab-pane" id="data-filters-{{ program.id }}">
                    <ul class="list-group" id="data-type-accordion" role="tablist" aria-multiselectable="true">
                        {% for attr in data_types|get_sorted_items %}
                            {% if data_type_counts|list_contains_name:attr.name %}
                                <li class="list-group-item">
                                <div class="list-group-item__heading" role="tab" id="{{ program.id }}-heading-{{ attr.name }}">
                                    <a role="button" data-toggle="collapse" data-parent="#data-type-accordion" href="#{{ program.id }}-collapse-{{ attr.name }}"
                                       aria-expanded="false" aria-controls="collapse-{{ attr.name }}" {% if 'mRNA' in attr.name or 'miRNA' in attr.name %}style="text-transform:none!important"{% endif %}>
                                        <i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i> {{ attr.displ_name|check_special_casing }}
                                    </a>
                                </div>
                                <div id="{{ program.id }}-collapse-{{ attr.name }}" class="list-group-item__body collapse cohort-feature-select-block" role="tabpanel"
                                     aria-labelledby="{{ program.id }}-heading-{{ attr.name }}" data-feature-name="{{ attr.name }}" data-feature-displ-name="{{ attr.displ_name }}"
                                     data-feature-type="datatype" data-feature-id="data_type">
                                    <ul class="search-checkbox-list" id="{{ program.id }}-{{ attr.name }}">
                                        {% for v in data_type_counts|get_named_item:attr.name|get_item:'values' %}
                                            <li class="checkbox">
                                                <label>
                                                    <input type="checkbox" name="elements-selected" data-value-name="{{ v.value }}"
                                                           data-value-displ-name="{% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name }}{% else %}{{ v.value }}{% endif %}"
                                                           data-value-id="{% if v.id %}{{ v.id }}{% elif v.name %}{{ v.name }}{% else %}{{ v.value }}{% endif %}">
                                                     {% if v.value == 'None' %}NA{% elif v.displ_name %}{{ v.displ_name }}{% else %}{{ v.value }}{% endif %} <span class="count">({{ v.count }})</span>
                                                </label>
                                            </li>
                                        {% endfor %}
                                    </ul>
                                </div>
                            </li>
                            {% endif %}
                        {% endfor %}
                    </ul>
                </div>
{#                <!-- molecular filters tab -->#}
{'fraction_non_alphanumeric': 0.1554980595084088, 'fraction_numerical': 0.0008624407072013799, 'mean_word_length': 1.0760003580700026, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 218, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 287, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '348217', 'n_tokens_mistral': 5708, 'n_tokens_neox': 5273, 'n_words': 1046}