{% macro igv_link(chrom, start, end) -%} IGV {%- endmacro -%} {% macro igv_open_file(filename, linkname) -%} {{ linkname }} {%- endmacro -%} {% macro list_out(list) -%} {% for item in list %}{{ item }}{% if not loop.last %}, {% endif %}{% endfor%} {%- endmacro -%} {% macro list_out_bytes(list) -%} {% for item in list %}{{ item.decode() }}{% if not loop.last %}, {% endif %}{% endfor%} {%- endmacro -%} {% macro ensemble_link(gene_name) %} {{ gene_name }} {%- endmacro -%} {% macro ucsc_link(chrom, pos) %} UCSC {%- endmacro -%} {%- macro genemania_single_link(gene_name) -%} GM {%- endmacro -%} {%- macro omim_link(genes) -%} OMIM {%- endmacro -%} {%- macro exac_link(chrom, position, ref, alt) -%} ExAC (HG19) {%- endmacro -%} {%- macro genomad_link(chrom, position, ref, alt) -%} gnomAD (HG19) {%- endmacro -%} {% macro ncbi_link(chrom, pos) -%} 1000G (HG19) {%- endmacro -%} {% macro dbsnp_link(rsid) -%} {{ rsid }} {%- endmacro -%} {% macro all_link(chrom, start, ref, alt, end=None, genes=None, usehg19=False) -%} {% if ref and alt %}{% set lo_chromosome, lo_position = liftover(chrom, start, not usehg19) %}{% endif %} {% set chrom = chrom[3:] if chrom.upper().startswith("CHR") else chrom %} {% set chrom = "MT" if chrom.upper() == "M" else chrom %} {{ igv_link(chrom, start, start) if end == None else igv_link(chrom, start, end) }} {{ ucsc_link(chrom, start) }} {{ ncbi_link(lo_chromosome, lo_position) }} {% if genes %}{{ omim_link(genes) }}{% endif %} {% if lo_chromosome %}{{ exac_link(lo_chromosome, lo_position, ref, alt) }}{% endif %} {% if lo_chromosome %}{{ genomad_link(lo_chromosome, lo_position, ref, alt) }}{% endif %} {%- endmacro -%} {%- macro case_control_selection(available_samples, available_groups, healthy=True, single_row=True) -%} {% if single_row %}
{% endif %}
{% if single_row %}
{% endif %} {%- endmacro -%} {%- macro case_typ_selection(available_samples, available_chromosomes) -%}
{%- endmacro -%} {%- macro gene_selection() -%}
{%- endmacro -%} {%- macro effect_selection(effect_names, exon_effects) -%}
exonic all none
{%- endmacro -%} {%- macro add_option() -%}
{%- if "hg" in varargs -%} {{- hg_selection() -}} {%- endif -%} {%- if "heterozygosity" in varargs -%} {{- heterozygosity_selection() -}} {%- endif -%}
{%- endmacro -%} {%- macro hg_selection() -%}
{%- endmacro -%} {%- macro heterozygosity_selection() -%}
{%- endmacro -%} {%- macro contraint_selection() -%}
{%- endmacro -%} {%- macro filter_dbsnp() -%}
{%- endmacro -%}