[Bio] / RAST / Upload3p2.tt2 Repository:
ViewVC logotype

Annotation of /RAST/Upload3p2.tt2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (view) (download)

1 : olson 1.1 [% form.jshead %]
2 : olson 1.3 <script type="text/javascript">
3 :     function lookup_taxid(form)
4 :     {
5 :     var id = form.elements['taxonomy_id'].value;
6 :    
7 :     var http_request;
8 :     var agt=navigator.userAgent.toLowerCase();
9 :     if (agt.indexOf("msie") != -1) {
10 :     no_load_image = 1;
11 :     try {
12 :     http_request = new ActiveXObject("Microsoft.XMLHTTP");
13 :     }
14 :     catch (err) {
15 :     alert('You must enable ActiveX in your security settings to view all features of this page.');
16 :     }
17 :     } else {
18 :     http_request = new XMLHttpRequest();
19 :     http_request.overrideMimeType('text/plain');
20 :     }
21 :    
22 :     var parameters = "";
23 :    
24 :     parameters = parameters + "tax_id=" + encodeURIComponent(id);
25 :    
26 :     var script_url = form.elements['ajax_url'].value;
27 :     http_request.onreadystatechange = function() { ajax_result(http_request, id, form); };
28 :    
29 :     form.elements['lookup'].value = "Lookup in progress...";
30 :     http_request.open('POST', script_url, true);
31 :     http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
32 :     http_request.send(parameters);
33 :     }
34 :    
35 :     function ajax_result (http_request, tax_id, form) {
36 :     if (http_request.readyState == 4) {
37 :     // alert("state=" +http_request.readyState + " " + http_request.responseText);
38 :     form.elements['lookup'].value = "Look up taxonomy ID at NCBI.";
39 : olson 1.4 var obj;
40 :     try {
41 :     obj = JSON.parse(http_request.responseText);
42 :     } catch (err)
43 :     {
44 :     obj = null;
45 :     }
46 : olson 1.3 if (obj == null || obj.domain == "")
47 :     {
48 :     alert("Could not find taxonomy id " + tax_id + " at NCBI.");
49 :     return;
50 :     }
51 :     set_radio(form, "domain", obj.domain);
52 :     set_form_field(form, "taxonomy_string", obj.taxonomy);
53 :     set_radio(form, "genetic_code", obj.genetic_code);
54 :     set_form_field(form, "genus", obj.genus);
55 :     set_form_field(form, "species", obj.species);
56 :     set_form_field(form, "strain", obj.strain);
57 :     }
58 :     }
59 :    
60 :     function set_form_field(form, name, val)
61 :     {
62 :     var elt = form.elements[name];
63 :     if (elt == null)
64 :     {
65 :     return;
66 :     }
67 :    
68 :     elt.value = val;
69 :     }
70 :    
71 :     function set_radio(form, name, val) {
72 :     var elt = form.elements[name];
73 :     if (elt == null)
74 :     {
75 :     return;
76 :     }
77 :    
78 :     for (var loop = 0; loop < elt.length; loop++)
79 :     {
80 :     if (elt[loop].value == val)
81 :     {
82 :     elt[loop].checked = 1;
83 :     }
84 :     else
85 :     {
86 :     elt[loop].checked = 0;
87 :     }
88 :     }
89 :     }
90 :    
91 :     </script>
92 :    
93 : olson 1.1 <h1> Upload a Genome </h1>
94 :     <h2>Review genome data</h2>
95 :     <p>
96 :     <strong>We have analyzed your upload and have computed the following information.</strong>
97 :     </p>
98 :     [% statistics %]
99 :    
100 :     <p>
101 :     <strong>Please enter or verify the following information about this organism:</strong>
102 :     </p>
103 :    
104 :     [% form.start %]
105 : olson 1.3 [% form.field.ajax_url.field %]
106 : olson 1.1 <fieldset>
107 :     <legend>Required information:</legend>
108 :     <div id="organism">
109 :     <table>
110 :     <tr>
111 : olson 1.7 <td></td>
112 :     <td> <i>
113 :     If you plan on submitting this genome to
114 :     <a href="http://patricbrc.org/">PATRIC</a> you will need to provide the
115 :     most descriptive NCBI taxonomic grouping possible. If you leave this field
116 :     blank we will assign a meaningless taxonomic identifier and the genome will
117 :     not be suitable for submission to PATRIC. We discuss the motivation for
118 :     and process of submitting your genome to PATRIC <a href="Html/PATRIC_Submission.html">in this document</a>.</i>
119 :     </td>
120 : olson 1.1 </tr>
121 :     <tr>
122 :     <td></td>
123 : olson 1.7 <td> You may search for the taxonomy id for your organism by using the search
124 :     facilities at the
125 : olson 1.1 <a target="_blank" href="http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/">
126 :     NCBI taxonomy browser</a>. </td>
127 :     </tr>
128 : olson 1.7 <tr><td> <strong>Taxonomy ID:</strong> </td><td>[% form.field.taxonomy_id.field %] <input type="button" onclick="lookup_taxid(this.form)" name="lookup" value="Look up taxonomy ID at NCBI."></td></tr>
129 : olson 1.1 <tr>
130 : olson 1.3 <td><strong>Taxonomy string:</strong></td>
131 :     <td>[% form.field.taxonomy_string.field %] </td>
132 :     </tr>
133 :     <tr>
134 : olson 1.1 <td><strong>Domain:</strong></td>
135 :     <td>[% form.field.domain.field %] </td>
136 :     </tr>
137 :     <tr>
138 :     <td> <strong>Genus:</strong></td>
139 :     <td> [% form.field.genus.field %] </td>
140 :     </tr>
141 :     <tr>
142 :     <td> <strong>Species:</strong></td>
143 :     <td> [% form.field.species.field %] </td>
144 :     </tr>
145 :     <tr>
146 :     <td> <strong>Strain:</strong></td>
147 :     <td> [% form.field.strain.field %] </td>
148 :     </tr>
149 :     <tr>
150 : olson 1.6 <td> <strong><a target="_blank" href="http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi">Genetic Code:</a></strong></td>
151 : olson 1.1 <td> [% form.field.genetic_code.field %] </td>
152 :     </tr>
153 :     </table>
154 :     </div>
155 :     </fieldset>
156 :     [% form.submit %]
157 :     [% form.end %]
158 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3