Skip to content

Commit

Permalink
#1157 - Variant details - few minor things, eg AlphaMissense help, sh…
Browse files Browse the repository at this point in the history
…ow gnomAD version
  • Loading branch information
davmlaw committed Sep 9, 2024
1 parent 33cdc79 commit bafccdd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
27 changes: 27 additions & 0 deletions snpdb/migrations/0144_add_vgc_descriptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.15 on 2024-09-09 06:24

from django.db import migrations


def _add_vgc_descriptions(apps, _schema_editor):
VariantGridColumn = apps.get_model("snpdb", "VariantGridColumn")

VGC_DESCRIPTIONS = {
"alphamissense_rankscore": "AlphaMissense is an AI model developed by DeepMind that predicts pathogenicity of missense variants. See <a href='https://www.science.org/doi/10.1126/science.adg7492'>Paper</a>",
"mavedb_urn": "DB identifier from <a href='https://www.mavedb.org/'>MaveDB</a> - a public repository for datasets from Multiplexed Assays of Variant Effect (MAVEs), such as those generated by deep mutational scanning or massively parallel reporter assay experiments.",
"mavedb_score": "Score from <a href='https://www.mavedb.org/'>MaveDB</a> - a public repository for datasets from Multiplexed Assays of Variant Effect (MAVEs), such as those generated by deep mutational scanning or massively parallel reporter assay experiments.",
}

for pk, description in VGC_DESCRIPTIONS.items():
VariantGridColumn.objects.filter(pk=pk).update(description=description)


class Migration(migrations.Migration):

dependencies = [
('snpdb', '0143_one_off_rename_clinvar_variantgridcolumns'),
]

