Commit 10a607a3 authored by Mikaël Salson's avatar Mikaël Salson

browser/js: Add to AssignSubsets button

This is not be working because of a referer check that prevents from
properly testing the button. In devel-mode for now.
See vdj#893, #3917
parent 7f137333
Pipeline #95251 passed with stages
in 7 minutes and 11 seconds
......@@ -419,6 +419,34 @@ function blastPost(species, data, system) {
}
function assignSubsetsPost(species, data, system) {
if (system != "IGH") {
console.log({"type": "flash",
"msg": "Subsets are only defined for IGH sequences. Thus you cannot launch it on other sequences",
"priority": 1});
} else {
var form = document.getElementById("form");
form.removeAllChildren();
// form.target = "_blank";
form.enctype = 'multipart/form-data';
form.name = 'assignsubsets';
form.action = "http://tools.bat.infspire.org/cgi-bin/arrest/assignsubsets_html.pl";
form.method = "POST";
var formData = {};
formData.fastatext = data;
formData.elite = null;
for (var k in formData) {
var input = document.createElement("input");
input.type = "hidden";
input.name = k;
if (formData[k] != null)
input.value = formData[k];
form.appendChild(input);
}
form.submit();
}
}
/**
* Creates and returns a sendTo button (in a span)
* @param {id}: id of the span
......
......@@ -224,6 +224,12 @@ Segment.prototype = {
'Send sequences to Ensembl Blast and see the results in a new tab', this);
div_menu.appendChild(span);
// to AssignSubset
span = createSendToButton("toAssignSubsets", "assignSubsets", "❯ to AssignSubsets",
"Send sequences to ARResT/AssignSubsets to classify IGH sequence in a CLL subset", this);
span.className += " devel-mode";
div_menu.appendChild(span);
//toClipBoard button
span = document.createElement('span');
span.id = "toClipBoard";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment