Mercurial > repos > jankanis > blast2html
annotate NCBI Blast reference example_files/formatRes.js @ 68:fa8a93bdefd7
fix bug in calculations of alignment end
author | Jan Kanis <jan.code@jankanis.nl> |
---|---|
date | Wed, 18 Jun 2014 12:25:37 +0200 |
parents | 344cd76f6fd2 |
children |
rev | line source |
---|---|
0
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1 // JScript source code |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
2 /*************************new code begin *******************************************************/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
3 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
4 function getHiddenFieldVal(elemName) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
5 var val; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
6 var elem = document.getElementsByName(elemName); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
7 if (elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
8 val = (elem.length > 1) ? elem[0].value : elem.value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
9 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
10 return val; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
11 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
12 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
13 function getHiddenFieldParamString(elemName) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
14 var ret = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
15 var val = getHiddenFieldVal(elemName); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
16 if (val) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
17 ret = "&" + elemName + "=" + val; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
18 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
19 return ret; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
20 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
21 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
22 function elementInViewport(el) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
23 if (!el) return; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
24 var rect = el.getBoundingClientRect(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
25 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
26 var myWidth = 0, myHeight = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
27 if (typeof (window.innerWidth) == 'number') { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
28 //Non-IE |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
29 myWidth = window.innerWidth; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
30 myHeight = window.innerHeight; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
31 } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
32 //IE 6+ in 'standards compliant mode' |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
33 myWidth = document.documentElement.clientWidth; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
34 myHeight = document.documentElement.clientHeight; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
35 } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
36 //IE 4 compatible |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
37 myWidth = document.body.clientWidth; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
38 myHeight = document.body.clientHeight; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
39 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
40 //window.alert('Width = ' + myWidth); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
41 //window.alert('Height = ' + myHeight); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
42 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
43 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
44 //return (rect.top >= 0 && rect.left >= 0 && rect.bottom <= window.innerHeight && rect.right <= window.innerWidth) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
45 //return (rect.top >= 0 && rect.left >= 0 && rect.bottom <= myHeight && rect.right <= myWidth) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
46 return (rect.top >= 0 && rect.bottom <= myHeight); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
47 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
48 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
49 function DisplayAlignFromDescription(elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
50 var alignView = $("FormatForm").ALIGNMENT_VIEW; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
51 if (alignView[alignView.selectedIndex].value == "Pairwise" || alignView[alignView.selectedIndex].value == "PairwiseWithIdentities") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
52 DisplayDynamicAlign(elem); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
53 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
54 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
55 location.href = "#" + elem.getAttribute("seqID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
56 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
57 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
58 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
59 //<a class="deflnDesc" hsp=<hsp_num> ind="<index>" gi="<gi>" id="deflnDesc_gi" href="#AlnHdrgi">desc</a> |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
60 //<div class="alnHdr" gi="<gi>" id="alnHdr_<index>"> |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
61 function DisplayDynamicAlign(elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
62 var currGi = elem.getAttribute("gi"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
63 var currInd = elem.getAttribute("ind"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
64 var stat = elem.getAttribute("stat"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
65 if (!currInd || !currGi) return; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
66 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
67 if (!stat || stat == "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
68 //Get 4(5) aligns before currInd and 4(5) aligns after |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
69 ReadCurrentSeqAligns(currInd, 5); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
70 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
71 else if (stat == "read") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
72 var indexes = getCurrIndexRange(currInd); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
73 if (indexes) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
74 var msgID = "alnShow_" + indexes[0]; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
75 location.href = "#" + msgID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
76 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
77 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
78 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
79 //error status handling |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
80 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
81 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
82 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
83 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
84 function goToNextAlign(dtrID, next) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
85 var currInd = parseInt($(dtrID).getAttribute("ind")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
86 var rid = $("Rid").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
87 nextInd = (next) ? currInd + 1 : currInd - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
88 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
89 if ($("deflnDesc_" + nextInd)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
90 currGi = $("deflnDesc_" + nextInd).getAttribute("seqID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
91 scrollToGI = currGi; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
92 if (!$("deflnDesc_" + nextInd).getAttribute("stat") || $("deflnDesc_" + nextInd).getAttribute("stat") == "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
93 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
94 if (!next) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
95 ReadPrevSeqAligns(currInd, 5, scrollToGI); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
96 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
97 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
98 //Use this indexes = wasAlignRead(nextInd); to determine insertAfterID in ReadNextAligns!!! |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
99 ReadNextSeqAligns(currInd, 5, scrollToGI); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
100 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
101 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
102 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
103 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
104 location.href = "#" + scrollToGI; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
105 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
106 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
107 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
108 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
109 function goToDefLine(dtrID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
110 if ($("psiInp")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
111 var tbl = jQuery($(dtrID)).parents(".jig-ncbigrid"); //parent table |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
112 togglerID = PsiBelowThresh(tbl[0].id) ? "showDescB1" : "showDescG1"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
113 jQuery($(togglerID)).ncbitoggler("open"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
114 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
115 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
116 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
117 /* |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
118 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
119 readAln.startIndex = parseInt(currInd); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
120 readAln.numSeq = parseInt(maxNumAligns); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
121 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
122 readAln.insertAfterID = insertAfterID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
123 readAln.seqList = giList; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
124 readAln.scrollToSeqID = scrollToGI; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
125 */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
126 function ReadNextSeqAligns(currInd, maxNumAligns, scrollToGI) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
127 var lastDispIdx = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
128 var rid = $("Rid").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
129 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
130 var readAln = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
131 readAln.seqList = ""; //giList |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
132 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
133 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
134 currInd = parseInt(currInd); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
135 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
136 if (currInd != 0 && $("deflnDesc_" + currInd)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
137 var par = utils.getParent($("aln_" + $("deflnDesc_" + currInd).getAttribute("seqID"))); //"alnShowReal_<ind> |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
138 //alert(par.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
139 if (par) par = utils.getParent(par); //"alnShow_<ind> |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
140 //alert(par.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
141 if (par) readAln.insertAfterID = par.id; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
142 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
143 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
144 readAln.insertAfterID = "alnStart"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
145 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
146 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
147 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
148 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
149 readAln.startIndex = currInd + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
150 readAln.numSeq = maxNumAligns; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
151 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
152 checkIfAlnExceedsThreshold(readAln, currInd, maxNumAligns, "next"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
153 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
154 readAln.scrollToSeqID = (scrollToGI && scrollToGI != "") ? scrollToGI : ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
155 readAln.hspSort = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
156 ReadSeqAlignByIndex(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
157 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
158 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
159 function ReadPrevSeqAligns(currInd, maxNumAligns, scrollToGI) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
160 var lastDispIdx = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
161 var rid = $("Rid").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
162 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
163 var readAln = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
164 readAln.seqList = ""; //giList |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
165 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
166 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
167 currInd = parseInt(currInd); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
168 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
169 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
170 //sets readAln.insertAfterID and returns lastDispIdx; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
171 //Find the index of the previously displayed alignment |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
172 lastDispIdx = getPrevDisplyedAlignInfo(currInd, readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
173 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
174 readAln.startIndex = (currInd - lastDispIdx > maxNumAligns) ? (currInd - maxNumAligns) : lastDispIdx + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
175 readAln.numSeq = currInd - readAln.startIndex; //stopIndex = currInd |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
176 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
177 checkIfAlnExceedsThreshold(readAln, currInd, readAln.numSeq, "prev"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
178 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
179 readAln.scrollToSeqID = (scrollToGI && scrollToGI != "") ? scrollToGI : $("deflnDesc_" + (currInd)).getAttribute("seqID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
180 readAln.hspSort = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
181 ReadSeqAlignByIndex(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
182 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
183 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
184 //When descriptions is clicked - display maxNumAligns before currInd and maxNumAligns after currInd |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
185 function ReadCurrentSeqAligns(currInd, maxNumAligns) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
186 var rid = $("Rid").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
187 var readAln = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
188 readAln.seqList = ""; //giList |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
189 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
190 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
191 currInd = parseInt(currInd); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
192 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
193 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
194 //sets readAln.insertAfterID and returns lastDispIdx; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
195 //Find the index of the previously displayed alignment |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
196 var lastDispIdx = getPrevDisplyedAlignInfo(currInd, readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
197 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
198 //lastDispIdx = parseInt(lastDispIdx); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
199 readAln.startIndex = (currInd - lastDispIdx > maxNumAligns) ? (currInd - maxNumAligns) : lastDispIdx + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
200 readAln.numSeq = parseInt(maxNumAligns * 2); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
201 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
202 checkIfAlnExceedsThreshold(readAln, currInd, maxNumAligns, "curr"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
203 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
204 readAln.scrollToSeqID = $("deflnDesc_" + currInd).getAttribute("seqID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
205 readAln.hspSort = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
206 ReadSeqAlignByIndex(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
207 g_DisableAutoCheck = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
208 location.href = "#alnShow_" + readAln.startIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
209 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
210 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
211 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
212 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
213 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
214 function setupDynHSPParams(readAln) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
215 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
216 var currSeqInd = readAln.startIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
217 hspNum = parseInt($("deflnDesc_" + currSeqInd).getAttribute("hsp")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
218 alnLen = parseInt($("deflnDesc_" + currSeqInd).getAttribute("len")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
219 var maxDispLen = parseInt($("maxDispAlnLen").value);//20000 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
220 var minDispLen = parseInt($("minDispAlnLen").value);//2000 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
221 if (alnLen > maxDispLen) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
222 var lenPerMatch = alnLen / hspNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
223 readAln.AlignDbPageSize = (lenPerMatch > minDispLen) ? 1 : Math.floor(minDispLen / lenPerMatch); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
224 readAln.AlignDbPageNum = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
225 $("deflnDesc_" + currSeqInd).setAttribute("dynHsps", readAln.AlignDbPageSize); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
226 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
227 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
228 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
229 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
230 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
231 function getCurrSeqsAlnLen(currSeqInd) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
232 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
233 var alnLen = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
234 if ($("deflnDesc_" + currSeqInd) && (!$("deflnDesc_" + currSeqInd).getAttribute("stat") || $("deflnDesc_" + currSeqInd).getAttribute("stat") == "")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
235 alnLen = $("deflnDesc_" + currSeqInd).getAttribute("len"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
236 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
237 alnLen = (alnLen) ? parseInt(alnLen) : 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
238 return alnLen; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
239 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
240 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
241 function checkTotalAlignLen(startIndex,stopIndex) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
242 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
243 var dispAlnLen = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
244 var maxDispLen = parseInt($("maxDispAlnLen").value); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
245 for (var i = startIndex; i <= stopIndex; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
246 alnLen = getCurrSeqsAlnLen(i); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
247 if (alnLen == 0) break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
248 dispAlnLen += alnLen; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
249 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
250 return dispAlnLen; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
251 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
252 //Get total align length for seq currSeqInd and |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
253 //"curr" surrounding countSeqs seqs + current, "prev" - previous countSeqs seqs, "next" - next countSeqs seqs |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
254 function getTotalAlignLen(readAln, currSeqInd, countSeqs, dispType) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
255 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
256 var startIndex = readAln.startIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
257 var stopIndex = readAln.startIndex + readAln.numSeq - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
258 if (dispType == "curr") {//checks countSeqs before and countSeqs after current, including current |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
259 startIndex = Math.max(startIndex, currSeqInd - countSeqs); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
260 stopIndex = Math.min(stopIndex, currSeqInd + countSeqs); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
261 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
262 else if(dispType == "prev") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
263 startIndex = Math.max(startIndex, currSeqInd - 1 - countSeqs); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
264 stopIndex = currSeqInd - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
265 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
266 else {//next |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
267 stopIndex = Math.min(stopIndex, currSeqInd + countSeqs + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
268 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
269 var totAlnLen = checkTotalAlignLen(startIndex,stopIndex); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
270 return totAlnLen; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
271 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
272 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
273 function checkIfAlnExceedsThreshold(readAln,currSeqInd,maxNumAligns, dispType) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
274 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
275 var maxDispLen = parseInt($("maxDispAlnLen").value); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
276 var totAlnLen = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
277 var exc = false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
278 for (var numSeq = 0; numSeq <= maxNumAligns; numSeq++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
279 totAlnLen = getTotalAlignLen(readAln, currSeqInd, numSeq, dispType); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
280 if(totAlnLen > maxDispLen) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
281 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
282 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
283 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
284 if (totAlnLen > maxDispLen) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
285 if (numSeq != 0) numSeq--; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
286 if (dispType == "curr") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
287 readAln.startIndex = Math.max(readAln.startIndex, currSeqInd - numSeq); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
288 //prev + 1(curr) + next |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
289 readAln.numSeq = (currSeqInd - readAln.startIndex) + 1 + numSeq; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
290 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
291 else if (dispType == "prev") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
292 readAln.startIndex = Math.max(readAln.startIndex, currSeqInd - 1 - numSeq); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
293 readAln.numSeq = numSeq + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
294 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
295 else { //"next" - readAln.startIndex stays |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
296 readAln.numSeq = numSeq + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
297 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
298 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
299 if (readAln.numSeq == 1 && $("useAlignDB") && $("useAlignDB").value == "true") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
300 setupDynHSPParams(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
301 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
302 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
303 exc = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
304 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
305 return exc; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
306 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
307 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
308 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
309 //readAln.startIndex, readAln.numSeq, readAln.scrollToSeqID,readAln.insertAfterID should be set |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
310 function ReadSeqAlignByIndex(readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
311 var numAligns = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
312 for (var i = readAln.startIndex; i < readAln.startIndex + readAln.numSeq; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
313 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
314 if (!$("deflnDesc_" + i)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
315 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
316 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
317 if (!$("deflnDesc_" + i).getAttribute("stat") || $("deflnDesc_" + i).getAttribute("stat") == "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
318 currGi = $("deflnDesc_" + i).getAttribute("seqFSTA"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
319 if (readAln.seqList != "") readAln.seqList += ","; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
320 readAln.seqList += currGi; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
321 numAligns++; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
322 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
323 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
324 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
325 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
326 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
327 if (readAln.seqList != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
328 readAln.numSeq = parseInt(numAligns); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
329 ReadSeqAlignForSeqList(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
330 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
331 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
332 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
333 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
334 var g_DisplayeAlignsRanges = ""; //String in the format start1-stop1,start2-stop2... |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
335 //Find the range of indexes of displayed alignments for currAlnInd |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
336 //Returns array of 2 startIndex, stopIndex |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
337 function getCurrIndexRange(currAlinInd) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
338 var currRange; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
339 var ranges = g_DisplayeAlignsRanges.split(","); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
340 for (var i = 0; i < ranges.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
341 var indexes = ranges[i].split("-"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
342 if (currAlinInd >= parseInt(indexes[0]) && currAlinInd <= parseInt(indexes[1])) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
343 currRange = indexes; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
344 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
345 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
346 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
347 return currRange; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
348 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
349 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
350 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
351 //Find the index of the previous displayed alignment |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
352 function getPrevDisplyedAlignInfo(currInd, readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
353 readAln.insertAfterID = "alnStart"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
354 lastDispIdx = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
355 for (var i = currInd - 1; i >= 1; i--) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
356 indexes = getCurrIndexRange(i); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
357 if (indexes) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
358 lastDispIdx = indexes[1]; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
359 readAln.insertAfterID = "alnShow_" + indexes[0]; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
360 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
361 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
362 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
363 return parseInt(lastDispIdx); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
364 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
365 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
366 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
367 //setReadStatus |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
368 function setSeqAlnReadStatus(readAln, status) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
369 for (var i = readAln.startIndex; i < readAln.startIndex + readAln.numSeq; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
370 if ($("deflnDesc_" + i)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
371 jQuery($($("deflnDesc_" + i))).attr("stat", status); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
372 if (status == "disp") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
373 g_MaxDisplayedIndex = (i > g_MaxDisplayedIndex) ? i : g_MaxDisplayedIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
374 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
375 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
376 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
377 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
378 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
379 /* |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
380 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
381 readAln.seqList = giList; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
382 readAln.startIndex = parseInt(idx); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
383 readAln.insertAfterID = insertAfterID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
384 readAln.numSeq = parseInt(numSeq); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
385 readAln.scrollToSeqID = scrollToGI; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
386 */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
387 function SendReadSeqAlinRequest(readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
388 blastUrl = "t2g.cgi"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
389 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
390 var rp = new RemoteDataProvider(blastUrl); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
391 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
392 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
393 rp.onSuccess = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
394 if ($("alignView")) utils.removeClass($("alignView"), "hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
395 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
396 if ($("alnShow_" + readAln.startIndex)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
397 var moreHspsLink = getNextHspsLink(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
398 jQuery($($("alnShowReal_" + readAln.startIndex))).html(obj.responseText + moreHspsLink, { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
399 'widgets': ['ncbipopper', 'ncbitoggler'], |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
400 'configs': { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
401 'ncbipopper': { hasArrow: true, arrowDirection: 'top' } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
402 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
403 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
404 setSeqAlnReadStatus(readAln, "disp"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
405 jQuery($("alnMsg_" + readAln.startIndex)).addClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
406 //Saves start and stop indexes of loaded alignments in global variables |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
407 saveIdxesForAutomaticLoad(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
408 jQuery($($("alnShowReal_" + readAln.startIndex))).find(".alnHdr").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
409 var seqID = this.getAttribute("seqID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
410 if(seqID) initAlignBatch(seqID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
411 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
412 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
413 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
414 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
415 if (readAln.scrollToSeqID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
416 location.href = "#" + readAln.scrollToSeqID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
417 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
418 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
419 }; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
420 rp.onError = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
421 if ($("alignView")) utils.removeClass($("alignView"), "hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
422 jQuery($("alnMsg_" + readAln.startIndex)).addClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
423 $("alnShowReal_" + readAln.startIndex).innerHTML = "<div class=\"erm\" id=\"erm_" + readAln.startIndex + "\">Error loading alignment ...<span class=\"db\">requests:" + this.iActiveRequests + " status:" + obj.status + |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
424 "</span><a class=\"gbd\" href=\"#\" onclick=\"ReSubmitReadSeqAligns(event," + readAln.startIndex + ")\">Try again<\a></div>"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
425 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
426 var params = constructURLParams(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
427 if (readAln.numSeq == 1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
428 params += "&TOTAL_HSPS=" + $("deflnDesc_" + readAln.startIndex).getAttribute("hsp"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
429 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
430 params += "&SEQ_LIST_START=" + readAln.startIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
431 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
432 var formatParams = constructFormatParams(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
433 params += formatParams; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
434 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
435 //alert(params); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
436 rp.Request(params); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
437 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
438 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
439 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
440 function constructURLParams(readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
441 var params; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
442 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
443 if ($("useAlignDB") && $("useAlignDB").value == "true") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
444 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
445 var alignDbParams = "&USE_ALIGNDB=true"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
446 var batchID = document.getElementsByName("ALIGNDB_BATCH_ID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
447 if (batchID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
448 alignDbParams += getHiddenFieldParamString("ALIGNDB_BATCH_ID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
449 alignDbParams += getHiddenFieldParamString("ALIGNDB_MASTER_ALIAS"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
450 alignDbParams += getHiddenFieldParamString("ALIGNDB_CGI_HOST"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
451 alignDbParams += getHiddenFieldParamString("ALIGNDB_CGI_PATH"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
452 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
453 alignDbParams += "&ALIGN_SEQ_LIST=" + readAln.seqList; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
454 alignDbParams += "&HSP_SORT=" + readAln.hspSort; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
455 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
456 if (readAln.hasOwnProperty("AlignDbPageNum")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
457 alignDbParams += "&ALIGNDB_PAGE_NUM=" + readAln.AlignDbPageNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
458 alignDbParams += "&ALIGNDB_PAGE_SIZE=" + readAln.AlignDbPageSize; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
459 alignDbParams += "&HSP_START=" + readAln.AlignDbPageSize * readAln.AlignDbPageNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
460 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
461 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
462 params = "CMD=Get&RID=" + readAln.rid + "&OLD_BLAST=false&DESCRIPTIONS=0&NUM_OVERVIEW=0&DYNAMIC_FORMAT=on" + alignDbParams; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
463 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
464 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
465 params = "CMD=Get&RID=" + readAln.rid + "&OLD_BLAST=false&DESCRIPTIONS=0&NUM_OVERVIEW=0&GET_SEQUENCE=on&DYNAMIC_FORMAT=on&ALIGN_SEQ_LIST=" + readAln.seqList + "&HSP_SORT=" + readAln.hspSort; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
466 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
467 if ($("phiPtInd")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
468 params += "&PHI_PTTRN_INDEX=" + $("phiPtInd")[$("phiPtInd").selectedIndex].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
469 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
470 return params; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
471 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
472 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
473 /* |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
474 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
475 readAln.seqList = giList; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
476 readAln.startIndex = parseInt(idx); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
477 readAln.insertAfterID = insertAfterID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
478 readAln.numSeq = parseInt(numSeq); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
479 readAln.scrollToSeqID = scrollToGI; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
480 */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
481 /*1. Draw div with id="alnShow_index" class ="alnMsg" with the message listing gis nad indexes |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
482 2. Insert another div with id="alnShowReal_index and class="alnMsgR" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
483 3. For "alnShow_index" set atrr indexes="startInd-stopInd" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
484 4. Set global g_MaxReadMessageIndex - max index of displayed seqalign ??? - check this |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
485 5. Add string "startInd-stopInd" to g_DisplayeAlignsRanges - comma separated indexes |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
486 6. Send read request |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
487 */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
488 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
489 function ReadSeqAlignForSeqList(readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
490 var text = "<div id=\"alnShow_" + readAln.startIndex + "\" class=\"alnMsg\"><div class=\"alnMsgS\" id=\"alnMsg_" + readAln.startIndex + "\">Loading alignment...<span class=\"db\"> for sequences " + readAln.seqList; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
491 var stopIndex = readAln.startIndex + readAln.numSeq - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
492 var useAlignDB = ($("useAlignDB") && $("useAlignDB").value == "true") ? "AlignDB=on " : ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
493 text += " " + useAlignDB + "Reading indexes " + readAln.startIndex + "-" + stopIndex + "</span></div>"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
494 text += "<div id=\"alnShowReal_" + readAln.startIndex + "\" class=\"alnMsgR\"></div></div>"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
495 var debugControl = "<div id=\"debug\"></div>"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
496 if (!$("debug")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
497 jQuery($($("descriptions"))).before(debugControl); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
498 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
499 if (!$("alnShow_" + readAln.startIndex)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
500 jQuery($($(readAln.insertAfterID))).after(text); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
501 jQuery($($("alnShow_" + readAln.startIndex))).attr("indexes", readAln.startIndex + "-" + stopIndex); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
502 jQuery($($("alnShow_" + readAln.startIndex))).attr("seqlist", readAln.seqList); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
503 g_MaxReadMessageIndex = (readAln.startIndex > g_MaxReadMessageIndex) ? readAln.startIndex : g_MaxReadMessageIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
504 setSeqAlnReadStatus(readAln, "read"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
505 $("debug").innerHTML += ", " + useAlignDB + "Reading indexes " + readAln.startIndex + "-" + stopIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
506 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
507 if (g_DisplayeAlignsRanges != "") g_DisplayeAlignsRanges += ","; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
508 g_DisplayeAlignsRanges += readAln.startIndex + "-" + stopIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
509 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
510 SendReadSeqAlinRequest(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
511 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
512 else if ($("alnShowReal_" + readAln.startIndex).innerHTML.indexOf("Error") != -1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
513 jQuery($("alnMsg_" + readAln.startIndex)).removeClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
514 jQuery($("erm_" + readAln.startIndex)).remove(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
515 SendReadSeqAlinRequest(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
516 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
517 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
518 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
519 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
520 function ReSubmitReadSeqAligns(e,currInd) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
521 var rid = $("Rid").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
522 if ($("alnShow_" + currInd)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
523 var indexRange = jQuery($("alnShow_" + currInd)).attr("indexes"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
524 var range = indexRange.split("-"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
525 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
526 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
527 var readAln = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
528 readAln.seqList = ""; //giList |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
529 readAln.rid = rid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
530 readAln.seqList = jQuery($("alnShow_" + currInd)).attr("seqlist"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
531 readAln.startIndex = parseInt(range[0]); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
532 readAln.numSeq = parseInt(range[1]) - parseInt(range[0]) + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
533 readAln.hspSort = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
534 ReadSeqAlignForSeqList(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
535 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
536 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
537 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
538 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
539 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
540 var g_MaxReadMessageIndex = 0; //alnShow_idx with the message, deflnDesc_idx with stat="read" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
541 var g_MaxDisplayedIndex = 0; //deflnDesc_idx with stat="disp" - last one in the set of N |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
542 var g_DisableAutoCheck = false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
543 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
544 var g_autoStartIdx = new Array(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
545 var g_autoStopIdx = new Array(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
546 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
547 function saveIdxesForAutomaticLoad(readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
548 var stopIndex = readAln.startIndex + readAln.numSeq - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
549 g_autoStartIdx.push(readAln.startIndex); //1,20,25 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
550 g_autoStopIdx.push(stopIndex); //4,24,29 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
551 $("debug").innerHTML += ", displaying indexes " + readAln.startIndex + "-" + stopIndex; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
552 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
553 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
554 function getNextHspsLink(readAln) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
555 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
556 var moreHspsLink = "" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
557 if (readAln.hasOwnProperty("AlignDbPageNum")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
558 var nextPageNum = readAln.AlignDbPageNum + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
559 var currHspInd = readAln.AlignDbPageSize * nextPageNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
560 var argstring = readAln.startIndex + "," + currHspInd; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
561 var currGi = $("deflnDesc_" + readAln.startIndex).getAttribute("seqId"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
562 var accs = $("deflnDesc_" + readAln.startIndex).getAttribute("accs"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
563 var totalHsps = $("deflnDesc_" + readAln.startIndex).getAttribute("hsp"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
564 var prevHspInd = readAln.AlignDbPageSize * nextPageNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
565 var segs = (prevHspInd + 1) + "-" + (prevHspInd + readAln.AlignDbPageSize); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
566 var moreHspsID = "nxHsp" + currGi + "_" + (prevHspInd + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
567 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
568 moreHspsLink = $("dynHspTmpl").innerHTML.replace("@moreHspsID@", moreHspsID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
569 moreHspsLink = moreHspsLink.replace(/@accs@/g, accs); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
570 moreHspsLink = moreHspsLink.replace("@argstring@", argstring); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
571 moreHspsLink = moreHspsLink.replace(/@segs@/g, segs); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
572 moreHspsLink = moreHspsLink.replace("@totalHSP@", totalHsps); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
573 moreHspsLink = moreHspsLink.replace(/@alignDbPageSize@/g, readAln.AlignDbPageSize); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
574 moreHspsLink = moreHspsLink.replace("@aln_prev_num@", prevHspInd); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
575 moreHspsLink = moreHspsLink.replace("@alnSeqGi@", currGi); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
576 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
577 return moreHspsLink; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
578 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
579 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
580 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
581 function ReadNextHSPSet(currSeqInd, currHSPNum) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
582 var readAln = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
583 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
584 readAln.rid = $("Rid").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
585 readAln.seqList = $("deflnDesc_" + currSeqInd).getAttribute("seqFSTA"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
586 readAln.gi = $("deflnDesc_" + currSeqInd).getAttribute("seqId"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
587 dynHsps = $("deflnDesc_" + currSeqInd).getAttribute("dynHsps"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
588 readAln.startIndex = currSeqInd; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
589 readAln.numSeq = 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
590 if (dynHsps) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
591 readAln.AlignDbPageNum = parseInt(currHSPNum) / parseInt(dynHsps); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
592 readAln.AlignDbPageSize = parseInt(dynHsps); //number of HSps to retrieve |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
593 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
594 if (currHSPNum != 0) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
595 readAln.scrollToSeqID = "hsp" + +readAln.gi + "_" + (parseInt(currHSPNum) + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
596 readAln.insertAfterID = "ar_" + readAln.gi + "_" + currHSPNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
597 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
598 var sortLink = $("sa_" + readAln.gi); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
599 readAln.hspSort = (sortLink) ? parseInt(sortLink[sortLink.selectedIndex].value) : 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
600 SendReadSeqAlinSortHSPRequest(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
601 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
602 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
603 function ReadNextHSPSetEvt(e, currSeqInd, currHSPNum) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
604 ReadNextHSPSet(currSeqInd, currHSPNum); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
605 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
606 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
607 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
608 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
609 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
610 function checkAutoAlignArray() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
611 var stop = false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
612 var start = false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
613 var currAlignViewPos = $("alignView").getBoundingClientRect().top; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
614 if (currAlignViewPos < g_alignViewPos) {//scrolling down |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
615 g_alignViewPos = currAlignViewPos; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
616 if (g_DisableAutoCheck) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
617 g_DisableAutoCheck = false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
618 return; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
619 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
620 for (i = 0; i < g_autoStopIdx.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
621 if (elementInViewport($("alnHdr_" + $("deflnDesc_" + g_autoStopIdx[i]).getAttribute("seqID")))) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
622 //alert("Reading more aligns scrolling down!"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
623 var nextInd = parseInt(g_autoStopIdx[i] + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
624 var currInd = g_autoStopIdx[i]; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
625 if ($("deflnDesc_" + nextInd) && (!$("deflnDesc_" + nextInd).getAttribute("stat") || $("deflnDesc_" + nextInd).getAttribute("stat") == "")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
626 ReadNextSeqAligns(currInd, 5); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
627 stop = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
628 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
629 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
630 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
631 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
632 if (stop) g_autoStopIdx.splice(i, 1); //delete index from the array |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
633 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
634 else if (currAlignViewPos > g_alignViewPos) {//scrolling up |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
635 g_alignViewPos = currAlignViewPos; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
636 //here maybe return if autoStop found!!! |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
637 /* commenting automic read when scroll up */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
638 for (i = 0; i < g_autoStartIdx.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
639 if (elementInViewport($("alnHdr_" + $("deflnDesc_" + g_autoStartIdx[i]).getAttribute("seqID")))) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
640 //alert("Reading more aligns scrolling up!"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
641 var currInd = g_autoStartIdx[i]; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
642 //Check for condition here if go there at all!!! Check if do the same thing as for ReadNext!!!! |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
643 if (currInd > 1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
644 ReadPrevSeqAligns(currInd, 5); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
645 start = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
646 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
647 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
648 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
649 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
650 if (start) g_autoStartIdx.splice(i, 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
651 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
652 /*end of comment*/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
653 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
654 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
655 var g_alignViewPos = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
656 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
657 function checkAutoAlignLoad() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
658 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
659 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
660 checkAutoAlignArray(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
661 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
662 if (jQuery($($(window))).scrollTop() + jQuery($($(window))).height() >= jQuery($($(document))).height() - 100) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
663 //alert("bottom!"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
664 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
665 if ($("alnShowReal_" + g_MaxReadMessageIndex) && $("alnShowReal_" + g_MaxReadMessageIndex).innerHTML != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
666 //if(!$("alnShow_" + maxReadMessageIndex)) {//g_MaxReadMessageIndex |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
667 ReadNextSeqAligns(g_MaxDisplayedIndex, 5); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
668 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
669 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
670 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
671 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
672 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
673 function GetPatternLocResults() |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
674 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
675 form = $("results"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
676 if (!form.PHI_PTTRN_INDEX) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
677 var el = document.createElement("input"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
678 el.name = "PHI_PTTRN_INDEX"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
679 el.value = $("phiPtInd")[$("phiPtInd").selectedIndex].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
680 form.appendChild(el); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
681 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
682 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
683 form.PHI_PTTRN_INDEX.value = $("phiPtInd")[$("phiPtInd").selectedIndex].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
684 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
685 form.submit(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
686 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
687 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
688 function goToNextHSP(elem, next) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
689 var par = jQuery(elem).parent(); //parent span with class="alnParLinks" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
690 var parts = par[0].id.split("_"); //"hsp<seqid>_hspnum "hsp207524544_2" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
691 if (parts[0].indexOf("nxHsp") != -1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
692 parts[0] = parts[0].replace("nxHsp", "hsp"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
693 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
694 nextID = (next) ? parts[0] + "_" + (parseInt(parts[1]) + 1) : parts[0] + "_" + (parseInt(parts[1]) - 1) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
695 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
696 gotoElem = jQuery($(nextID)); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
697 if (gotoElem[0]) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
698 a = jQuery(gotoElem).offset(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
699 window.scroll(0, a.top); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
700 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
701 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
702 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
703 retrieveNextHSP(parts[0],parts[1]); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
704 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
705 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
706 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
707 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
708 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
709 //parts[0]//hsp<seqid>, parts[1] hspnum |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
710 function retrieveNextHSP(currLinkID, currHSPNum) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
711 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
712 var desLineID = currLinkID.replace("hsp", "dtr_"); //tr id |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
713 var currSeqInd, totalHsps; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
714 jQuery($($(desLineID))).find(".deflnDesc").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
715 currSeqInd = parseInt(this.getAttribute("ind")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
716 totalHsps = parseInt(this.getAttribute("hsp")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
717 dynHsps = this.getAttribute("dynHsps"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
718 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
719 currHSPNum = parseInt(currHSPNum); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
720 if (currHSPNum < totalHsps && dynHsps) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
721 ReadNextHSPSet(currSeqInd, currHSPNum); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
722 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
723 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
724 /********Adding those functions back to formatRes.js to identify Uncaught ReferenceError: getUrlCompForCheckedField is not defined error********************************/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
725 function getUrlCompForEntryField(elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
726 var url = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
727 if (elem && elem.value != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
728 url = "&" + elem.name + "=" + escape(elem.value); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
729 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
730 return url; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
731 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
732 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
733 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
734 function getUrlCompForCheckedField(elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
735 var url = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
736 if (elem && elem.checked) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
737 url = "&" + elem.name + "=" + elem.value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
738 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
739 return url; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
740 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
741 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
742 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
743 function getUrlCompForOptionsField(elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
744 var url = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
745 if (elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
746 url = "&" + elem.name + "=" + elem[elem.selectedIndex].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
747 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
748 return url; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
749 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
750 /****************************************/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
751 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
752 function constructFormatParams() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
753 var formatParams = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
754 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
755 if ($("queryList")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
756 formatParams += "&QUERY_INDEX=" + $("queryList")[$("queryList").selectedIndex].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
757 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
758 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
759 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
760 formatParams += getUrlCompForCheckedField($("FormatForm").SHOW_LINKOUT); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
761 formatParams += getUrlCompForCheckedField($("FormatForm").SHOW_CDS_FEATURE); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
762 formatParams += getUrlCompForCheckedField($("FormatForm").NCBI_GI); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
763 formatParams += getUrlCompForOptionsField($("FormatForm").ALIGNMENT_VIEW); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
764 formatParams += getUrlCompForOptionsField($("FormatForm").MASK_CHAR); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
765 formatParams += getUrlCompForOptionsField($("FormatForm").MASK_COLOR); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
766 formatParams += getUrlCompForEntryField($("FormatForm").EXPECT_LOW); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
767 formatParams += getUrlCompForEntryField($("FormatForm").EXPECT_HIGH); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
768 formatParams += getUrlCompForEntryField($("FormatForm").PERC_IDENT_LOW); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
769 formatParams += getUrlCompForEntryField($("FormatForm").PERC_IDENT_HIGH); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
770 formatParams += getUrlCompForEntryField($("FormatForm").LINE_LENGTH); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
771 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
772 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
773 formatParams += getHiddenFieldParamString("BUILD_NAME"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
774 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
775 var serviceType = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
776 if ($("serviceType").value == "sra") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
777 serviceType = "sra"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
778 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
779 else if ($("clientType").value == "TMSmart_restricted") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
780 serviceType = "restricted"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
781 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
782 if (serviceType != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
783 formatParams += "&BOBJSRVC=" + serviceType; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
784 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
785 if ($("currQuery").value != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
786 formatParams += "&CURR_QUERY_ID=" + $("currQuery").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
787 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
788 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
789 return formatParams; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
790 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
791 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
792 //readAln.seqList contains one gi only for this |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
793 function SendReadSeqAlinSortHSPRequest(readAln) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
794 blastUrl = "t2g.cgi"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
795 var rp = new RemoteDataProvider(blastUrl); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
796 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
797 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
798 rp.onSuccess = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
799 var moreHspsLink = (readAln.hasOwnProperty("AlignDbPageNum")) ? getNextHspsLink(readAln) : ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
800 var alnHtml = obj.responseText + moreHspsLink; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
801 initHSPRequest(readAln, obj.responseText + moreHspsLink,false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
802 if (readAln.scrollToSeqID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
803 location.href = "#" + readAln.scrollToSeqID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
804 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
805 }; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
806 rp.onError = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
807 var currHspInd = (readAln.hasOwnProperty("AlignDbPageNum")) ? readAln.AlignDbPageSize * readAln.AlignDbPageNum : 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
808 var msgID = "erm_" + readAln.gi + "_" + (currHspInd + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
809 if (!$(msgID)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
810 var msg = "<div class=\"erm\" att=\"1\" id=\"" + msgID + "\">Error loading alignment ...<span class=\"db\">status:" + obj.status + |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
811 "</span><a class=\"gbd\" href=\"#\" onclick=\"ReadNextHSPSetEvt(event," + readAln.startIndex + "," + currHspInd + |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
812 ")\">Try again <span class=\"attmt\"></span> <\a></div>"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
813 initHSPRequest(readAln, msg, true); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
814 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
815 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
816 var attNum = parseInt($(msgID).getAttribute("att")) + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
817 $(msgID).setAttribute("att", attNum); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
818 jQuery($(msgID)).find(".attmt").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
819 jQuery(this).html(", attempt " + attNum); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
820 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
821 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
822 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
823 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
824 var params = constructURLParams(readAln); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
825 if (readAln.AlignDbPageSize) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
826 params += "&TOTAL_HSPS=" + $("deflnDesc_" + readAln.startIndex).getAttribute("hsp"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
827 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
828 params += "&SORT_ONE_ALN=on"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
829 var formatParams = constructFormatParams(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
830 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
831 params += formatParams; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
832 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
833 //alert(params); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
834 rp.Request(params); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
835 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
836 function initHSPRequest(readAln, alnHtml, err) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
837 var currHspInd = (readAln.hasOwnProperty("AlignDbPageNum")) ? readAln.AlignDbPageSize * readAln.AlignDbPageNum : 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
838 if (currHspInd != 0) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
839 readAln.insertAfterID = "ar_" + readAln.gi + "_" + currHspInd; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
840 jQuery($(readAln.insertAfterID)).after(alnHtml); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
841 moreHspsID = "nxHsp" + readAln.gi + "_" + (currHspInd + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
842 jQuery($(moreHspsID)).remove(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
843 if (!err) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
844 errMsgID = "erm_" + readAln.gi + "_" + (currHspInd + 1); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
845 jQuery($(errMsgID)).remove(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
846 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
847 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
848 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
849 jQuery($("alnAll_" + readAln.gi)).html(alnHtml); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
850 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
851 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
852 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
853 function SortHSPAlnSel(e, sortLink) {//example id="sa_207524544" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
854 var readAln = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
855 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
856 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
857 var desLineID = sortLink.id.replace("sa", "dtr"); //tr id |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
858 var seqInd; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
859 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
860 jQuery($($(desLineID))).find(".deflnDesc").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
861 seqInd = this.getAttribute("ind"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
862 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
863 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
864 ReadNextHSPSet(parseInt(seqInd), 0); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
865 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
866 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
867 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
868 function configDescriptions(e,btn,dlgId) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
869 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
870 var suffix = PsiBelowThresh(dlgId); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
871 var colmnsInfId = "cfcDsInf" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
872 var tblID = "dscTable" + suffix; //"dscTable[_psiw]" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
873 var showAllColId = "shcl" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
874 var chkBoxes = $C("checkbox", "type", $(dlgId), "input"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
875 if (!utils.hasClass(btn, "cnc")) $(colmnsInfId).value = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
876 for (i = 0; i < chkBoxes.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
877 var check; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
878 if (utils.hasClass(btn, "cnc")) {//cancel |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
879 if ($(colmnsInfId).value.indexOf(chkBoxes[i].value) != -1 && !chkBoxes[i].checked) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
880 check = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
881 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
882 else if ($(colmnsInfId).value.indexOf(chkBoxes[i].value) == -1 && chkBoxes[i].checked) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
883 check = false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
884 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
885 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
886 else if (utils.hasClass(btn, "rdf") && !chkBoxes[i].checked) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
887 check = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
888 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
889 if (typeof (check) != 'undefined') { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
890 chkBoxes[i].checked = check; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
891 showHideCol(tblID,parseInt(chkBoxes[i].value), !check); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
892 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
893 if (!utils.hasClass(btn, "cnc")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
894 if (chkBoxes[i].checked) { //OK |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
895 if ($(colmnsInfId).value != "") $(colmnsInfId).value += ","; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
896 $(colmnsInfId).value += chkBoxes[i].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
897 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
898 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
899 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
900 if ($(colmnsInfId).value != $(colmnsInfId).getAttribute("defval")) {//defval = "2,3,4,5,6,7,8" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
901 jQuery($(showAllColId)).removeClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
902 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
903 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
904 jQuery($(showAllColId)).addClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
905 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
906 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
907 var chConfig = $("cfcDsSave").value != $(colmnsInfId).value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
908 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
909 var cfds = document.getElementsByName("CONFIG_DESCR"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
910 if (cfds) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
911 for (i = 0; i < cfds.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
912 cfds[i].value = $(colmnsInfId).value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
913 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
914 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
915 $("cfcDsSave").value = $(colmnsInfId).value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
916 if (chConfig) SaveConfigTable(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
917 jQuery(document.body).click(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
918 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
919 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
920 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
921 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
922 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
923 function initDescConfig() |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
924 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
925 initConfigColumns("dsConfig"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
926 if ($("psiw") && utils.hasClass($("psiw"), "shown")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
927 initConfigColumns("dsConfig_psiw"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
928 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
929 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
930 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
931 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
932 function initConfigColumns(cnfDlgID) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
933 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
934 var suffix = PsiBelowThresh(cnfDlgID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
935 //cnfDlgID is "dsConfig[_psiw]" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
936 var colmnsInfId = "cfcDsInf" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
937 var tblID = "dscTable" + suffix; //"dscTable[_psiw]" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
938 var showAllColId = "shcl" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
939 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
940 if (navigator.userAgent.match(/ie/i)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
941 if ($("FormatForm").NCBI_GI.checked || $("serviceType").value == "sra") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
942 jQuery($(tblID)).find("th.c1").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
943 db = getHiddenFieldVal("DATABASE"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
944 var width = (db.match(/WGS/i) || db.match(/Whole_Genome_Shotgun_contigs/i)) ? "16em" : "14em"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
945 jQuery(this).css("width", width); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
946 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
947 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
948 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
949 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
950 jQuery($(tblID)).find("tr.first").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
951 jQuery(this).find("a.dcs").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
952 jQuery(this).bind("click", function(e) { checkConfig(this); }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
953 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
954 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
955 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
956 jQuery($(cnfDlgID)).find("button").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
957 jQuery(this).bind("click", function(e) { configDescriptions(e, this, cnfDlgID); }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
958 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
959 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
960 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
961 jQuery($(cnfDlgID)).bind("click", function(e) { e.stopPropagation(); }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
962 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
963 $(colmnsInfId).value = getHiddenFieldVal("CONFIG_DESCR"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
964 if ($(colmnsInfId).value == "" || $(colmnsInfId).value == "undefined") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
965 $(colmnsInfId).value = $(colmnsInfId).getAttribute("defval"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
966 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
967 if ($(colmnsInfId).value != $(colmnsInfId).getAttribute("defval")) {//defval = "2,3,4,5,6,7,8" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
968 jQuery($(showAllColId)).removeClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
969 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
970 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
971 jQuery($(showAllColId)).addClass("hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
972 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
973 var chkBoxes = $C("checkbox", "type", $(cnfDlgID), "input") |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
974 for (i = 0; i < chkBoxes.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
975 jQuery(chkBoxes[i]).bind("click", configColumn); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
976 if ($(colmnsInfId).value.indexOf(chkBoxes[i].value) != -1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
977 chkBoxes[i].checked = true; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
978 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
979 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
980 //jQuery($(tblID)).ncbigrid("hideColumn", chkBoxes[i].value); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
981 showHideCol($(tblID), chkBoxes[i].value, true); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
982 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
983 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
984 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
985 function showAllCol(e,elem) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
986 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
987 var suffix = PsiBelowThresh(elem.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
988 var rdf = "dscRsDf" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
989 jQuery($(rdf)).click();//click "restore defaults' |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
990 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
991 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
992 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
993 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
994 function configColumn() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
995 var suffix = PsiBelowThresh(this.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
996 var tblID = "dscTable" + suffix; //"dscTable[_psiw]" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
997 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
998 cCls = "c" + this.value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
999 if (this.checked) {//show |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1000 showHideCol(tblID,parseInt(this.value), false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1001 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1002 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1003 showHideCol(tblID,parseInt(this.value), true); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1004 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1005 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1006 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1007 function showHideCol(tblID, columnIndex, hide) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1008 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1009 if ($("Transcr")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1010 colHidden = utils.hasClass($("c" + columnIndex), "ui-ncbigrid-column-hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1011 hide = hide && !colHidden; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1012 show = !hide && colHidden; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1013 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1014 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1015 show = !hide; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1016 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1017 if (hide) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1018 jQuery($(tblID)).ncbigrid("hideColumn", columnIndex); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1019 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1020 else if (show) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1021 jQuery($(tblID)).ncbigrid("showColumn", columnIndex); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1022 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1023 if ($("Transcr") && (hide || show) ) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1024 var colsp = parseInt($("Transcr").getAttribute("colspan")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1025 colsp = (hide) ? colsp - 1 : colsp + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1026 $("Transcr").setAttribute("colSpan", colsp); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1027 if ($("GnmSeq")) $("GnmSeq").setAttribute("colSpan", colsp); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1028 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1029 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1030 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1031 function checkConfig(lnk) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1032 var cnfCol = "&CONFIG_DESCR=" + $("cfcDsSave").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1033 lnk.href = lnk.href + cnfCol + "#sort_mark"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1034 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1035 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1036 function DisplayAlignFromGraphics(seqID,e) //SeqID = gi if exists |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1037 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1038 var dflLineLinks = $C(seqID, "gi", document, "a"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1039 for (i = 0; i < dflLineLinks.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1040 jQuery(dflLineLinks[i]).click(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1041 break; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1042 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1043 location.href = dflLineLinks[i].href; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1044 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1045 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1046 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1047 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1048 function initDescSelect() |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1049 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1050 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1051 jQuery("#cntDesc").find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1052 jQuery(this).bind("click", configDescrSelect); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1053 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1054 jQuery("#cntSelN").click(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1055 jQuery("#descTblCtrl").find("a[view]").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1056 jQuery(this).bind("click", DisplaySelectedView); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1057 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1058 if ($("psiw") && utils.hasClass($("psiw"), "shown")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1059 jQuery("#cntDesc_psiw").find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1060 jQuery(this).bind("click", configDescrSelect); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1061 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1062 jQuery("#cntSelN_psiw").click(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1063 jQuery("#descTblCtrl_psiw").find("a[view]").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1064 jQuery(this).bind("click", DisplaySelectedView); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1065 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1066 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1067 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1068 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1069 //jQuery("#dsConfig").bind("click", function(e) { e.stopPropagation(); });?? |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1070 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1071 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1072 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1073 function DisplaySelectedView(e) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1074 if (this.getAttribute("view") == "graph") { //seqviewer |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1075 ViewSelectedSeqViewer(e,this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1076 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1077 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1078 if (this.getAttribute("view") == "tree") { //seqviewer |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1079 $("scrWidth").value = screen.width; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1080 $("scrHeight").value = screen.height; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1081 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1082 ViewSelectedSeqsEx(e, this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1083 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1084 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1085 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1086 function PsiBelowThresh(elemID) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1087 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1088 var suffix = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1089 if (elemID.indexOf("_psiw") != -1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1090 suffix = "_psiw"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1091 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1092 return suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1093 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1094 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1095 function ViewSelectedSeqsEx(e,elem) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1096 var sbmForm = elem.getAttribute("frm"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1097 var seqList = elem.getAttribute("seqList"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1098 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1099 var cnfElem = utils.getParent(elem); //.cnf div |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1100 var suffix = PsiBelowThresh(cnfElem.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1101 var tblID = "dscTable" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1102 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1103 $(seqList).value = createSelseqString(tblID,true); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1104 $(seqList).value = $(seqList).value.replace(/ti:/g, ""); //For traces |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1105 if ($(seqList).value.indexOf("dbSNP") != -1) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1106 $(seqList).value = $(seqList).value.replace(/dbSNP:rs/g, ""); //For snp |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1107 elem.href = $(sbmForm).action + $(seqList).value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1108 elem.target = "new"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1109 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1110 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1111 $(sbmForm).submit(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1112 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1113 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1114 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1115 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1116 function ViewSelectedSeqsTree(e) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1117 $("scrWidth").value = screen.width; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1118 $("scrHeight").value = screen.height; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1119 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1120 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1121 function initSeqViewerGet(seqList) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1122 if (seqList.length >= 2000) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1123 seqList = seqList.substr(0,2000); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1124 lastComma = seqList.lastIndexOf(","); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1125 seqList = seqList.substr(0,lastComma); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1126 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1127 $("seqViewParams").name = "RID"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1128 $("seqViewParams").value = $("ridParam").value + "[" + seqList + "]"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1129 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1130 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1131 function ViewSelectedSeqViewer(e, elem) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1132 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1133 var cnfElem = utils.getParent(elem); //.cnf div |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1134 var suffix = PsiBelowThresh(cnfElem.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1135 var tblID = "dscTable" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1136 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1137 //change to false when new verison of seqVier is installed in production |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1138 var seqList = createSelseqString(tblID, false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1139 $("sbmtGraphics").action = $("seqViewUrl").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1140 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1141 var rp = new RemoteDataProvider("url2nc.cgi"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1142 rp.onSuccess = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1143 var jsnResp = JSON.parse(obj.responseText); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1144 ncid = jsnResp.ncid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1145 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1146 if (ncid != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1147 $("seqViewParams").name = "rkey"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1148 $("seqViewParams").value = ncid; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1149 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1150 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1151 initSeqViewerGet(seqList); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1152 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1153 $("sbmtGraphics").submit(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1154 }; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1155 rp.onError = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1156 initSeqViewerGet(seqList); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1157 $("sbmtGraphics").submit(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1158 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1159 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1160 var params = $("ridParam").value + "[" + seqList + "]"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1161 rp.Request(params, "POST"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1162 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1163 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1164 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1165 function configDescrSelect(e) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1166 var sel = this.getAttribute("sel"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1167 if (sel) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1168 var selNum = 0; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1169 var check = (sel == "all") ? true : false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1170 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1171 var suffix = PsiBelowThresh(this.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1172 var tblID = "dscTable" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1173 var toolbarID = "descTblCtrl" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1174 var selElID = "slcNum" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1175 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1176 jQuery($(tblID)).find("input[type='checkbox'].cb").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1177 jQuery(this)[0].checked = check; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1178 if (check) selNum++; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1179 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1180 enableDescrLinks(selNum, toolbarID, selElID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1181 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1182 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1183 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1184 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1185 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1186 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1187 function enableDescrLinks(selNum, toolbarID, selElID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1188 jQuery($(toolbarID)).find("a[minSlct]").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1189 var minSelected = this.getAttribute("minSlct"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1190 minSelected = parseInt(minSelected); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1191 if (selNum >= minSelected) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1192 this.removeAttribute("disabled"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1193 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1194 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1195 this.setAttribute("disabled", "disabled"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1196 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1197 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1198 $(selElID).innerHTML = selNum; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1199 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1200 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1201 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1202 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1203 function configDescrLinks(e, elem) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1204 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1205 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1206 ncbi.sg.ping(elem, "click", elem.checked ? "checked=true" : "checked=false"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1207 var par = jQuery(elem).parents(".jig-ncbigrid");//parent table |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1208 if (par) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1209 var suffix = PsiBelowThresh(par[0].id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1210 var tblID = "dscTable" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1211 var toolbarID = "descTblCtrl" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1212 var selElID = "slcNum" + suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1213 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1214 var currSelNum = parseInt($(selElID).innerHTML); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1215 var selNum = elem.checked ? currSelNum + 1 : currSelNum - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1216 enableDescrLinks(selNum, toolbarID, selElID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1217 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1218 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1219 /***Download code begin****/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1220 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1221 function initDownLoadPopup(dwnDialog) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1222 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1223 jQuery(dwnDialog).find("button").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1224 jQuery(this).bind("click", execDownLoad); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1225 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1226 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1227 jQuery(dwnDialog).bind("click", function(e) { e.stopPropagation(); }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1228 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1229 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1230 function initDescDownLoad() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1231 initDownLoadPopup($("dsDownload")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1232 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1233 if ($("psiw") && utils.hasClass($("psiw"), "shown")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1234 initDownLoadPopup($("dsDownload_psiw")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1235 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1236 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1237 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1238 function initAlignDownLoad(navObj) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1239 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1240 var seqID = navObj.seqID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1241 var dwnDialog = $("dlgDwnl_" + seqID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1242 jQuery(dwnDialog).find("button").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1243 jQuery(this).bind("click", execDownLoad); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1244 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1245 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1246 var dwnFSTW = $("dwFST_" + seqID);//whole seq |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1247 var dwnFSTAl = $("dwFSTAl_" + seqID);//aligned regions |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1248 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1249 if(dwnFSTW) dwnFSTW.setAttribute("seqfsta", navObj.currSeqID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1250 if(dwnFSTAl) dwnFSTAl.setAttribute("seqfsta", navObj.currSeqID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1251 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1252 jQuery(dwnDialog).bind("click", function(e) { e.stopPropagation(); }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1253 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1254 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1255 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1256 function execDownLoad(e) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1257 if (!utils.hasClass(this, "cnc")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1258 par = utils.getParent(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1259 dwnDialog = utils.getParent(par); //parent dialog with popDl class |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1260 var descr = (this.id == "dw_cont" || this.id == "dw_cont_psiw") ? true : false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1261 jQuery(dwnDialog).find("input").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1262 if (this.checked) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1263 submitDownLoad(this, descr); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1264 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1265 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1266 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1267 jQuery(document.body).click(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1268 utils.preventDefault(e); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1269 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1270 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1271 function submitDownLoad(radioElem, descr) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1272 var toolURL = radioElem.getAttribute("url"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1273 if (toolURL) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1274 if (descr) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1275 var getGi = radioElem.getAttribute("getGi"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1276 getGi = (getGi) ? true : false; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1277 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1278 var tblID = "dscTable"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1279 var suffix = PsiBelowThresh(radioElem.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1280 tblID += suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1281 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1282 $("selDnSeqs").value = createSelseqString(tblID,getGi); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1283 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1284 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1285 var seqfsta = radioElem.getAttribute("seqfsta"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1286 $("selDnSeqs").value = (seqfsta) ? seqfsta : radioElem.getAttribute("getGi"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1287 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1288 var addParams = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1289 if (radioElem.getAttribute("addParam")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1290 addParams = addDwnlParams(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1291 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1292 var submitName = radioElem.getAttribute("sbName") |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1293 $("selDnSeqs").name = (submitName) ? submitName : "ALIGN_SEQ_LIST"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1294 $("dwdlSubmit").action = toolURL + addParams; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1295 $("dwdlSubmit").submit(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1296 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1297 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1298 var sbFunction = radioElem.getAttribute("sbFunc"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1299 if (sbFunction) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1300 eval(sbFunction + "(radioElem, descr)"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1301 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1302 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1303 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1304 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1305 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1306 function initDownLoadFSTA(radioElem, descr) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1307 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1308 if (descr) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1309 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1310 var tblID = "dscTable"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1311 var suffix = PsiBelowThresh(radioElem.id); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1312 tblID += suffix; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1313 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1314 $("sbmtFASTA").ALIGN_SEQ_LIST.value = createSelseqString(tblID,false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1315 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1316 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1317 $("sbmtFASTA").ALIGN_SEQ_LIST.value = radioElem.getAttribute("seqfsta"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1318 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1319 $("sbmtFASTA").DOWNLOAD_TYPE.value = radioElem.getAttribute("fstaDWType"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1320 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1321 $("sbmtFASTA").DATABASE.value = getHiddenFieldVal("DATABASE"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1322 if ($("useAlignDB") && $("useAlignDB").value == "true") {//temp checkbox |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1323 var batchID = document.getElementsByName("ALIGNDB_BATCH_ID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1324 if (batchID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1325 $("sbmtFASTA").ALIGNDB_BATCH_ID.value = getHiddenFieldVal("ALIGNDB_BATCH_ID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1326 $("sbmtFASTA").ALIGNDB_MASTER_ALIAS.value = getHiddenFieldVal("ALIGNDB_MASTER_ALIAS"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1327 $("sbmtFASTA").ALIGNDB_CGI_HOST.value = getHiddenFieldVal("ALIGNDB_CGI_HOST"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1328 $("sbmtFASTA").ALIGNDB_CGI_PATH.value = getHiddenFieldVal("ALIGNDB_CGI_PATH"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1329 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1330 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1331 $("sbmtFASTA").submit(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1332 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1333 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1334 function createSelseqString(tblID,getGi) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1335 var selSeqs = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1336 jQuery($(tblID)).find("input[type='checkbox'].cb").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1337 if (jQuery(this)[0].checked) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1338 if (selSeqs != "") selSeqs += ","; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1339 if (getGi) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1340 selSeqs += jQuery(this)[0].value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1341 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1342 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1343 var linkID = jQuery(this)[0].id.replace("chk", "deflnDesc"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1344 selSeqs += $(linkID).getAttribute("seqFSTA"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1345 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1346 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1347 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1348 return selSeqs; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1349 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1350 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1351 /***Download code end****/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1352 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1353 /***Init navigation code begin **/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1354 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1355 function initNavigation(navObj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1356 initNextAlnLink(navObj, true); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1357 initNextAlnLink(navObj, false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1358 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1359 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1360 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1361 function initNavInfo(navObj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1362 var currInd = parseInt($("dtr_" + navObj.seqID).getAttribute("ind")); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1363 nextInd = currInd + 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1364 prevInd = currInd - 1; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1365 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1366 navObj.currSeqID = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1367 navObj.nextSeqID = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1368 navObj.prevSeqID = ""; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1369 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1370 if ($("deflnDesc_" + nextInd)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1371 navObj.nextSeqID = $("deflnDesc_" + nextInd).getAttribute("accs"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1372 if(navObj.nextSeqID =="") navObj.nextSeqID = $("deflnDesc_" + nextInd).getAttribute("seqFSTA"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1373 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1374 if ($("deflnDesc_" + prevInd)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1375 navObj.prevSeqID = $("deflnDesc_" + prevInd).getAttribute("accs"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1376 if (navObj.prevSeqID == "") navObj.prevSeqID = $("deflnDesc_" + prevInd).getAttribute("seqFSTA"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1377 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1378 if ($("deflnDesc_" + currInd)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1379 navObj.currSeqID = $("deflnDesc_" + currInd).getAttribute("seqFSTA"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1380 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1381 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1382 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1383 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1384 function initNextAlnLink(navObj, next) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1385 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1386 var nextLinkEl = (next) ? $("alnNxt_" + navObj.seqID) : $("alnPrv_" + navObj.seqID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1387 var nextSeqid = (next) ? navObj.nextSeqID : navObj.prevSeqID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1388 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1389 if (nextLinkEl) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1390 if (nextSeqid != "") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1391 var text = (next) ? "next" : "previous"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1392 nextLinkEl.setAttribute("title", "Go to " + text + " alignment for " + nextSeqid); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1393 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1394 else { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1395 nextLinkEl.setAttribute("disabled", "disabled"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1396 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1397 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1398 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1399 function scan(link) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1400 var init = link.getAttribute("init"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1401 if (!init) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1402 ncbi.sg.scanLinks(link); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1403 link.setAttribute("init","on"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1404 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1405 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1406 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1407 function initWidth(seqID) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1408 var lineLengthElem = $("FormatForm").LINE_LENGTH; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1409 var lineLength = parseInt(lineLengthElem[lineLengthElem.selectedIndex].value); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1410 if (parseInt(lineLengthElem.getAttribute("defval")) == lineLength) return; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1411 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1412 var relWidth = (lineLength > 90) ? "12%" : "15%"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1413 var charWidth = (navigator.userAgent.match(/ie/i)) ? 8 : 7; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1414 lineLength = (lineLength + parseInt(17)) * charWidth; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1415 var width = lineLength + "px"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1416 jQuery($("alnAll_" + seqID)).find("div.dflLnk").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1417 jQuery(this).css("width", width); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1418 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1419 jQuery($("alnAll_" + seqID)).find("table.alnParams").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1420 jQuery(this).css("width", width); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1421 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1422 jQuery($("relInf_" + seqID)).css("width", relWidth); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1423 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1424 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1425 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1426 /***Init navigation code end **/ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1427 function initAlignBatch(seqID) |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1428 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1429 var navObj = new Object(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1430 navObj.seqID = seqID; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1431 initNavInfo(navObj); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1432 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1433 initAlignDownLoad(navObj); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1434 initNavigation(navObj); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1435 ncbi.sg.scanLinks($("alnNxt_" + seqID)); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1436 ncbi.sg.scanLinks($("alnPrv_" + seqID)); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1437 if ($("serviceType").value == "vecscreen") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1438 utils.addClass($("alnDsc_" + seqID), "hidden"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1439 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1440 ncbi.sg.scanLinks($("alnDwnld_" + seqID)); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1441 jQuery($("csLinks_" + seqID)).find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1442 ncbi.sg.scanLinks(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1443 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1444 jQuery($("relInf_" + seqID)).find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1445 ncbi.sg.scanLinks(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1446 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1447 jQuery($("rng_" + seqID)).find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1448 ncbi.sg.scanLinks(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1449 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1450 jQuery($("dln_" + seqID)).find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1451 ncbi.sg.scanLinks(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1452 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1453 initWidth(seqID); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1454 /* |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1455 jQuery($("alnHdr_" + seqID)).find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1456 ncbi.sg.scanLinks(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1457 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1458 jQuery($("aln_" + seqID)).find("a").each(function(index) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1459 ncbi.sg.scanLinks(this); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1460 }); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1461 */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1462 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1463 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1464 function SaveConfigTable() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1465 blastUrl = "fmtsave.cgi"; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1466 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1467 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1468 var rp = new RemoteDataProvider(blastUrl); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1469 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1470 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1471 rp.onSuccess = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1472 //alert("success"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1473 }; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1474 rp.onError = function(obj) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1475 //alert("error"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1476 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1477 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1478 var program = getHiddenFieldVal("PROGRAM"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1479 var rid = getHiddenFieldVal("RID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1480 var blastSpec = getHiddenFieldVal("BLAST_SPEC"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1481 var params = "CMD=Get&RID=" + rid + "&ViewReport=on&PROGRAM=" + program + "&SAVE_INDV_FRM_OPTION=on&CONFIG_DESCR=" + $("cfcDsSave").value; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1482 if(blastSpec) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1483 params += "&BLAST_SPEC=" + blastSpec; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1484 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1485 rp.Request(params,"POST"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1486 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1487 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1488 function removeRID() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1489 var rid = document.getElementsByName("RID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1490 for (var i = 0; i <= rid.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1491 jQuery(rid[i]).remove(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1492 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1493 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1494 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1495 function initAdvancedView() |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1496 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1497 if ($("dsConfig")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1498 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1499 var alnView = getHiddenFieldVal("ALIGNMENT_VIEW"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1500 if (alnView == "Pairwise" || alnView == "PairwiseWithIdentities") { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1501 var rid = getHiddenFieldVal("RID"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1502 ReadNextSeqAligns(0, 5); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1503 g_alignViewPos = $("alignView").getBoundingClientRect().top; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1504 utils.addEvent(window, "scroll", checkAutoAlignLoad, false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1505 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1506 list = $("phiPtInd"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1507 if (list) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1508 utils.addEvent(list, "change", GetPatternLocResults, false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1509 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1510 initDescConfig(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1511 initDescSelect(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1512 initDescDownLoad(); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1513 if ($("psiInp")) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1514 var nextIter = document.getElementsByName("NEXT_I"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1515 for (var i = 0; i < nextIter.length; i++) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1516 utils.addEvent(nextIter[i], "click", removeRID, false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1517 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1518 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1519 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1520 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1521 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1522 //takes care of jQuery calls to elements that have dots in id like id= "SRA34456.3.4" |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1523 function initjQry() |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1524 { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1525 var oldCreate = jQuery.ui.ncbipopper.prototype._create; |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1526 jQuery.ui.ncbipopper.prototype._create = function() { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1527 var destSelector = this.options.destSelector || this.options.sourceSelector || this.element.prop("hash"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1528 this.options.destSelector = destSelector.replace(/\./g, "\\."); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1529 oldCreate.apply(this, arguments); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1530 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1531 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1532 utils.addEvent(window, |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1533 "load", initAdvancedView, |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1534 false); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1535 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1536 initjQry() |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1537 |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1538 /* If user agent has "safari" in it, include safari-specific stylesheet. */ |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1539 if (navigator.userAgent.match(/ie/i)) { |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1540 document.write("<link rel='stylesheet' type='text/css' href='css/ie-descriptions.css' media='screen'/>"); |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1541 } |
bad241dc701f
add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff
changeset
|
1542 /*****************************new code end*********************************************************************/ |