operations = [
migrations.RunPython(_add_vgc_descriptions, reverse_code=migrations.RunPython.noop)
]
13 changes: 8 additions & 5 deletions variantopedia/templates/variantopedia/variant_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"grantham": [57, 105],
"gerp_pp_rs": [0, 3],
//
"alphamissense_rankscore": pathogenicity_rankscore_threshold,
"cadd_raw_rankscore": pathogenicity_rankscore_threshold,
"revel_rankscore": pathogenicity_rankscore_threshold,
"bayesdel_noaf_rankscore": pathogenicity_rankscore_threshold,
Expand Down Expand Up @@ -427,6 +428,7 @@
function applyVariantValues() {
// Render variant annotation values this way so it's colored correctly etc as it
// goes through the same formatting as transcript JavaScript values if done through here
applyValue("alphamissense_rankscore", {{ variant_annotation.bayesdel_noaf_rankscore | jsonify}});
applyValue("bayesdel_noaf_rankscore", {{ variant_annotation.bayesdel_noaf_rankscore | jsonify}});
applyValue("cadd_raw_rankscore", {{ variant_annotation.cadd_raw_rankscore | jsonify}});
applyValue("clinpred_rankscore", {{ variant_annotation.clinpred_rankscore | jsonify}});
Expand Down Expand Up @@ -730,6 +732,7 @@ <h4>Tags</h4>
{% labelled id='af_uk10k' label='UK10K' help=annotation_description.af_uk10k hint="tiny" value_css="text-monospace" %}{{ variant_annotation.af_uk10k|format_unit_as_percent }}{% endlabelled %}
{% labelled id='topmed_af' label='TopMed' help=annotation_description.topmed_af hint="tiny" value_css="text-monospace" %}{{ variant_annotation.topmed_af|format_unit_as_percent }}{% endlabelled %}
{% endif %}
{% labelled label='gnomAD version' hint='tiny' %}{{ variant_annotation.version.gnomad }}{% endlabelled %}
{% if variant_annotation.gnomad_af %}
{% labelled id='gnomad_af' label='gnomAD Allele Frequency' help=annotation_description.gnomad_af hint="tiny" value_css="text-monospace" %}{{ variant_annotation.gnomad_af|format_unit_as_percent }}{% endlabelled %}
{% if variant_annotation.has_gnomad_faf %}
Expand All @@ -747,7 +750,7 @@ <h4>Tags</h4>
{% labelled label="gnomAD Is Filtered" help=annotation_description.gnomad_filtered hint="tiny" %}{% endlabelled %}
{% endif %}

{% labelled id='gnomad_total_homozygotes' label='gnomAD Total Homozygotes' help=annotation_description.gnomad_total_homozygotes hint="tiny" value_css="text-monospace" %}{{ variant_annotation.gnomad_hom_alt }}{% endlabelled %}
{% labelled id='gnomad_total_homozygotes' label='gnomAD Total Homozygotes' help=annotation_description.gnomad_hom_alt hint="tiny" value_css="text-monospace" %}{{ variant_annotation.gnomad_hom_alt }}{% endlabelled %}
{% if variant_annotation.has_extended_gnomad_fields %}
{% labelled id='gnomad_ac' label='gnomAD Alt Allele Count' help=annotation_description.gnomad_ac hint="tiny" value_css="text-monospace" %}{{ variant_annotation.gnomad_ac }}{% endlabelled %}
{% labelled id='gnomad_an' label='gnomAD Total number of alleles' help=annotation_description.gnomad_an hint="tiny" value_css="text-monospace" %}{{ variant_annotation.gnomad_an }}{% endlabelled %}
Expand Down Expand Up @@ -808,7 +811,7 @@ <h4>Tags</h4>
{% labelled id='gnomad_sas_af' label='South Asian' help=annotation_description.gnomad_sas_af hint="tiny" value_css="text-monospace" %}{{ variant_annotation.gnomad_sas_af|format_unit_as_percent }}{% endlabelled %}
</div>
{% else %}
{% labelled id='gnomad_none' label='gnomAD' hint="tiny" %}No gnomAD entry{% endlabelled %}
{% labelled id='gnomad_none' label='gnomAD' hint="tiny" help=annotation_description.gnomad %}No gnomAD entry{% endlabelled %}
{% endif %}
</div>
</div>
Expand All @@ -826,7 +829,7 @@ <h4>Tags</h4>
<span id="maxentscan_alt"></span>&nbsp;<span class="text-secondary">Alt</span>,
<span id="maxentscan_diff"></span>&nbsp;<span class="text-secondary">Diff</span>
{% endlabelled %}
{% labelled label="MexEnt %Diff/Ref" hint="tiny" %}<span id="maxentscan_percent_diff_ref" data-suffix="%"></span>{% endlabelled %}
{% labelled label="MaxEnt %Diff/Ref" help=annotation_description.maxentscan_percent_diff_ref hint="tiny" %}<span id="maxentscan_percent_diff_ref" data-suffix="%"></span>{% endlabelled %}
{% labelled id="dbscsnv_ada_score" label="dbscSNV (Ada)" help=annotation_description.dbscsnv_ada_score hint="tiny" %}{{ variant_annotation.dbscsnv_ada_score|floatformat:2 }}{% endlabelled %}
{% labelled id="dbscsnv_rf_score" label="dbscSNV (RF)" help=annotation_description.dbscsnv_rf_score hint="tiny" %}{{ variant_annotation.dbscsnv_rf_score|floatformat:2 }}{% endlabelled %}

Expand Down Expand Up @@ -875,7 +878,7 @@ <h4>Tags</h4>
{% labelled id='dbsnp_rs_id' label='dbSNP' help=annotation_description.dbsnp_rs_id hint="tiny" %}{{ variant_annotation.dbsnp_rs_id }}{% endlabelled %}
{% labelled id='ensembl_protein' label='Ensembl Protein' help=annotation_description.ensembl_protein hint="tiny" %}{% endlabelled %}
{% if variant_annotation.has_mavedb %}
{% labelled id='mave_db_url' label='MaveDB' help=annotation_description.mave_db_url hint='tiny' %}
{% labelled id='mave_db_url' label='MaveDB' help=annotation_description.mave_db hint='tiny' %}
{% with mave_urls=variant_annotation.get_mave_urls %}
{% for label, url in mave_urls.items %}
<a target="_blank" class='hover-link' href="{{ url }}">{{ label }}</a>
Expand Down Expand Up @@ -925,7 +928,7 @@ <h4>Tags</h4>
{% endfor %}
{% endlabelled %}
{% else %}
{% labelled label="Mastermind" hint="tiny" %}No local Mastermind entry<br><i>may be others on site</i>{% endlabelled %}
{% labelled label="Mastermind" hint="tiny" help=annotation_description.mastermind %}No local Mastermind entry<br><i>may be others on site</i>{% endlabelled %}
{% endif %}

</div>
Expand Down
3 changes: 3 additions & 0 deletions variantopedia/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@ def variant_details_annotation_version(request, variant_id, annotation_version_i
annotation_description = VariantGridColumn.get_column_descriptions()
annotation_description["allele"] = "An Allele is genome build independent - ie GRCh37 and GRCh38 variants for" \
" the same change are linked by an allele"
annotation_description["gnomad"] = "<a href='https://gnomad.broadinstitute.org/'>gnomAD</a> is the world's largest population frequency database"
annotation_description["mastermind"] = "Mastermind indexes medical literature for variants and genes, see <a href='https://www.genomenon.com/data'>Mastermind</a>" # Used for no results
annotation_description["mave_db"] = "<a href='https://www.mavedb.org/'>MaveDB</a> is a public repository for datasets from Multiplexed Assays of Variant Effect (MAVEs), such as those generated by deep mutational scanning or massively parallel reporter assay experiments."
annotation_description["maxentscan"] = "<a href='http://hollywood.mit.edu/burgelab/maxent/Xmaxentscan_scoreseq.html'>MaxEntScan</a> scores for human 5 prime splice sites."
annotation_description["spliceai"] = "Deep Learning splicing predictor - see <a href='https://www.sciencedirect.com/science/article/pii/S0092867418316295?via%3Dihub'>SpliceAI</a>"

Expand Down

0 comments on commit bafccdd

Please sign in to comment.