ae63ce55185746c5fabb2ead8cc20215faada36d max Mon Nov 3 08:03:14 2025 -0800 adding ancient dna track, refs #36592 diff --git src/hg/js/utils.js src/hg/js/utils.js index 769325d0c30..422e91d6ede 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1,28 +1,29 @@ // Utility JavaScript // "use strict"; // Don't complain about line break before '||' etc: /* jshint -W014 */ /* jshint -W087 */ /* jshint esnext: true */ var debug = false; /* Support these formats for range specifiers. Note the ()'s around chrom, * start and end portions for substring retrieval: */ +// \s = whitespace, \w = azAZ0-9_, var canonicalRangeExp = /^[\s]*([\w._#-]+)[\s]*:[\s]*([-0-9,]+)[\s]*[-_][\s]*([0-9,]+)[\s]*$/; var gbrowserRangeExp = /^[\s]*([\w._#-]+)[\s]*:[\s]*([0-9,]+)[\s]*\.\.[\s]*([0-9,]+)[\s]*$/; var lengthRangeExp = /^[\s]*([\w._#-]+)[\s]*:[\s]*([0-9,]+)[\s]*\+[\s]*([0-9,]+)[\s]*$/; var bedRangeExp = /^[\s]*([\w._#-]+)[\s]+([0-9,]+)[\s]+([0-9,]+)[\s]*$/; var sqlRangeExp = /^[\s]*([\w._#-]+)[\s]*\|[\s]*([0-9,]+)[\s]*\|[\s]*([0-9,]+)[\s]*$/; var singleBaseExp = /^[\s]*([\w._#-]+)[\s]*:[\s]*([0-9,]+)[\s]*$/; // also allow gnomad variants, ex: 12-1234-A-C var gnomadVarExp = "^(([0-9]+)|(X|Y|M|MT))-([0-9]+)-([A-Za-z]+)-([A-Za-z]+)$"; // allow gnomad ranges, ex: 12-1234-11223344 var gnomadRangeExp = "^(([0-9]+)|(X|Y|M|MT))-([0-9]+)-([0-9]+)$"; function copyToClipboard(ev) { /* copy a piece of text to clipboard. event.target is some DIV or SVG that is an icon. * The attribute data-target of this element is the ID of the element that contains the text to copy.