205d43b94283eb56c77a64f5e86e2a77295ab750 angie Mon Mar 12 10:38:40 2018 -0700 hgVai: Add options for HGVS output from Gencode Basic/Comp tracks (not just RefSeq). Use variantProjector instead of gpFx to do predictions for genePreds by converting to PSL+CDS. refs #21142 The use of variantProjector resulted in significant changes to hg/lib/tests results: pgSnpKgDbToGpFx.txt: right-shifting, 'Z' -> '*' vepIndelTrimOut.txt: * right-shifting * per-allele consequences even for variants where allele doesn't affect consequence e.g. intron... this is a drawback, would be good to filter these after the fact to reduce to a single consequence * right-shifting intron -> splice_region for gene LSP1 * right-shifting coding_sequence_variant into just 3_prime_UTR_variant for ORJ81 * recognition of genome missing a base for EI24 (so insC restores frame and restores missing codon from genome-compensating transcripts) * exon numbers changing due to not counting too-short introns diff --git src/hg/js/hgVai.js src/hg/js/hgVai.js index 7e5eb80..1bd6d97 100644 --- src/hg/js/hgVai.js +++ src/hg/js/hgVai.js @@ -30,44 +30,46 @@ $('#hgvsPasteContainer').show().focus(); } setCartVar("hgva_variantTrack", newVal); }, changeGeneSource: function() { // Every time the user changes the gene prediction track, see if any // HGVS or transcript status options can be shown for the new track. var newVal = $("select#hgva_geneTrack").val(); var isRefSeq = (newVal === 'refGene' || newVal.match(/^ncbiRefSeq/)) ? true : false; // Look for a div with classes txStatus and the name of the new gene track -- // if the new gene track is GENCODE, strip it down to only the version at end. var matchesGencode = newVal.match(/^wgEncodeGencode(Basic|Comp|PseudoGene)(V[A-Z]?[0-9]+)$/); var geneClass = matchesGencode ? matchesGencode[2] : newVal; + var canDoHgvs = (isRefSeq || + !!newVal.match(/wgEncodeGencode(Basic|Comp)(V[A-Z]?[0-9]+)$/)); var visibleCount = 0; var $txStatusDivs = $("div.txStatus"); $txStatusDivs.each(function(n, div) { var $div = $(div); var hasGeneClass = $div.hasClass(geneClass); // Set visibility according to whether the class list includes geneClass: $div.toggle(hasGeneClass); if (hasGeneClass) { visibleCount++; } }); $("div.noTxStatus").toggle(visibleCount === 0); - $("div#hgvsOptions").toggle(isRefSeq); - $("div#noHgvs").toggle(!isRefSeq); + $("div#hgvsOptions").toggle(canDoHgvs); + $("div#noHgvs").toggle(!canDoHgvs); }, goToAddCustomTrack: function() { var $ctForm = $('#customTrackForm'); $ctForm.append(''); $ctForm.submit(); return false; }, submitQuery: function() { // Show loading image and message -- unless downloading to a file if (! $('#hgva_outFile').val()) { loadingImage.run();