679ee3ed1c4d6f8ff2e2d4fdd7d72b83117c7c49
hiram
Sun Jan 18 22:12:13 2026 -0800
provide links to browsers as well as lift over chain.gz files refs #31811
diff --git src/hg/js/liftRequest.js src/hg/js/liftRequest.js
index de14abd2141..4ed186feff4 100644
--- src/hg/js/liftRequest.js
+++ src/hg/js/liftRequest.js
@@ -36,37 +36,55 @@
liftPath += asm1;
}
liftPath += "/liftOver/" + asm1 + "To";
liftPath += asm2.charAt(0).toUpperCase() + asm2.slice(1);
liftPath += ".over.chain.gz";
return(liftPath);
}
function checkAssemblyCompatibility(asm1, asm2) {
$.ajax({
url: "/cgi-bin/hubApi/liftOver/listExisting?fromGenome=" + encodeURIComponent(asm1) +
";" + "toGenome=" + encodeURIComponent(asm2),
success: function(response) {
console.log(JSON.stringify(response, null, 2));
if (response.itemsReturned === 1) {
- var liftPath = liftOverPath(asm1, asm2);
- fileExists(liftPath, function(exists) {
+ var liftPath1 = liftOverPath(asm1, asm2);
+ var liftPath2 = liftOverPath(asm2, asm1);
+ var browser1 = "/cgi-bin/hgTracks?db=" + asm1;
+ var browser2 = "/cgi-bin/hgTracks?db=" + asm2
+ fileExists(liftPath1, function(exists) {
if (exists) {
+ document.getElementById("genome1Link").href = browser1;
+ document.getElementById("genome1Link").textContent = assembly1Value;
+
+ document.getElementById("genome1LiftOver").href = liftPath1;
+ document.getElementById("genome1LiftOver").textContent = asm1 + " to " + asm2;
+
+ // Make visible
+ document.getElementById("liftExists").style.display = "block";
+ }
+ });
+ fileExists(liftPath2, function(exists) {
+ if (exists) {
+ document.getElementById("genome2Link").href = browser2;
+ document.getElementById("genome2Link").textContent = assembly2Value;
+
+ document.getElementById("genome2LiftOver").href = liftPath2;
+ document.getElementById("genome2LiftOver").textContent = asm2 + " to " + asm1;
+ // Make visible
document.getElementById("liftExists").style.display = "block";
- var liftMessage = 'An alignment already exists between these assemblies.
' +
- 'Click here to download the chain file';
- document.getElementById("liftPath").innerHTML = liftMessage;
}
});
}
}
});
}
function checkBothAssembliesSelected() {
if (genome1 && genome2) { // Both assemblies are now selected
checkAssemblyCompatibility(genome1, genome2);
}
}
function assembly1Select(selectEle, item) {
selectEle.innerHTML = item.label;