Commit 59cf5735 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud

IMGTSegmenter: Give the possibility to call several times imgtPostForSegmenter

* The options can be overriden usig the option override_imgt_options.
* The results are overwritten in m.clones[].seg.imgt
* We now launch IMGT Post twice: 1. With nt-sequence 2. With summary (% id in V gene)
parent 2edd0615
......@@ -125,8 +125,11 @@ function imgtPost(data, system) {
* @param data
* @param system
*/
function imgtPostForSegmenter(data, system) {
function imgtPostForSegmenter(data, system, override_imgt_options) {
var imgtInput = initImgtInput();
if (typeof override_imgt_options != 'undefined') {
append_to_object(override_imgt_options, imgtInput)
}
var imgt4segButton= document.getElementById("toIMGTSeg");
//limit #request to #
var pos, nb = 1;
......@@ -206,7 +209,9 @@ function imgtPostForSegmenter(data, system) {
logmsg += cloneIdx + ",";
//remove unneeded info coz relative to # of selected items
delete imgtArray[i]["Sequence number"];
m.clones[cloneIdx].seg.imgt = imgtArray[i];
if (typeof m.clones[cloneIdx].seg.imgt == 'undefined')
m.clones[cloneIdx].seg.imgt = {}
append_to_object(imgtArray[i], m.clones[cloneIdx].seg.imgt);
m.clones[cloneIdx].seg.imgt2display = computeStartStop(imgtArray[i],m.clones[cloneIdx].getSequence());
//toggle save in analysis file
m.clones[cloneIdx].segEdited = true;
......
......@@ -640,7 +640,12 @@ Segment.prototype = {
}
}
if (address == 'IMGT') imgtPost(request, system);
if (address == 'IMGTSeg') imgtPostForSegmenter(request, system);
if (address == 'IMGTSeg') {
imgtPostForSegmenter(request, system);
var change_options = {'l01p01c47' : 'N', // Deactivate default output
'l01p01c45' : 'Y'}; // Activate Summary output
imgtPostForSegmenter(request, system, change_options);
}
if (address == 'ARResT') arrestPost(request, system);
if (address == 'igBlast') igBlastPost(request, system);
if (address == 'blast') blastPost(request, system);
......
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