<commit_before>{% extends "layout.html" %}
{% from "utils.html" import comments_panel, pedigree_panel %}

{% block title %}
  {{ super() }} - {{ institute.display_name }} - {{ case.display_name }} - {{ variant.display_name }}
{% endblock %}

{% block top_nav %}
  <li>
    <a href="{{ url_for('cases.cases', institute_id=institute._id) }}">
      {{ institute.display_name }}
    </a>
  </li>
  <li>
    <a href="{{ url_for('cases.case', institute_id=institute._id, case_name=case.display_name) }}">
      {{ case.display_name }}
    </a>
  </li>
  <li>
    <a href="{{ url_for('variants.sv_variants', institute_id=institute._id, case_name=case.display_name, variant_type=variant.variant_type) }}">
      {{ variant.variant_type|capitalize }} structural variants
    </a>
  </li>
  <li class="active">
    <p class="navbar-text">{{ variant.display_name|truncate(20, True) }}</p>
  </li>
{% endblock %}

{% block top_nav_right %}
  <li>{{ pin_button() }}</li>
  <li>{{ causative_button() }}</li>
  {{ super() }}
{% endblock %}

{% block content_main %}
  {% if variant.missing_data %}
    <div class="alert alert-warning">Showing only first 30 genes!</div>
  {% endif %}

  <div class="row">
    <div class="col-md-6">
      <ul class="list-group">
        <li class="list-group-item">Rank <span class="badge">{{ variant.variant_rank }}</span></li>

        <li class="list-group-item">
          Rank score
          <span class="badge">{{ variant.rank_score }}</span>
        </li>

        <li class="list-group-item">
          Category
          <span class="badge">{{ variant.sub_category|upper }}</span>
        </li>

        <li class="list-group-item">
          Gene panels
          <ul class="list-inline pull-right">
            {% for panel_id in variant.panels %}
              <li>
                <a href="{{ url_for('panels.panel', panel_id=panel_id) }}">{{ panel_id }}</a>
              </li>
            {% endfor %}
          </ul>
        </li>

        <li class="list-group-item">
	        <div>
	          <form action="{{ url_for('variants.variant_update', institute_id=institute._id, case_name=case.display_name, variant_id=variant._id) }}" method="POST">
              <label>Variant tag</label>
              <div class="row">
		            <div class="col-xs-8">
		              <select name="manual_rank" class="form-control">
		                <option>Select a tag</option>
		                {% for rank, data in manual_rank_options.items() %}
                      <option {% if rank == variant.manual_rank %} selected {% endif %} value="{{ rank }}">
                        {{ data.label }}
                      </option>
		                {% endfor %}
		              </select>
		            </div>
		            <div class="col-xs-4">
		              <button type="submit" class="btn btn-default form-control">Save</button>
		            </div>
              </div>
	          </form>
	        </div>
	      </li>

        <li class="list-group-item">
	        <div>
	          <form action="{{ url_for('variants.variant_update', institute_id=institute._id, case_name=case.display_name, variant_id=variant._id) }}" method="POST">
              <label>Dismiss variant</label>
              <div class="row">
		            <div class="col-xs-8">
		              <select multiple name="dismiss_variant" class="form-control">
		                <option>Select a tag</option>
                    {% for rank, data in dismiss_variant_options.items() %}
                      <option {% if rank~"" in variant.dismiss_variant %} selected {% endif %} value="{{ rank }}">
                        {{ data.label }}
                      </option>
                    {% endfor %}
		              </select>
		            </div>
		            <div class="col-xs-4">
		              <button type="submit" class="btn btn-default form-control">Save</button>
		            </div>
              </div>
	          </form>
	        </div>
	      </li>
      </ul>
    </div>
    <div class="col-md-6">
      <ul class="list-group">
        <li class="list-group-item">
          Position
          <div class="pull-right">
            {{ variant.chromosome }}:{{ variant.position }}-{{ variant.end }}
            {% if variant.chromosome == "MT" and case.mt_bams %}
              - Alignments:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.mt_bams, bai=case.mt_bais, vcf=case.region_vcf_file, sample=case.sample_names, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50)) }}" target="_blank">Pileup viewer</a><br>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', sample=case.sample_names, build=case.genome_build, bam=case.mt_bams, bai=case.mt_bais, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50)) }}" target="_blank">IGV viewer (BETA)</a>
            {% elif case.bam_files %}
              - Alignments:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50), vcf=case.vcf_files.vcf_sv) }}" target="_blank">Pileup</a>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, build=case.genome_build, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50)) }}" target="_blank">IGV (BETA)</a>
            {% else %}
              - BAM file(s) missing
            {% endif %}
          </div>
        </li>
	      <li class="list-group-item">
	        Cytoband
          <div class="pull-right">
            {% if variant.chromosome == variant.end_chrom and variant.cytoband_start == variant.cytoband_end %}
              {{ variant.chromosome }}{{ variant.cytoband_start }}
            {% elif variant.chromosome == variant.end_chrom %}
              {{ variant.chromosome }}{{ variant.cytoband_start }}{{ variant.cytoband_end }}
            {% else %}
              {{ variant.chromosome }}{{ variant.cytoband_start }}-{{variant.end_chrom}}{{ variant.cytoband_end }}
            {% endif %}
          </div>
	      </li>
	      <li class="list-group-item">
	        Length <div class="pull-right">{{ variant.length }}</div>
	      </li>
	      <li class="list-group-item">
	        Type <div class="pull-right">{{ variant.sub_category|upper }}</div>
	      </li><commit_msg>showing breakpoint alignments for SVs with +-500 bp<commit_after>{% extends "layout.html" %}
{% from "utils.html" import comments_panel, pedigree_panel %}

{% block title %}
  {{ super() }} - {{ institute.display_name }} - {{ case.display_name }} - {{ variant.display_name }}
{% endblock %}

{% block top_nav %}
  <li>
    <a href="{{ url_for('cases.cases', institute_id=institute._id) }}">
      {{ institute.display_name }}
    </a>
  </li>
  <li>
    <a href="{{ url_for('cases.case', institute_id=institute._id, case_name=case.display_name) }}">
      {{ case.display_name }}
    </a>
  </li>
  <li>
    <a href="{{ url_for('variants.sv_variants', institute_id=institute._id, case_name=case.display_name, variant_type=variant.variant_type) }}">
      {{ variant.variant_type|capitalize }} structural variants
    </a>
  </li>
  <li class="active">
    <p class="navbar-text">{{ variant.display_name|truncate(20, True) }}</p>
  </li>
{% endblock %}

{% block top_nav_right %}
  <li>{{ pin_button() }}</li>
  <li>{{ causative_button() }}</li>
  {{ super() }}
{% endblock %}

{% block content_main %}
  {% if variant.missing_data %}
    <div class="alert alert-warning">Showing only first 30 genes!</div>
  {% endif %}

  <div class="row">
    <div class="col-md-6">
      <ul class="list-group">
        <li class="list-group-item">Rank <span class="badge">{{ variant.variant_rank }}</span></li>

        <li class="list-group-item">
          Rank score
          <span class="badge">{{ variant.rank_score }}</span>
        </li>

        <li class="list-group-item">
          Category
          <span class="badge">{{ variant.sub_category|upper }}</span>
        </li>

        <li class="list-group-item">
          Gene panels
          <ul class="list-inline pull-right">
            {% for panel_id in variant.panels %}
              <li>
                <a href="{{ url_for('panels.panel', panel_id=panel_id) }}">{{ panel_id }}</a>
              </li>
            {% endfor %}
          </ul>
        </li>

        <li class="list-group-item">
	        <div>
	          <form action="{{ url_for('variants.variant_update', institute_id=institute._id, case_name=case.display_name, variant_id=variant._id) }}" method="POST">
              <label>Variant tag</label>
              <div class="row">
		            <div class="col-xs-8">
		              <select name="manual_rank" class="form-control">
		                <option>Select a tag</option>
		                {% for rank, data in manual_rank_options.items() %}
                      <option {% if rank == variant.manual_rank %} selected {% endif %} value="{{ rank }}">
                        {{ data.label }}
                      </option>
		                {% endfor %}
		              </select>
		            </div>
		            <div class="col-xs-4">
		              <button type="submit" class="btn btn-default form-control">Save</button>
		            </div>
              </div>
	          </form>
	        </div>
	      </li>

        <li class="list-group-item">
	        <div>
	          <form action="{{ url_for('variants.variant_update', institute_id=institute._id, case_name=case.display_name, variant_id=variant._id) }}" method="POST">
              <label>Dismiss variant</label>
              <div class="row">
		            <div class="col-xs-8">
		              <select multiple name="dismiss_variant" class="form-control">
		                <option>Select a tag</option>
                    {% for rank, data in dismiss_variant_options.items() %}
                      <option {% if rank~"" in variant.dismiss_variant %} selected {% endif %} value="{{ rank }}">
                        {{ data.label }}
                      </option>
                    {% endfor %}
		              </select>
		            </div>
		            <div class="col-xs-4">
		              <button type="submit" class="btn btn-default form-control">Save</button>
		            </div>
              </div>
	          </form>
	        </div>
	      </li>
      </ul>
    </div>
    <div class="col-md-6">
      <ul class="list-group">
        <li class="list-group-item">
          Position
          <div class="pull-right">
            {{ variant.chromosome }}:{{ variant.position }}-{{ variant.end }}
            {% if variant.chromosome == "MT" and case.mt_bams %}
              - Alignment:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.mt_bams, bai=case.mt_bais, vcf=case.region_vcf_file, sample=case.sample_names, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50)) }}" target="_blank">Pileup viewer</a><br>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', sample=case.sample_names, build=case.genome_build, bam=case.mt_bams, bai=case.mt_bais, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50)) }}" target="_blank">IGV viewer (BETA)</a>
            {% elif case.bam_files %}
              - Alignment:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50), vcf=case.vcf_files.vcf_sv) }}" target="_blank">Pileup</a>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, build=case.genome_build, contig=variant.chromosome, start=(variant.position - 50), stop=(variant.end + 50)) }}" target="_blank">IGV (BETA)</a>
            {% else %}
              - BAM file(s) missing
            {% endif %}
          </div>
        </li>
        <li class="list-group-item">
          Left breakpoint
          <div class="pull-right">
            {{ variant.chromosome }}:{{ variant.position }}
            {% if variant.chromosome == "MT" and case.mt_bams %}
              - Alignment:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.mt_bams, bai=case.mt_bais, vcf=case.region_vcf_file, sample=case.sample_names, contig=variant.chromosome, start=(variant.position - 500), stop=(variant.position + 500)) }}" target="_blank">Pileup viewer</a><br>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', sample=case.sample_names, build=case.genome_build, bam=case.mt_bams, bai=case.mt_bais, contig=variant.chromosome, start=(variant.position - 500), stop=(variant.position + 500)) }}" target="_blank">IGV viewer (BETA)</a>
            {% elif case.bam_files %}
              - Alignment:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, contig=variant.chromosome, start=(variant.position - 500), stop=(variant.position + 500), vcf=case.vcf_files.vcf_sv) }}" target="_blank">Pileup</a>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, build=case.genome_build, contig=variant.chromosome, start=(variant.position - 500), stop=(variant.position + 500)) }}" target="_blank">IGV (BETA)</a>
            {% else %}
              - BAM file(s) missing
            {% endif %}
          </div>
        </li>
        <li class="list-group-item">
          Right breakpoint
          <div class="pull-right">
            {{ variant.chromosome }}:{{ variant.end }}
            {% if variant.chromosome == "MT" and case.mt_bams %}
              - Alignment:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.mt_bams, bai=case.mt_bais, vcf=case.region_vcf_file, sample=case.sample_names, contig=variant.chromosome, start=(variant.end - 500), stop=(variant.end + 500)) }}" target="_blank">Pileup viewer</a><br>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', sample=case.sample_names, build=case.genome_build, bam=case.mt_bams, bai=case.mt_bais, contig=variant.chromosome, start=(variant.end - 500), stop=(variant.end + 500)) }}" target="_blank">IGV viewer (BETA)</a>
            {% elif case.bam_files %}
              - Alignment:
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.pileup', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, contig=variant.chromosome, start=(variant.end - 500), stop=(variant.end + 500), vcf=case.vcf_files.vcf_sv) }}" target="_blank">Pileup</a>
              <a class="btn btn-default btn-sm" href="{{ url_for('alignviewers.igv', bam=case.bam_files, bai=case.bai_files, sample=case.sample_names, build=case.genome_build, contig=variant.chromosome, start=(variant.end - 500), stop=(variant.end + 500)) }}" target="_blank">IGV (BETA)</a>
            {% else %}
              - BAM file(s) missing
            {% endif %}
          </div>
        </li>
	      <li class="list-group-item">
	        Cytoband
          <div class="pull-right">
            {% if variant.chromosome == variant.end_chrom and variant.cytoband_start == variant.cytoband_end %}
              {{ variant.chromosome }}{{ variant.cytoband_start }}
            {% elif variant.chromosome == variant.end_chrom %}
              {{ variant.chromosome }}{{ variant.cytoband_start }}{{ variant.cytoband_end }}
            {% else %}
              {{ variant.chromosome }}{{ variant.cytoband_start }}-{{variant.end_chrom}}{{ variant.cytoband_end }}
            {% endif %}
          </div>
	      </li>
	      <li class="list-group-item">
	        Length <div class="pull-right">{{ variant.length }}</div>
	      </li>
	      <li class="list-group-item">
	        Type <div class="pull-right">{{ variant.sub_category|upper }}</div>
	      </li>
{'fraction_non_alphanumeric': 0.17116676847892487, 'fraction_numerical': 0.006291997556505803, 'mean_word_length': 2.3389761370589435, 'pattern_counts': {'":': 0, '<': 265, '<?xml version=': 0, '>': 265, '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': '16553', 'n_tokens_mistral': 5538, 'n_tokens_neox': 5007, 'n_words': 940}