annotate test-data/dreme2.html @ 1:793225b11202 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
author iuc
date Wed, 25 Apr 2018 12:13:08 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1 <!DOCTYPE HTML>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2 <html>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3 <head>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4 <meta charset="UTF-8">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5 <title>DREME</title>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
7 // @JSON_VAR data
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
8 var data = {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
9 "program": "dreme",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
10 "version": "4.12.0",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
11 "release": "Tue Jun 27 16:22:50 2017 -0700",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
12 "cmd": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
13 "dreme", "-oc", "dreme_out_adv", "-rna", "-norc", "-p",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
14 "dreme_test_sites.fa", "-e", "0.00001", "-mink", "4", "-maxk", "10"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
15 ],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
16 "options": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
17 "revcomp": false,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
18 "ngen": 100,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
19 "add_pv_thresh": 0.01,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
20 "seed": 1,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
21 "stop": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
22 "evalue": "1e-05"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
23 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
24 },
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
25 "alphabet": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
26 "name": "RNA",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
27 "like": "rna",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
28 "ncore": 4,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
29 "symbols": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
30 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
31 "symbol": "A",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
32 "name": "Adenine",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
33 "colour": "CC0000"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
34 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
35 "symbol": "C",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
36 "name": "Cytosine",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
37 "colour": "0000CC"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
38 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
39 "symbol": "G",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
40 "name": "Guanine",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
41 "colour": "FFB300"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
42 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
43 "symbol": "U",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
44 "aliases": "T",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
45 "name": "Uracil",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
46 "colour": "008000"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
47 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
48 "symbol": "N",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
49 "aliases": "X.",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
50 "name": "Any base",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
51 "equals": "ACGU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
52 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
53 "symbol": "V",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
54 "name": "Not U",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
55 "equals": "ACG"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
56 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
57 "symbol": "H",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
58 "name": "Not G",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
59 "equals": "ACU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
60 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
61 "symbol": "D",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
62 "name": "Not C",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
63 "equals": "AGU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
64 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
65 "symbol": "B",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
66 "name": "Not A",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
67 "equals": "CGU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
68 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
69 "symbol": "M",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
70 "name": "Amino",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
71 "equals": "AC"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
72 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
73 "symbol": "R",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
74 "name": "Purine",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
75 "equals": "AG"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
76 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
77 "symbol": "W",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
78 "name": "Weak",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
79 "equals": "AU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
80 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
81 "symbol": "S",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
82 "name": "Strong",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
83 "equals": "CG"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
84 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
85 "symbol": "Y",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
86 "name": "Pyrimidine",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
87 "equals": "CU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
88 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
89 "symbol": "K",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
90 "name": "Keto",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
91 "equals": "GU"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
92 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
93 ]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
94 },
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
95 "background": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
96 "freqs": [0.221, 0.245, 0.221, 0.312]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
97 },
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
98 "sequence_db": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
99 "name": "dreme test sites",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
100 "file": "dreme_test_sites.fa",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
101 "lmod": "Thu Apr 19 19:09:45 CEST 2018",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
102 "count": 1000
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
103 },
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
104 "control_db": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
105 "name": "shuffled positive sequences",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
106 "from": "shuffled",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
107 "count": 1000,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
108 "freqs": [0.221, 0.245, 0.221, 0.312]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
109 },
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
110 "motifs": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
111 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
112 "db": 0,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
113 "id": "UUYUCY",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
114 "alt": "DREME-1",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
115 "len": 6,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
116 "nsites": 459,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
117 "evalue": "3.3e-013",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
118 "p": 387,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
119 "n": 210,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
120 "pvalue": "2.6e-018",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
121 "unerased_evalue": "3.3e-013",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
122 "pwm": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
123 [0.000000, 0.000000, 0.000000, 1.000000],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
124 [0.000000, 0.000000, 0.000000, 1.000000],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
125 [0.000000, 0.294118, 0.000000, 0.705882],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
126 [0.000000, 0.000000, 0.000000, 1.000000],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
127 [0.000000, 1.000000, 0.000000, 0.000000],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
128 [0.000000, 0.474946, 0.000000, 0.525054]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
129 ],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
130 "matches": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
131 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
132 "seq": "UUUUCC",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
133 "p": 147,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
134 "n": 75,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
135 "pvalue": "1.8e-007",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
136 "evalue": "2.2e-002"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
137 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
138 "seq": "UUUUCU",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
139 "p": 155,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
140 "n": 94,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
141 "pvalue": "2.2e-005",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
142 "evalue": "2.8e+000"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
143 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
144 "seq": "UUCUCU",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
145 "p": 94,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
146 "n": 51,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
147 "pvalue": "1.3e-004",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
148 "evalue": "1.7e+001"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
149 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
150 "seq": "UUCUCC",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
151 "p": 75,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
152 "n": 42,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
153 "pvalue": "1.1e-003",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
154 "evalue": "1.4e+002"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
155 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
156 ]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
157 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
158 "db": 0,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
159 "id": "YAGG",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
160 "alt": "DREME-2",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
161 "len": 4,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
162 "nsites": 793,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
163 "evalue": "1.4e-011",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
164 "p": 600,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
165 "n": 416,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
166 "pvalue": "1.1e-016",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
167 "unerased_evalue": "6.3e-012",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
168 "pwm": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
169 [0.000000, 0.692308, 0.000000, 0.307692],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
170 [1.000000, 0.000000, 0.000000, 0.000000],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
171 [0.000000, 0.000000, 1.000000, 0.000000],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
172 [0.000000, 0.000000, 1.000000, 0.000000]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
173 ],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
174 "matches": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
175 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
176 "seq": "CAGG",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
177 "p": 441,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
178 "n": 304,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
179 "pvalue": "1.5e-010",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
180 "evalue": "1.8e-005"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
181 }, {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
182 "seq": "UAGG",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
183 "p": 232,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
184 "n": 165,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
185 "pvalue": "1.1e-004",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
186 "evalue": "1.3e+001"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
187 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
188 ]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
189 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
190 ],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
191 "runtime": {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
192 "host": "ThinkPad-T450s",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
193 "when": "Tue Apr 24 18:44:36 CEST 2018",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
194 "cpu": 18.17,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
195 "real": 18.17,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
196 "stop": "evalue"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
197 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
198 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
199 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
200 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
201 var site_url = "http://meme-suite.org";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
202 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
203 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
204
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
205 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
206 * $
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
207 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
208 * Shorthand function for getElementById
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
209 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
210 function $(el) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
211 return document.getElementById(el);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
212 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
213
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
214
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
215 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
216 * See http://stackoverflow.com/a/5450113/66387
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
217 * Does string multiplication like the perl x operator.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
218 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
219 function string_mult(pattern, count) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
220 if (count < 1) return '';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
221 var result = '';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
222 while (count > 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
223 if (count & 1) result += pattern;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
224 count >>= 1, pattern += pattern;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
225 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
226 return result + pattern;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
227 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
228
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
229 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
230 * See http://stackoverflow.com/questions/814613/how-to-read-get-data-from-a-url-using-javascript
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
231 * Slightly modified with information from
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
232 * https://developer.mozilla.org/en/DOM/window.location
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
233 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
234 function parse_params() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
235 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
236 var search, queryStart, queryEnd, query, params, nvPairs, i, nv, n, v;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
237 search = window.location.search;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
238 queryStart = search.indexOf("?") + 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
239 queryEnd = search.indexOf("#") + 1 || search.length + 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
240 query = search.slice(queryStart, queryEnd - 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
241
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
242 if (query === search || query === "") return {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
243
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
244 params = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
245 nvPairs = query.replace(/\+/g, " ").split("&");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
246
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
247 for (i = 0; i < nvPairs.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
248 nv = nvPairs[i].split("=");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
249 n = decodeURIComponent(nv[0]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
250 v = decodeURIComponent(nv[1]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
251 // allow a name to be used multiple times
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
252 // storing each value in the array
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
253 if (!(n in params)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
254 params[n] = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
255 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
256 params[n].push(nv.length === 2 ? v : null);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
257 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
258 return params;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
259 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
260
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
261 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
262 * coords
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
263 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
264 * Calculates the x and y offset of an element.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
265 * From http://www.quirksmode.org/js/findpos.html
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
266 * with alterations to take into account scrolling regions
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
267 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
268 function coords(elem) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
269 var myX = myY = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
270 if (elem.getBoundingClientRect) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
271 var rect;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
272 rect = elem.getBoundingClientRect();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
273 myX = rect.left + ((typeof window.pageXOffset !== "undefined") ?
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
274 window.pageXOffset : document.body.scrollLeft);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
275 myY = rect.top + ((typeof window.pageYOffset !== "undefined") ?
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
276 window.pageYOffset : document.body.scrollTop);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
277 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
278 // this fall back doesn't properly handle absolutely positioned elements
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
279 // inside a scrollable box
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
280 var node;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
281 if (elem.offsetParent) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
282 // subtract all scrolling
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
283 node = elem;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
284 do {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
285 myX -= node.scrollLeft ? node.scrollLeft : 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
286 myY -= node.scrollTop ? node.scrollTop : 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
287 } while (node = node.parentNode);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
288 // this will include the page scrolling (which is unwanted) so add it back on
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
289 myX += (typeof window.pageXOffset !== "undefined") ? window.pageXOffset : document.body.scrollLeft;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
290 myY += (typeof window.pageYOffset !== "undefined") ? window.pageYOffset : document.body.scrollTop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
291 // sum up offsets
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
292 node = elem;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
293 do {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
294 myX += node.offsetLeft;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
295 myY += node.offsetTop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
296 } while (node = node.offsetParent);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
297 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
298 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
299 return [myX, myY];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
300 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
301
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
302 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
303 * position_popup
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
304 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
305 * Positions a popup relative to an anchor element.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
306 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
307 * The avaliable positions are:
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
308 * 0 - Centered below the anchor.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
309 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
310 function position_popup(anchor, popup, position) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
311 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
312 var a_x, a_y, a_w, a_h, p_x, p_y, p_w, p_h;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
313 var a_xy, spacer, margin, scrollbar, page_w;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
314 // define constants
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
315 spacer = 5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
316 margin = 15;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
317 scrollbar = 15;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
318 // define the positions and widths
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
319 a_xy = coords(anchor);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
320 a_x = a_xy[0];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
321 a_y = a_xy[1];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
322 a_w = anchor.offsetWidth;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
323 a_h = anchor.offsetHeight;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
324 p_w = popup.offsetWidth;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
325 p_h = popup.offsetHeight;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
326 page_w = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
327 if (window.innerWidth) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
328 page_w = window.innerWidth;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
329 } else if (document.body) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
330 page_w = document.body.clientWidth;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
331 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
332 // check the position type is defined
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
333 if (typeof position !== "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
334 position = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
335 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
336 // calculate the popup position
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
337 switch (position) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
338 case 1:
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
339 p_x = a_x + a_w + spacer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
340 p_y = a_y + (a_h / 2) - (p_h / 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
341 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
342 case 0:
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
343 default:
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
344 p_x = a_x + (a_w / 2) - (p_w / 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
345 p_y = a_y + a_h + spacer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
346 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
347 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
348 // constrain the popup position
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
349 if (p_x < margin) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
350 p_x = margin;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
351 } else if (page_w != null && (p_x + p_w) > (page_w - margin - scrollbar)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
352 p_x = page_w - margin - scrollbar - p_w;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
353 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
354 if (p_y < margin) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
355 p_y = margin;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
356 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
357 // position the popup
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
358 popup.style.left = p_x + "px";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
359 popup.style.top = p_y + "px";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
360 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
361
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
362 function lookup_help_popup(popup_id) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
363 var _body, pop, info;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
364 pop = document.getElementById(popup_id);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
365 if (pop == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
366 _body = document.getElementsByTagName("body")[0];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
367 pop = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
368 pop.className = "pop_content";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
369 pop.id = popup_id;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
370 pop.style.backgroundColor = "#FFC";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
371 pop.style.borderColor = "black";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
372 info = document.createElement("p");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
373 info.style.fontWeight = "bold";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
374 info.appendChild(document.createTextNode("Error: No popup for topic \"" + popup_id + "\"."));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
375 pop.appendChild(info);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
376 // this might cause problems with the menu, but as this only happens
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
377 // when something is already wrong I don't think that's too much of a problem
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
378 _body.insertBefore(pop, _body.firstChild);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
379 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
380 if (document.getElementsByTagName('body')[0].hasAttribute("data-autobtns")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
381 if (!/\bauto_buttons\b/.test(pop.className)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
382 pop.className += " auto_buttons";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
383 var back_btn_sec = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
384 back_btn_sec.className = "nested_only pop_back_sec";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
385 var back_btn = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
386 back_btn.className = "pop_back";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
387 back_btn.appendChild(document.createTextNode("<< back"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
388 back_btn.addEventListener("click", function(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
389 help_return();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
390 }, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
391 back_btn_sec.appendChild(back_btn);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
392 pop.insertBefore(back_btn_sec, pop.firstChild);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
393 var close_btn_sec = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
394 close_btn_sec.className = "pop_close_sec";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
395 var close_btn = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
396 close_btn.className = "pop_close";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
397 close_btn.appendChild(document.createTextNode("close"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
398 close_btn.addEventListener("click", function(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
399 help_popup();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
400 }, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
401 close_btn_sec.appendChild(close_btn);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
402 pop.appendChild(close_btn_sec);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
403 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
404 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
405 return pop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
406 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
407
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
408 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
409 * help_popup
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
410 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
411 * Moves around help pop-ups so they appear
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
412 * below an activator.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
413 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
414 function help_popup(activator, popup_id) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
415 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
416 var pop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
417 // set default values
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
418 if (typeof help_popup.popup === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
419 help_popup.popup = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
420 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
421 if (typeof help_popup.activator === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
422 help_popup.activator = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
423 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
424 var last_pop = (help_popup.popup.length > 0 ? help_popup.popup[help_popup.popup.length - 1] : null);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
425 if (typeof(activator) == "undefined") { // no activator so hide
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
426 if (last_pop != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
427 last_pop.style.display = 'none';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
428 help_popup.popup = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
429 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
430 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
431 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
432 pop = lookup_help_popup(popup_id);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
433 if (pop == last_pop) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
434 if (activator == help_popup.activator) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
435 //hide popup (as we've already shown it for the current help button)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
436 last_pop.style.display = 'none';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
437 help_popup.popup = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
438 return; // toggling complete!
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
439 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
440 } else if (last_pop != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
441 //activating different popup so hide current one
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
442 last_pop.style.display = 'none';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
443 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
444 help_popup.popup = [pop];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
445 help_popup.activator = activator;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
446 toggle_class(pop, "nested", false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
447 //must make the popup visible to measure it or it has zero width
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
448 pop.style.display = 'block';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
449 position_popup(activator, pop);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
450 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
451
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
452 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
453 * help_refine
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
454 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
455 * Intended for links within a help popup. Stores a stack of state so
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
456 * you can go back.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
457 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
458 function help_refine(popup_id) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
459 if (help_popup.popup == null || help_popup.popup.length == 0 || help_popup.activator == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
460 throw new Error("Can not refine a help popup when one is not shown!");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
461 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
462 var pop = lookup_help_popup(popup_id);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
463 var last_pop = help_popup.popup[help_popup.popup.length - 1];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
464 if (pop == last_pop) return; // slightly odd, but no real cause for alarm
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
465 help_popup.popup.push(pop);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
466 toggle_class(pop, "nested", true);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
467 last_pop.style.display = "none";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
468 //must make the popup visible to measure it or it has zero width
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
469 pop.style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
470 position_popup(help_popup.activator, pop);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
471 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
472
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
473 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
474 * help_return
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
475 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
476 * Intended for links within a help popup. Stores a stack of state so
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
477 * you can go back.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
478 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
479 function help_return() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
480 if (help_popup.popup == null || help_popup.popup.length == 0 || help_popup.activator == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
481 throw new Error("Can not return to a earlier help popup when one is not shown!");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
482 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
483 var last_pop = help_popup.popup.pop();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
484 last_pop.style.display = "none";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
485 var pop = (help_popup.popup.length > 0 ? help_popup.popup[help_popup.popup.length - 1] : null);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
486 if (pop != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
487 toggle_class(pop, "nested", help_popup.popup.length > 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
488 pop.style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
489 position_popup(help_popup.activator, pop);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
490 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
491 help_popup.activator = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
492 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
493 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
494
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
495 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
496 * update_scroll_pad
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
497 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
498 * Creates padding at the bottom of the page to allow
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
499 * scrolling of anything into view.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
500 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
501 function update_scroll_pad() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
502 var page, pad;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
503 page = (document.compatMode === "CSS1Compat") ? document.documentElement : document.body;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
504 pad = $("scrollpad");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
505 if (pad === null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
506 pad = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
507 pad.id = 'scrollpad';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
508 document.getElementsByTagName('body')[0].appendChild(pad);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
509 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
510 pad.style.height = Math.abs(page.clientHeight - 100) + "px";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
511 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
512
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
513 function substitute_classes(node, remove, add) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
514 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
515 var list, all, i, cls, classes;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
516 list = node.className.split(/\s+/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
517 all = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
518 for (i = 0; i < list.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
519 if (list[i].length > 0) all[list[i]] = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
520 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
521 for (i = 0; i < remove.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
522 if (all.hasOwnProperty(remove[i])) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
523 delete all[remove[i]];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
524 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
525 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
526 for (i = 0; i < add.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
527 all[add[i]] = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
528 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
529 classes = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
530 for (cls in all) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
531 classes += cls + " ";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
532 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
533 node.className = classes;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
534 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
535
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
536 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
537 * toggle_class
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
538 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
539 * Adds or removes a class from the node. If the parameter 'enabled' is not
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
540 * passed then the existence of the class will be toggled, otherwise it will be
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
541 * included if enabled is true.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
542 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
543 function toggle_class(node, cls, enabled) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
544 var classes = node.className;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
545 var list = classes.replace(/^\s+/, '').replace(/\s+$/, '').split(/\s+/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
546 var found = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
547 for (var i = 0; i < list.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
548 if (list[i] == cls) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
549 list.splice(i, 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
550 i--;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
551 found = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
552 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
553 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
554 if (typeof enabled == "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
555 if (!found) list.push(cls);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
556 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
557 if (enabled) list.push(cls);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
558 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
559 node.className = list.join(" ");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
560 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
561
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
562 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
563 * find_child
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
564 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
565 * Searches child nodes in depth first order and returns the first it finds
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
566 * with the className specified.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
567 * TODO replace with querySelector
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
568 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
569 function find_child(node, className) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
570 var pattern;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
571 if (node == null || typeof node !== "object") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
572 return null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
573 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
574 if (typeof className === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
575 pattern = new RegExp("\\b" + className + "\\b");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
576 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
577 pattern = className;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
578 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
579 if (node.nodeType == Node.ELEMENT_NODE &&
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
580 pattern.test(node.className)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
581 return node;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
582 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
583 var result = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
584 for (var i = 0; i < node.childNodes.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
585 result = find_child(node.childNodes[i], pattern);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
586 if (result != null) break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
587 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
588 return result;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
589 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
590 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
591
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
592 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
593 * find_parent
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
594 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
595 * Searches parent nodes outwards from the node and returns the first it finds
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
596 * with the className specified.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
597 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
598 function find_parent(node, className) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
599 var pattern;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
600 pattern = new RegExp("\\b" + className + "\\b");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
601 do {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
602 if (node.nodeType == Node.ELEMENT_NODE &&
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
603 pattern.test(node.className)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
604 return node;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
605 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
606 } while (node = node.parentNode);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
607 return null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
608 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
609
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
610 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
611 * find_parent_tag
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
612 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
613 * Searches parent nodes outwards from the node and returns the first it finds
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
614 * with the tag name specified. HTML tags should be specified in upper case.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
615 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
616 function find_parent_tag(node, tag_name) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
617 do {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
618 if (node.nodeType == Node.ELEMENT_NODE && node.tagName == tag_name) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
619 return node;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
620 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
621 } while (node = node.parentNode);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
622 return null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
623 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
624
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
625 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
626 * __toggle_help
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
627 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
628 * Uses the 'topic' property of the this object to
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
629 * toggle display of a help topic.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
630 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
631 * This function is not intended to be called directly.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
632 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
633 function __toggle_help(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
634 if (!e) e = window.event;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
635 if (e.type === "keydown") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
636 if (e.keyCode !== 13 && e.keyCode !== 32) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
637 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
638 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
639 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
640 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
641 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
642
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
643 help_popup(this, this.getAttribute("data-topic"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
644 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
645
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
646 function setup_help_button(button) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
647 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
648 var topic;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
649 if (button.hasAttribute("data-topic")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
650 topic = button.getAttribute("data-topic");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
651 if (document.getElementById(topic) != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
652 button.tabIndex = "0"; // make keyboard selectable
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
653 button.addEventListener("click", function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
654 help_popup(button, topic);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
655 }, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
656 button.addEventListener("keydown", function(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
657 // toggle only on Enter or Spacebar, let other keys do their thing
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
658 if (e.keyCode !== 13 && e.keyCode !== 32) return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
659 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
660 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
661 help_popup(button, topic);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
662 }, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
663 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
664 button.style.visibility = "hidden";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
665 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
666 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
667 button.className += " active";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
668 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
669
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
670 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
671 * help_button
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
672 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
673 * Makes a help button for the passed topic.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
674 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
675 function help_button(topic) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
676 var btn = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
677 btn.className = "help";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
678 btn.setAttribute("data-topic", topic);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
679 setup_help_button(btn);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
680 return btn;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
681 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
682
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
683 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
684 * prepare_download
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
685 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
686 * Sets the attributes of a link to setup a file download using the given content.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
687 * If no link is provided then create one and click it.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
688 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
689 function prepare_download(content, mimetype, filename, link) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
690 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
691 // if no link is provided then create one and click it
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
692 var click_link = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
693 if (!link) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
694 link = document.createElement("a");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
695 click_link = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
696 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
697 try {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
698 // Use a BLOB to convert the text into a data URL.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
699 // We could do this manually with a base 64 conversion.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
700 // This will only be supported on modern browsers,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
701 // hence the try block.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
702 var blob = new Blob([content], {type: mimetype});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
703 var reader = new FileReader();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
704 reader.onloadend = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
705 // If we're lucky the browser will also support the download
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
706 // attribute which will let us suggest a file name to save the link.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
707 // Otherwise it is likely that the filename will be unintelligible.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
708 link.setAttribute("download", filename);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
709 link.href = reader.result;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
710 if (click_link) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
711 // must add the link to click it
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
712 document.body.appendChild(link);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
713 link.click();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
714 document.body.removeChild(link);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
715 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
716 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
717 reader.readAsDataURL(blob);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
718 } catch (error) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
719 if (console && console.log) console.log(error);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
720 // probably an old browser
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
721 link.href = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
722 link.visible = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
723 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
724 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
725
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
726 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
727 * add_cell
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
728 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
729 * Add a cell to the table row.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
730 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
731 function add_cell(row, node, cls, click_action) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
732 var cell = row.insertCell(row.cells.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
733 if (node) cell.appendChild(node);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
734 if (cls && cls !== "") cell.className = cls;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
735 if (click_action) cell.addEventListener("click", click_action, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
736 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
737
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
738 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
739 * add_header_cell
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
740 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
741 * Add a header cell to the table row.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
742 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
743 function add_header_cell(row, node, help_topic, cls, colspan) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
744 var th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
745 if (node) th.appendChild(node);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
746 if (help_topic && help_topic !== "") th.appendChild(help_button(help_topic));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
747 if (cls && cls !== "") th.className = cls;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
748 if (typeof colspan == "number" && colspan > 1) th.colSpan = colspan;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
749 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
750 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
751
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
752 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
753 * add_text_cell
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
754 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
755 * Add a text cell to the table row.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
756 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
757 function add_text_cell(row, text, cls, action) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
758 var node = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
759 if (typeof(text) != 'undefined') node = document.createTextNode(text);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
760 add_cell(row, node, cls, action);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
761 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
762
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
763 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
764 * add_text_header_cell
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
765 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
766 * Add a text header cell to the table row.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
767 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
768 function add_text_header_cell(row, text, help_topic, cls, action, colspan) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
769 var node = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
770 if (typeof(text) != 'undefined') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
771 var nbsp = (help_topic ? "\u00A0" : "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
772 var str = "" + text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
773 var parts = str.split(/\n/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
774 if (parts.length === 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
775 if (action) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
776 node = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
777 node.appendChild(document.createTextNode(str + nbsp));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
778 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
779 node = document.createTextNode(str + nbsp);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
780 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
781 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
782 node = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
783 for (var i = 0; i < parts.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
784 if (i !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
785 node.appendChild(document.createElement("br"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
786 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
787 node.appendChild(document.createTextNode(parts[i]));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
788 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
789 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
790 if (action) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
791 node.addEventListener("click", action, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
792 node.style.cursor = "pointer";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
793 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
794 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
795 add_header_cell(row, node, help_topic, cls, colspan);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
796 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
797
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
798 function setup_help() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
799 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
800 var help_buttons, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
801 help_buttons = document.querySelectorAll(".help:not(.active)");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
802 for (i = 0; i < help_buttons.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
803 setup_help_button(help_buttons[i]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
804 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
805 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
806
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
807 function setup_scrollpad() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
808 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
809 if (document.getElementsByTagName('body')[0].hasAttribute("data-scrollpad") && document.getElementById("scrollpad") == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
810 window.addEventListener("resize", update_scroll_pad, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
811 update_scroll_pad();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
812 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
813 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
814
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
815 // anon function to avoid polluting global scope
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
816 (function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
817 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
818 window.addEventListener("load", function load(evt) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
819 window.removeEventListener("load", load, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
820 setup_help();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
821 setup_scrollpad();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
822 }, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
823 })();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
824
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
825 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
826 * make_link
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
827 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
828 * Creates a text node and if a URL is specified it surrounds it with a link.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
829 * If the URL doesn't begin with "http://" it automatically adds it, as
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
830 * relative links don't make much sense in this context.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
831 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
832 function make_link(text, url) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
833 var textNode = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
834 var link = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
835 if (typeof text !== "undefined" && text !== null) textNode = document.createTextNode(text);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
836 if (typeof url === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
837 if (url.indexOf("//") == -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
838 url = "http://" + url;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
839 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
840 link = document.createElement('a');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
841 link.href = url;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
842 if (textNode) link.appendChild(textNode);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
843 return link;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
844 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
845 return textNode;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
846 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
847 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
848 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
849 function motif_logo_template(inputs) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
850 function _input(name) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
851 if (typeof inputs[name] === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
852 throw new Error("Missing template variable: " + name);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
853 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
854 return inputs[name];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
855 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
856 return (
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
857 "%!PS-Adobe-3.0 EPSF-3.0\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
858 "%%Title: Sequence Logo : " + _input("TITLE") + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
859 "%%Creator: " + _input("CREATOR") + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
860 "%%CreationDate: " + _input("CREATIONDATE") + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
861 "%%BoundingBox: 0 0 " + _input("BOUNDINGWIDTH") + " " + _input("BOUNDINGHEIGHT") + " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
862 "%%Pages: 0\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
863 "%%DocumentFonts: \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
864 "%%EndComments\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
865 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
866 "% ---- CONSTANTS ----\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
867 "\/cmfactor 72 2.54 div def % defines points -> cm conversion\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
868 "\/cm {cmfactor mul} bind def % defines centimeters\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
869 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
870 "% ---- VARIABLES ----\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
871 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
872 "% NA = Nucleic Acid, AA = Amino Acid\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
873 "\/logoType (" + _input("LOGOTYPE") + ") def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
874 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
875 "\/logoTitle (" + _input("TITLE") + ") def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
876 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
877 "% Dimensions in cm\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
878 "\/logoWidth " + _input("LOGOWIDTH") + " cm def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
879 "\/logoHeight " + _input("LOGOLINEHEIGHT") + " cm def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
880 "\/totalHeight " + _input("LOGOHEIGHT") + " cm def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
881 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
882 "\/yaxis " + _input("YAXIS") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
883 "\/yaxisLabel (" + _input("YAXISLABEL") + ") def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
884 "\/yaxisBits " + _input("BARBITS") + " def % bits\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
885 "\/yaxisTicBits " + _input("TICBITS") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
886 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
887 "\/xaxis " + _input("NUMBERING") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
888 "\/xaxisLabel (" + _input("XAXISLABEL") + ") def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
889 "\/showEnds (" + _input("SHOWENDS") + ") def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
890 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
891 "\/showFineprint true def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
892 "\/fineprint (" + _input("FINEPRINT") + ") def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
893 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
894 "\/charsPerLine " + _input("CHARSPERLINE") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
895 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
896 "\/showingBox " + _input("SHOWINGBOX") + " def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
897 "\/shrinking false def % true falses\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
898 "\/shrink 1.0 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
899 "\/outline " + _input("OUTLINE") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
900 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
901 "\/IbeamFraction " + _input("ERRORBARFRACTION") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
902 "\/IbeamGray 0.50 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
903 "\/IbeamLineWidth 0.5 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
904 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
905 "\/fontsize " + _input("FONTSIZE") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
906 "\/titleFontsize " + _input("TITLEFONTSIZE") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
907 "\/smallFontsize " + _input("SMALLFONTSIZE") + " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
908 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
909 "\/topMargin " + _input("TOPMARGIN") + " cm def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
910 "\/bottomMargin " + _input("BOTTOMMARGIN") + " cm def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
911 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
912 "\/defaultColor [0 0 0] def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
913 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
914 _input("COLORDICT") + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
915 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
916 "\/colorDict fullColourDict def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
917 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
918 "% ---- DERIVED PARAMETERS ----\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
919 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
920 "\/leftMargin\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
921 " fontsize 3.5 mul\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
922 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
923 "def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
924 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
925 "\/rightMargin \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
926 " %Add extra room if showing ends\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
927 " showEnds (false) eq { fontsize}{fontsize 1.5 mul} ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
928 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
929 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
930 "\/yaxisHeight \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
931 " logoHeight \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
932 " bottomMargin sub \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
933 " topMargin sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
934 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
935 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
936 "\/ticWidth fontsize 2 div def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
937 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
938 "\/pointsPerBit yaxisHeight yaxisBits div def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
939 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
940 "\/stackMargin 1 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
941 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
942 "% Do not add space aroung characters if characters are boxed\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
943 "\/charRightMargin \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
944 " showingBox { 0.0 } {stackMargin} ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
945 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
946 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
947 "\/charTopMargin \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
948 " showingBox { 0.0 } {stackMargin} ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
949 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
950 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
951 "\/charWidth\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
952 " logoWidth\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
953 " leftMargin sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
954 " rightMargin sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
955 " charsPerLine div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
956 " charRightMargin sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
957 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
958 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
959 "\/charWidth4 charWidth 4 div def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
960 "\/charWidth2 charWidth 2 div def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
961 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
962 "\/stackWidth \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
963 " charWidth charRightMargin add\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
964 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
965 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
966 "\/numberFontsize \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
967 " fontsize charWidth lt {fontsize}{charWidth} ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
968 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
969 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
970 "% movements to place 5'\/N and 3'\/C symbols\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
971 "\/leftEndDeltaX fontsize neg def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
972 "\/leftEndDeltaY fontsize 1.5 mul neg def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
973 "\/rightEndDeltaX fontsize 0.25 mul def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
974 "\/rightEndDeltaY leftEndDeltaY def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
975 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
976 "% Outline width is proporional to charWidth, \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
977 "% but no less that 1 point\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
978 "\/outlinewidth \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
979 " charWidth 32 div dup 1 gt {}{pop 1} ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
980 "def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
981 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
982 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
983 "% ---- PROCEDURES ----\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
984 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
985 "\/StartLogo { \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
986 " % Save state\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
987 " save \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
988 " gsave \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
989 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
990 " % Print Logo Title, top center \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
991 " gsave \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
992 " SetStringFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
993 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
994 " logoWidth 2 div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
995 " logoTitle\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
996 " stringwidth pop 2 div sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
997 " totalHeight\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
998 " titleFontsize sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
999 " moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1000 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1001 " logoTitle\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1002 " show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1003 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1004 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1005 " % Print X-axis label, bottom center\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1006 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1007 " SetStringFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1008 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1009 " logoWidth 2 div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1010 " xaxisLabel\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1011 " stringwidth pop 2 div sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1012 " 0\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1013 " titleFontsize 3 div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1014 " add\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1015 " moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1016 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1017 " xaxisLabel\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1018 " show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1019 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1020 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1021 " % Show Fine Print\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1022 " showFineprint {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1023 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1024 " SetSmallFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1025 " logoWidth\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1026 " fineprint stringwidth pop sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1027 " smallFontsize sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1028 " smallFontsize 3 div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1029 " moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1030 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1031 " fineprint show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1032 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1033 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1034 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1035 " % Move to lower left corner of last line, first stack\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1036 " leftMargin bottomMargin translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1037 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1038 " % Move above first line ready for StartLine \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1039 " 0 totalHeight translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1040 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1041 " SetLogoFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1042 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1043 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1044 "\/EndLogo { \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1045 " grestore \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1046 " showpage \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1047 " restore \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1048 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1049 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1050 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1051 "\/StartLine { \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1052 " % move down to the bottom of the line:\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1053 " 0 logoHeight neg translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1054 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1055 " gsave \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1056 " yaxis { MakeYaxis } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1057 " xaxis { showEnds (true) eq {ShowLeftEnd} if } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1058 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1059 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1060 "\/EndLine{ \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1061 " xaxis { showEnds (true) eq {ShowRightEnd} if } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1062 " grestore \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1063 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1064 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1065 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1066 "\/MakeYaxis {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1067 " gsave \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1068 " stackMargin neg 0 translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1069 " ShowYaxisBar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1070 " ShowYaxisLabel\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1071 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1072 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1073 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1074 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1075 "\/ShowYaxisBar { \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1076 " gsave \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1077 " SetStringFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1078 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1079 " \/str 10 string def % string to hold number \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1080 " \/smallgap stackMargin 2 div def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1081 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1082 " % Draw first tic and bar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1083 " gsave \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1084 " ticWidth neg 0 moveto \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1085 " ticWidth 0 rlineto \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1086 " 0 yaxisHeight rlineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1087 " stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1088 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1089 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1090 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1091 " % Draw the tics\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1092 " % initial increment limit proc for\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1093 " 0 yaxisTicBits yaxisBits abs %cvi\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1094 " {\/loopnumber exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1095 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1096 " % convert the number coming from the loop to a string\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1097 " % and find its width\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1098 " loopnumber 10 str cvrs\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1099 " \/stringnumber exch def % string representing the number\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1100 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1101 " stringnumber stringwidth pop\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1102 " \/numberwidth exch def % width of number to show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1103 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1104 " \/halfnumberheight\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1105 " stringnumber CharBoxHeight 2 div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1106 " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1107 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1108 " numberwidth % move back width of number\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1109 " neg loopnumber pointsPerBit mul % shift on y axis\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1110 " halfnumberheight sub % down half the digit\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1111 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1112 " moveto % move back the width of the string\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1113 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1114 " ticWidth neg smallgap sub % Move back a bit more \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1115 " 0 rmoveto % move back the width of the tic \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1116 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1117 " stringnumber show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1118 " smallgap 0 rmoveto % Make a small gap \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1119 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1120 " % now show the tic mark\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1121 " 0 halfnumberheight rmoveto % shift up again\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1122 " ticWidth 0 rlineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1123 " stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1124 " } for\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1125 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1126 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1127 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1128 "\/ShowYaxisLabel {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1129 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1130 " SetStringFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1131 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1132 " % How far we move left depends on the size of\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1133 " % the tic labels.\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1134 " \/str 10 string def % string to hold number \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1135 " yaxisBits yaxisTicBits div cvi yaxisTicBits mul \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1136 " str cvs stringwidth pop\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1137 " ticWidth 1.5 mul add neg \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1138 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1139 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1140 " yaxisHeight\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1141 " yaxisLabel stringwidth pop\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1142 " sub 2 div\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1143 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1144 " translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1145 " 90 rotate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1146 " 0 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1147 " yaxisLabel show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1148 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1149 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1150 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1151 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1152 "\/StartStack { % <stackNumber> startstack\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1153 " xaxis {MakeNumber}{pop} ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1154 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1155 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1156 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1157 "\/EndStack {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1158 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1159 " stackWidth 0 translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1160 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1161 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1162 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1163 "% Draw a character whose height is proportional to symbol bits\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1164 "\/MakeSymbol{ % charbits character MakeSymbol\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1165 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1166 " \/char exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1167 " \/bits exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1168 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1169 " \/bitsHeight \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1170 " bits pointsPerBit mul \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1171 " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1172 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1173 " \/charHeight \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1174 " bitsHeight charTopMargin sub\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1175 " dup \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1176 " 0.0 gt {}{pop 0.0} ifelse % if neg replace with zero \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1177 " def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1178 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1179 " charHeight 0.0 gt {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1180 " char SetColor\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1181 " charWidth charHeight char ShowChar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1182 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1183 " showingBox { % Unfilled box\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1184 " 0 0 charWidth charHeight false ShowBox\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1185 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1186 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1187 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1188 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1189 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1190 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1191 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1192 " 0 bitsHeight translate \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1193 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1194 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1195 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1196 "\/ShowChar { % <width> <height> <char> ShowChar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1197 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1198 " \/tc exch def % The character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1199 " \/ysize exch def % the y size of the character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1200 " \/xsize exch def % the x size of the character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1201 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1202 " \/xmulfactor 1 def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1203 " \/ymulfactor 1 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1204 " \/limmulfactor 0.01 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1205 " \/drawable true def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1206 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1207 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1208 " % if ysize is negative, make everything upside down!\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1209 " ysize 0 lt {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1210 " % put ysize normal in this orientation\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1211 " \/ysize ysize abs def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1212 " xsize ysize translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1213 " 180 rotate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1214 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1215 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1216 " shrinking {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1217 " xsize 1 shrink sub 2 div mul\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1218 " ysize 1 shrink sub 2 div mul translate \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1219 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1220 " shrink shrink scale\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1221 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1222 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1223 " % Calculate the font scaling factors\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1224 " % Loop twice to catch small correction due to first scaling\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1225 " 2 {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1226 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1227 " xmulfactor ymulfactor scale\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1228 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1229 " ysize % desired size of character in points\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1230 " tc CharBoxHeight \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1231 " dup 0.0 ne {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1232 " div % factor by which to scale up the character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1233 " \/ymulfactor exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1234 " } % end if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1235 " {pop pop}\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1236 " ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1237 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1238 " xsize % desired size of character in points\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1239 " tc CharBoxWidth \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1240 " dup 0.0 ne {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1241 " div % factor by which to scale up the character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1242 " \/xmulfactor exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1243 " } % end if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1244 " {pop pop}\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1245 " ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1246 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1247 " % if the multiplication factors get too small we need to avoid a crash\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1248 " xmulfactor limmulfactor lt {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1249 " \/xmulfactor 1 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1250 " \/drawable false def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1251 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1252 " ymulfactor limmulfactor lt {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1253 " \/ymulfactor 1 def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1254 " \/drawable false def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1255 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1256 " } repeat\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1257 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1258 " % Adjust horizontal position if the symbol is an I\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1259 " tc (I) eq {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1260 " charWidth 2 div % half of requested character width\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1261 " tc CharBoxWidth 2 div % half of the actual character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1262 " sub 0 translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1263 " % Avoid x scaling for I \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1264 " \/xmulfactor 1 def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1265 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1266 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1267 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1268 " % ---- Finally, draw the character\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1269 " drawable { \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1270 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1271 " xmulfactor ymulfactor scale\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1272 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1273 " % Move lower left corner of character to start point\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1274 " tc CharBox pop pop % llx lly : Lower left corner\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1275 " exch neg exch neg\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1276 " moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1277 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1278 " outline { % outline characters:\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1279 " outlinewidth setlinewidth\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1280 " tc true charpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1281 " gsave 1 setgray fill grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1282 " clip stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1283 " } { % regular characters\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1284 " tc show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1285 " } ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1286 " } if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1287 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1288 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1289 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1290 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1291 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1292 "\/ShowBox { % x1 y1 x2 y2 filled ShowBox\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1293 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1294 " \/filled exch def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1295 " \/y2 exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1296 " \/x2 exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1297 " \/y1 exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1298 " \/x1 exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1299 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1300 " x1 y1 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1301 " x2 y1 lineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1302 " x2 y2 lineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1303 " x1 y2 lineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1304 " closepath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1305 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1306 " clip\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1307 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1308 " filled {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1309 " fill\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1310 " }{ \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1311 " 0 setgray stroke \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1312 " } ifelse\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1313 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1314 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1315 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1316 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1317 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1318 "\/MakeNumber { % number MakeNumber\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1319 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1320 " SetNumberFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1321 " stackWidth 0 translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1322 " 90 rotate % rotate so the number fits\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1323 " dup stringwidth pop % find the length of the number\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1324 " neg % prepare for move\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1325 " stackMargin sub % Move back a bit\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1326 " charWidth (0) CharBoxHeight % height of numbers\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1327 " sub 2 div %\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1328 " moveto % move back to provide space\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1329 " show\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1330 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1331 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1332 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1333 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1334 "\/Ibeam{ % heightInBits Ibeam\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1335 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1336 " % Make an Ibeam of twice the given height in bits\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1337 " \/height exch pointsPerBit mul def \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1338 " \/heightDRAW height IbeamFraction mul def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1339 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1340 " IbeamLineWidth setlinewidth\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1341 " IbeamGray setgray \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1342 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1343 " charWidth2 height neg translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1344 " ShowIbar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1345 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1346 " 0 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1347 " 0 heightDRAW rlineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1348 " stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1349 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1350 " 0 height moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1351 " 0 height rmoveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1352 " currentpoint translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1353 " ShowIbar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1354 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1355 " 0 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1356 " 0 heightDRAW neg rlineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1357 " currentpoint translate\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1358 " stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1359 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1360 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1361 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1362 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1363 "\/ShowIbar { % make a horizontal bar\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1364 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1365 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1366 " charWidth4 neg 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1367 " charWidth4 0 lineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1368 " stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1369 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1370 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1371 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1372 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1373 "\/ShowLeftEnd {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1374 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1375 " SetStringFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1376 " leftEndDeltaX leftEndDeltaY moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1377 " logoType (NA) eq {(5) show ShowPrime} if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1378 " logoType (AA) eq {(N) show} if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1379 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1380 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1381 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1382 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1383 "\/ShowRightEnd { \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1384 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1385 " SetStringFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1386 " rightEndDeltaX rightEndDeltaY moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1387 " logoType (NA) eq {(3) show ShowPrime} if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1388 " logoType (AA) eq {(C) show} if\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1389 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1390 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1391 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1392 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1393 "\/ShowPrime {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1394 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1395 " SetPrimeFont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1396 " (\\242) show \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1397 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1398 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1399 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1400 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1401 "\/SetColor{ % <char> SetColor\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1402 " dup colorDict exch known {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1403 " colorDict exch get aload pop setrgbcolor\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1404 " } {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1405 " pop\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1406 " defaultColor aload pop setrgbcolor\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1407 " } ifelse \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1408 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1409 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1410 "% define fonts\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1411 "\/SetTitleFont {\/Times-Bold findfont titleFontsize scalefont setfont} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1412 "\/SetLogoFont {\/Helvetica-Bold findfont charWidth scalefont setfont} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1413 "\/SetStringFont{\/Helvetica-Bold findfont fontsize scalefont setfont} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1414 "\/SetPrimeFont {\/Symbol findfont fontsize scalefont setfont} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1415 "\/SetSmallFont {\/Helvetica findfont smallFontsize scalefont setfont} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1416 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1417 "\/SetNumberFont {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1418 " \/Helvetica-Bold findfont \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1419 " numberFontsize\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1420 " scalefont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1421 " setfont\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1422 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1423 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1424 "%Take a single character and return the bounding box\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1425 "\/CharBox { % <char> CharBox <lx> <ly> <ux> <uy>\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1426 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1427 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1428 " 0 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1429 " % take the character off the stack and use it here:\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1430 " true charpath \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1431 " flattenpath \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1432 " pathbbox % compute bounding box of 1 pt. char => lx ly ux uy\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1433 " % the path is here, but toss it away ...\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1434 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1435 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1436 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1437 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1438 "% The height of a characters bounding box\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1439 "\/CharBoxHeight { % <char> CharBoxHeight <num>\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1440 " CharBox\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1441 " exch pop sub neg exch pop\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1442 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1443 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1444 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1445 "% The width of a characters bounding box\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1446 "\/CharBoxWidth { % <char> CharBoxHeight <num>\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1447 " CharBox\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1448 " pop exch pop sub neg \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1449 "} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1450 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1451 "% Set the colour scheme to be faded to indicate trimming\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1452 "\/MuteColour {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1453 " \/colorDict mutedColourDict def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1454 "} def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1455 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1456 "% Restore the colour scheme to the normal colours\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1457 "\/RestoreColour {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1458 " \/colorDict fullColourDict def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1459 "} def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1460 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1461 "% Draw the background for a trimmed section\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1462 "% takes the number of columns as a parameter\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1463 "\/DrawTrimBg { % <num> DrawTrimBox\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1464 " \/col exch def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1465 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1466 " \/boxwidth \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1467 " col stackWidth mul \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1468 " def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1469 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1470 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1471 " 0.97 setgray\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1472 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1473 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1474 " 0 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1475 " boxwidth 0 rlineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1476 " 0 yaxisHeight rlineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1477 " 0 yaxisHeight lineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1478 " closepath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1479 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1480 " fill\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1481 " grestore\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1482 "} def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1483 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1484 "\/DrawTrimEdge {\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1485 " gsave\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1486 " 0.2 setgray\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1487 " [2] 0 setdash\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1488 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1489 " newpath\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1490 " 0 0 moveto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1491 " 0 yaxisHeight lineto\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1492 " \n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1493 " stroke\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1494 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1495 "} def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1496 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1497 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1498 "% Deprecated names\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1499 "\/startstack {StartStack} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1500 "\/endstack {EndStack} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1501 "\/makenumber {MakeNumber} bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1502 "\/numchar { MakeSymbol } bind def\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1503 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1504 "%%EndProlog\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1505 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1506 "%%Page: 1 1\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1507 "StartLogo\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1508 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1509 _input("DATA") + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1510 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1511 "EndLogo\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1512 "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1513 "%%EOF\n"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1514 );
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1515 }</script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1516 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1517 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1518 // start Alphabet object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1519 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1520 var Alphabet = function(alphabet, background) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1521 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1522 var i, j, sym, aliases, complement, comp_e_sym, ambigs, generate_background;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1523 generate_background = (background == null);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1524 if (generate_background) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1525 background = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1526 for (i = 0; i < alphabet.ncore; i++) background[i] = 1.0 / alphabet.ncore;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1527 } else if (alphabet.ncore != background.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1528 throw new Error("The background length does not match the alphabet length.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1529 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1530 this.name = alphabet.name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1531 this.like = (alphabet.like != null ? alphabet.like.toUpperCase() : null);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1532 this.ncore = alphabet.ncore;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1533 this.symbols = alphabet.symbols;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1534 this.background = background;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1535 this.genbg = generate_background;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1536 this.encode = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1537 this.encode2core = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1538 this.complement = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1539 // check if all symbols are same case
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1540 var seen_uc = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1541 var seen_lc = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1542 var check_case = function (syms) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1543 var s, sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1544 if (typeof syms === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1545 for (s = 0; s < syms.length; s++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1546 sym = syms.charAt(s);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1547 if (sym >= 'a' && sym <= 'z') seen_lc = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1548 else if (sym >= 'A' && sym <= 'Z') seen_uc = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1549 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1550 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1551 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1552 for (i = 0; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1553 check_case(this.symbols[i].symbol);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1554 check_case(this.symbols[i].aliases);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1555 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1556 // now map symbols to indexes
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1557 var update_array = function(array, syms, index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1558 var s, sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1559 if (typeof syms === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1560 for (s = 0; s < syms.length; s++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1561 sym = syms.charAt(s);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1562 array[sym] = index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1563 // when only a single case is used, then encode as case insensitive
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1564 if (seen_uc != seen_lc) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1565 if (sym >= 'a' && sym <= 'z') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1566 array[sym.toUpperCase()] = index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1567 } else if (sym >= 'A' && sym <= 'Z') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1568 array[sym.toLowerCase()] = index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1569 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1570 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1571 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1572 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1573 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1574 // map core symbols to index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1575 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1576 update_array(this.encode2core, this.symbols[i].symbol, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1577 update_array(this.encode, this.symbols[i].symbol, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1578 update_array(this.encode2core, this.symbols[i].aliases, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1579 update_array(this.encode, this.symbols[i].aliases, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1580 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1581 // map ambigous symbols to index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1582 ambigs = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1583 for (i = this.ncore; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1584 update_array(this.encode, this.symbols[i].symbol, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1585 update_array(this.encode, this.symbols[i].aliases, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1586 ambigs[this.symbols[i].equals] = i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1587 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1588 // determine complements
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1589 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1590 complement = this.symbols[i].complement;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1591 if (typeof complement === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1592 this.complement[i] = this.encode2core[complement];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1593 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1594 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1595 next_symbol:
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1596 for (i = this.ncore; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1597 complement = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1598 for (j = 0; j < this.symbols[i].equals.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1599 comp_e_sym = this.complement[this.encode2core[this.symbols[i].equals.charAt(j)]];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1600 if (typeof comp_e_sym !== "number") continue next_symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1601 complement += this.symbols[comp_e_sym].symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1602 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1603 complement = complement.split("").sort().join("");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1604 if (typeof ambigs[complement] === "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1605 this.complement[i] = ambigs[complement];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1606 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1607 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1608 // determine case insensitivity
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1609 this.case_insensitive = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1610 if (seen_uc == seen_lc) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1611 // when there is a mixture of cases it probably won't
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1612 // be case insensitive but we still need to check
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1613 loop:
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1614 for (i = 0; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1615 sym = this.symbols[i].symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1616 if (sym >= 'A' && sym <= 'Z') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1617 if (this.encode[sym.toLowerCase()] != i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1618 this.case_insensitive = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1619 break loop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1620 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1621 } else if (sym >= 'a' && sym <= 'z') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1622 if (this.encode[sym.toUpperCase()] != i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1623 this.case_insensitive = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1624 break loop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1625 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1626 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1627 aliases = this.symbols[i].aliases;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1628 if (aliases != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1629 for (j = 0; j < aliases.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1630 sym = aliases.charAt(j);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1631 if (sym >= 'A' && sym <= 'Z') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1632 if (this.encode[sym.toLowerCase()] != i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1633 this.case_insensitive = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1634 break loop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1635 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1636 } else if (sym >= 'a' && sym <= 'z') {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1637 if (this.encode[sym.toUpperCase()] != i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1638 this.case_insensitive = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1639 break loop;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1640 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1641 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1642 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1643 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1644 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1645 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1646 // normalise aliases to remove the prime symbol and eliminate
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1647 // the alternate cases when the alphabet is case insensitive
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1648 var seen, out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1649 for (i = 0; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1650 sym = this.symbols[i].symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1651 aliases = this.symbols[i].aliases;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1652 if (typeof aliases != "string") aliases = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1653 seen = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1654 out = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1655 if (this.case_insensitive) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1656 sym = sym.toUpperCase();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1657 aliases = aliases.toUpperCase();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1658 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1659 seen[sym] = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1660 for (j = 0; j < aliases.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1661 if (!seen[aliases.charAt(j)]) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1662 seen[aliases.charAt(j)] = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1663 out.push(aliases.charAt(j));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1664 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1665 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1666 this.symbols[i].aliases = out.sort().join("");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1667 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1668 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1669 // return the name of the alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1670 Alphabet.prototype.get_alphabet_name = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1671 return this.name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1672 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1673 // return if the alphabet can be complemented
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1674 Alphabet.prototype.has_complement = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1675 return (typeof this.symbols[0].complement === "string");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1676 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1677 // return true if an uppercase letter has the same meaning as the lowercase form
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1678 Alphabet.prototype.is_case_insensitive = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1679 return this.case_insensitive;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1680 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1681 // return the information content of an alphabet letter
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1682 Alphabet.prototype.get_ic = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1683 return Math.log(this.ncore) / Math.LN2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1684 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1685 // return the count of the core alphabet symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1686 Alphabet.prototype.get_size_core = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1687 return this.ncore;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1688 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1689 // return the count of all alphabet symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1690 Alphabet.prototype.get_size_full = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1691 return this.symbols.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1692 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1693 // return the symbol for the given alphabet index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1694 Alphabet.prototype.get_symbol = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1695 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1696 if (alph_index < 0 || alph_index >= this.symbols.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1697 throw new Error("Alphabet index out of bounds");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1698 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1699 return this.symbols[alph_index].symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1700 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1701 // return the aliases for the given alphabet index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1702 Alphabet.prototype.get_aliases = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1703 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1704 if (alph_index < 0 || alph_index >= this.symbols.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1705 throw new Error("Alphabet index out of bounds");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1706 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1707 var sym_obj = this.symbols[alph_index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1708 return (sym_obj.aliases != null ? sym_obj.aliases : "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1709 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1710 // return the name for the given alphabet index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1711 Alphabet.prototype.get_name = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1712 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1713 var sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1714 if (alph_index < 0 || alph_index >= this.symbols.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1715 throw new Error("Alphabet index out of bounds");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1716 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1717 sym = this.symbols[alph_index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1718 return (typeof sym.name === "string" ? sym.name : sym.symbol);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1719 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1720 // return the alphabet it is like or null
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1721 Alphabet.prototype.get_like = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1722 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1723 return this.like;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1724 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1725 // return the index of the complement for the given alphabet index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1726 Alphabet.prototype.get_complement = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1727 var comp_e_sym = this.complement[alph_index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1728 if (typeof comp_e_sym === "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1729 return comp_e_sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1730 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1731 return -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1732 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1733 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1734 // return a string containing the core symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1735 Alphabet.prototype.get_symbols = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1736 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1737 var i, core_symbols;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1738 core_symbols = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1739 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1740 core_symbols += this.symbols[i].symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1741 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1742 return core_symbols;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1743 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1744 // return if the background was not a uniform generated background
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1745 Alphabet.prototype.has_bg = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1746 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1747 return !this.genbg;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1748 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1749 // get the background frequency for the index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1750 Alphabet.prototype.get_bg_freq = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1751 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1752 var freq, i, symbols;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1753 if (alph_index >= 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1754 if (alph_index < this.ncore) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1755 return this.background[alph_index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1756 } else if (alph_index < this.symbols.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1757 freq = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1758 symbols = this.symbols[alph_index].equals;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1759 for (i = 0; i < symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1760 freq += this.background[this.encode2core[symbols.charAt(i)]];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1761 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1762 return freq;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1763 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1764 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1765 throw new Error("The alphabet index is out of range.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1766 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1767 // get the colour of the index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1768 Alphabet.prototype.get_colour = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1769 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1770 if (alph_index < 0 || alph_index >= this.symbols.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1771 throw new Error("BAD_ALPHABET_INDEX");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1772 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1773 if (typeof this.symbols[alph_index].colour != "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1774 return "black";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1775 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1776 return "#" + this.symbols[alph_index].colour;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1777 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1778 // get the rgb componets of the colour at the index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1779 Alphabet.prototype.get_rgb = function(alph_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1780 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1781 if (alph_index < 0 || alph_index >= this.symbols.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1782 throw new Error("BAD_ALPHABET_INDEX");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1783 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1784 if (typeof this.symbols[alph_index].colour != "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1785 return {"red": 0, "green": 0, "blue": 0};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1786 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1787 var colour = this.symbols[alph_index].colour;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1788 var red = parseInt(colour.substr(0, 2), 16) / 255;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1789 var green = parseInt(colour.substr(2, 2), 16) / 255;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1790 var blue = parseInt(colour.substr(4, 2), 16) / 255;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1791 return {"red": red, "green": green, "blue": blue};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1792 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1793 // convert a symbol into the index
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1794 Alphabet.prototype.get_index = function(letter) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1795 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1796 var alph_index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1797 alph_index = this.encode[letter];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1798 if (typeof alph_index === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1799 return -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1800 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1801 return alph_index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1802 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1803 // convert a symbol into the list of core indexes that it equals
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1804 Alphabet.prototype.get_indexes = function(letter) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1805 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1806 var alph_index, comprise_str, i, comprise_list;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1807 alph_index = this.encode[letter];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1808 if (typeof alph_index === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1809 throw new Error("Unknown letter");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1810 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1811 comprise_str = this.symbols[alph_index].equals;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1812 comprise_list = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1813 if (typeof comprise_str == "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1814 for (i = 0; i < comprise_str.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1815 comprise_list.push(this.encode2core[comprise_str.charAt(i)]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1816 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1817 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1818 comprise_list.push(alph_index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1819 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1820 return comprise_list;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1821 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1822 // check if a symbol is the primary way of representing the symbol in the alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1823 Alphabet.prototype.is_prime_symbol = function(letter) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1824 var alph_index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1825 alph_index = this.encode[letter];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1826 if (alph_index == null) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1827 if (this.is_case_insensitive()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1828 return (this.symbols[alph_index].symbol.toUpperCase() == letter.toUpperCase());
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1829 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1830 return (this.symbols[alph_index].symbol == letter);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1831 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1832 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1833 // compare 2 alphabets
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1834 Alphabet.prototype.equals = function(other) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1835 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1836 var i, sym1, sym2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1837 // first check that it's actually an alphabet object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1838 if (!(typeof other === "object" && other != null && other instanceof Alphabet)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1839 return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1840 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1841 // second shortcircuit if it's the same object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1842 if (this === other) return true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1843 // compare
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1844 if (this.name !== other.name) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1845 if (this.ncore !== other.ncore) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1846 if (this.symbols.length !== other.symbols.length) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1847 for (i = 0; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1848 sym1 = this.symbols[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1849 sym2 = other.symbols[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1850 if (sym1.symbol !== sym2.symbol) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1851 if (sym1.aliases !== sym2.aliases) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1852 if (sym1.name !== sym2.name) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1853 if (typeof sym1.colour !== typeof sym2.colour ||
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1854 (typeof sym1.colour === "string" && typeof sym2.colour === "string" &&
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1855 parseInt(sym1.colour, 16) != parseInt(sym2.colour, 16))) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1856 return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1857 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1858 if (sym1.complement !== sym2.complement) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1859 if (sym1.equals !== sym2.equals) return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1860 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1861 return true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1862 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1863 Alphabet.prototype.check_core_subset = function(super_alph) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1864 var complement_same = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1865 var seen_set = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1866 var sub_i, sub_symbol, super_i, super_symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1867 for (sub_i = 0; sub_i < this.ncore; sub_i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1868 sub_symbol = this.symbols[sub_i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1869 super_i = super_alph.encode[sub_symbol.symbol];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1870 if (super_i == null) return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1871 super_symbol = super_alph.symbols[super_i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1872 if (seen_set[super_i]) return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1873 seen_set[super_i] = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1874 // check complement
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1875 if (sub_symbol.complement != null && super_symbol.complement != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1876 if (super_alph.encode[sub_symbol.complement] != super_alph.encode[super_symbol.complement]) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1877 complement_same = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1878 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1879 } else if (sub_symbol.complement != null || super_symbol.complement != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1880 complement_same = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1881 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1882 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1883 return (complement_same ? 1 : -1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1884 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1885 // convert a sequence to its reverse complement
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1886 Alphabet.prototype.invcomp_seq = function(seq) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1887 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1888 var syms, i, e_sym, comp_e_sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1889 if (!this.has_complement()) throw new Error("Alphabet must be complementable");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1890 syms = seq.split("");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1891 for (i = 0; i < syms.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1892 e_sym = this.encode[syms[i]];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1893 if (typeof e_sym === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1894 e_sym = this.ncore; // wildcard
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1895 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1896 comp_e_sym = this.complement[e_sym];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1897 if (typeof comp_e_sym === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1898 comp_e_sym = e_sym; // not complementable
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1899 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1900 syms[i] = this.symbols[comp_e_sym].symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1901 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1902 return syms.reverse().join("");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1903 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1904 // convert the alphabet to the text version
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1905 Alphabet.prototype.as_text = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1906 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1907 function name_as_text(name) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1908 var i, c, out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1909 out = "\"";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1910 for (i = 0; i < name.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1911 c = name.charAt(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1912 if (c == "\"") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1913 out += "\\\"";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1914 } else if (c == "/") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1915 out += "\\/";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1916 } else if (c == "\\") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1917 out += "\\\\";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1918 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1919 out += c;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1920 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1921 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1922 out += "\"";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1923 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1924 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1925 function symbol_as_text(sym) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1926 var out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1927 out = sym.symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1928 if (typeof sym.name === "string" && sym.name != sym.symbol) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1929 out += " " + name_as_text(sym.name);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1930 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1931 if (typeof sym.colour === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1932 out += " " + sym.colour;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1933 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1934 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1935 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1936 var out, i, j, c, sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1937 out = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1938 // output core symbols with 2 way complements
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1939 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1940 c = this.complement[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1941 if (typeof c === "number" && i < c && this.complement[c] === i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1942 out += symbol_as_text(this.symbols[i]) + " ~ " + symbol_as_text(this.symbols[c]) + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1943 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1944 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1945 // output core symbols with no complement
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1946 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1947 if (typeof this.complement[i] === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1948 out += symbol_as_text(this.symbols[i]) + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1949 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1950 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1951 // output ambiguous symbols that have comprising characters
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1952 for (i = this.ncore; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1953 if (this.symbols[i].equals.length == 0) break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1954 out += symbol_as_text(this.symbols[i]) + " = " + this.symbols[i].equals + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1955 if (typeof this.symbols[i].aliases === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1956 for (j = 0; j < this.symbols[i].aliases.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1957 if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1958 out += this.symbols[i].aliases.charAt(j) + " = " + this.symbols[i].equals + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1959 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1960 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1961 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1962 // output aliases of core symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1963 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1964 if (typeof this.symbols[i].aliases === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1965 for (j = 0; j < this.symbols[i].aliases.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1966 if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1967 out += this.symbols[i].aliases.charAt(j) + " = " + this.symbols[i].symbol + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1968 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1969 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1970 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1971 // output gap symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1972 i = this.symbols.length - 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1973 if (this.symbols[i].equals.length == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1974 out += symbol_as_text(this.symbols[i]) + " =\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1975 if (typeof this.symbols[i].aliases === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1976 for (j = 0; j < this.symbols[i].aliases.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1977 if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1978 out += this.symbols[i].aliases.charAt(j) + " =\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1979 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1980 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1981 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1982 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1983 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1984 // output the alphabet as it appears in minimal MEME format
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1985 Alphabet.prototype.as_meme = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1986 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1987 function name_as_text(name) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1988 var i, c, out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1989 out = "\"";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1990 for (i = 0; i < name.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1991 c = name.charAt(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1992 if (c == "\"") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1993 out += "\\\"";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1994 } else if (c == "/") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1995 out += "\\/";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1996 } else if (c == "\\") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1997 out += "\\\\";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1998 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1999 out += c;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2000 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2001 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2002 out += "\"";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2003 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2004 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2005 if (this.equals(AlphStd.DNA)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2006 return "ALPHABET= ACGT\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2007 } else if (this.equals(AlphStd.PROTEIN)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2008 return "ALPHABET= ACDEFGHIKLMNPQRSTVWY\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2009 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2010 return "ALPHABET" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2011 (this.name != null ? " " + name_as_text(this.name) : "") +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2012 (this.like != null ? " " + this.like + "-LIKE" : "") + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2013 this.as_text() + "END ALPHABET\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2014 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2015 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2016
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2017 // Returns a table showing all the letters in the alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2018 Alphabet.prototype.as_table = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2019 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2020 var i, j, row, th, td, aliases, equals, sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2021 var table = document.createElement("table");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2022 // create the core symbol header
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2023 row = table.insertRow(table.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2024 th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2025 th.appendChild(document.createTextNode("Symbol(s)"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2026 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2027 th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2028 th.appendChild(document.createTextNode("Name"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2029 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2030 th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2031 if (this.has_complement()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2032 th.appendChild(document.createTextNode("Complement"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2033 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2034 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2035 // list the core symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2036 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2037 row = table.insertRow(table.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2038 td = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2039 if (this.symbols[i].colour != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2040 td.style.color = '#' + this.symbols[i].colour;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2041 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2042 td.appendChild(document.createTextNode(this.symbols[i].symbol));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2043 aliases = this.get_aliases(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2044 if (aliases.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2045 td.appendChild(document.createTextNode(' ' + aliases.split('').join(' ')));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2046 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2047 row.appendChild(td);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2048 td = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2049 if (this.symbols[i].name != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2050 td.appendChild(document.createTextNode(this.symbols[i].name));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2051 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2052 row.appendChild(td);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2053 td = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2054 if (this.symbols[i].complement != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2055 td.style.color = this.get_colour(this.get_index(this.symbols[i].complement));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2056 td.appendChild(document.createTextNode(this.symbols[i].complement));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2057 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2058 row.appendChild(td);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2059 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2060 // create the ambiguous symbol header
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2061 row = table.insertRow(table.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2062 th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2063 th.appendChild(document.createTextNode("Symbol(s)"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2064 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2065 th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2066 th.appendChild(document.createTextNode("Name"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2067 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2068 th = document.createElement("th");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2069 th.appendChild(document.createTextNode("Matches"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2070 row.appendChild(th);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2071 // list the ambiguous symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2072 for (i = this.ncore; i < this.symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2073 row = table.insertRow(table.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2074 td = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2075 if (this.symbols[i].colour != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2076 td.style.color = '#' + this.symbols[i].colour;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2077 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2078 td.appendChild(document.createTextNode(this.symbols[i].symbol));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2079 aliases = this.get_aliases(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2080 if (aliases.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2081 td.appendChild(document.createTextNode(' ' + aliases.split('').join(' ')));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2082 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2083 row.appendChild(td);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2084 td = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2085 if (this.symbols[i].name != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2086 td.appendChild(document.createTextNode(this.symbols[i].name));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2087 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2088 row.appendChild(td);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2089 td = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2090 equals = this.symbols[i].equals.split('');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2091 for (j = 0; j < equals.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2092 if (j != 0) td.appendChild(document.createTextNode(' '));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2093 sym = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2094 sym.style.color = this.get_colour(this.get_index(equals[j]));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2095 sym.appendChild(document.createTextNode(equals[j]));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2096 td.appendChild(sym);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2097 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2098 row.appendChild(td);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2099 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2100 return table;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2101 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2102
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2103 // returns a dictionary of the colours for EPS
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2104 Alphabet.prototype._as_eps_dict = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2105 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2106 var i, sym, rgb;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2107 var out = "/fullColourDict <<\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2108 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2109 sym = this.get_symbol(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2110 sym = sym.replace(/\\/g, "\\\\");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2111 sym = sym.replace(/\(/g, "\\(");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2112 sym = sym.replace(/\)/g, "\\)");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2113 rgb = this.get_rgb(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2114 out += " (" + sym + ") [" + rgb.red.toFixed(4) + " " + rgb.green.toFixed(4) + " " + rgb.blue.toFixed(4) + "]\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2115 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2116 out += ">> def\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2117 out += "/mutedColourDict <<\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2118 for (i = 0; i < this.ncore; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2119 sym = this.get_symbol(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2120 sym = sym.replace(/\\/g, "\\\\");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2121 sym = sym.replace(/\(/g, "\\(");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2122 sym = sym.replace(/\)/g, "\\)");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2123 rgb = Alphabet.lighten_colour(this.get_rgb(i));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2124 out += " (" + sym + ") [" + rgb.red.toFixed(4) + " " + rgb.green.toFixed(4) + " " + rgb.blue.toFixed(4) + "]\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2125 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2126 out += ">> def\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2127 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2128 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2129
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2130 // return the alphabet name or a list of primary symbols
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2131 Alphabet.prototype.toString = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2132 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2133 if (this.name != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2134 return this.name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2135 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2136 return this.get_symbols();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2137 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2138 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2139
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2140 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2141 // Helper functions
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2142 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2143
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2144 // Convert a colour specified in RGB colourspace values into LAB colourspace
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2145 Alphabet.rgb2lab = function(rgb) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2146 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2147 var xyzHelper, labHelper;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2148 // XYZ helper
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2149 xyzHelper = function(value) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2150 if (value > 0.0445) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2151 value = (value + 0.055) / 1.055;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2152 value = Math.pow(value, 2.4);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2153 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2154 value /= 12.92;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2155 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2156 value *= 100;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2157 return value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2158 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2159 // lab helper
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2160 labHelper = function(value) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2161 if (value > 0.008856) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2162 value = Math.pow(value, 1.0 / 3.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2163 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2164 value = (7.787 * value) + (16.0 / 116.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2165 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2166 return value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2167 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2168 // convert into XYZ colourspace
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2169 var c1, c2, c3;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2170 if (typeof rgb == "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2171 c1 = xyzHelper(((rgb >> 16) & 0xFF) / 255.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2172 c2 = xyzHelper(((rgb >> 8) & 0xFF) / 255.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2173 c3 = xyzHelper((rgb & 0xFF) / 255.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2174 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2175 c1 = xyzHelper(rgb.red);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2176 c2 = xyzHelper(rgb.green);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2177 c3 = xyzHelper(rgb.blue);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2178 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2179 var x = (c1 * 0.4124) + (c2 * 0.3576) + (c3 * 0.1805);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2180 var y = (c1 * 0.2126) + (c2 * 0.7152) + (c3 * 0.0722);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2181 var z = (c1 * 0.0193) + (c2 * 0.1192) + (c3 * 0.9505);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2182 // convert into Lab colourspace
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2183 c1 = labHelper(x / 95.047);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2184 c2 = labHelper(y / 100.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2185 c3 = labHelper(z / 108.883);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2186 var l = (116.0 * c2) - 16;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2187 var a = 500.0 * (c1 - c2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2188 var b = 200.0 * (c2 - c3);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2189 return {"l": l, "a": a, "b": b};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2190 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2191
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2192 // Convert a colour specified in HSV colourspace into RGB colourspace
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2193 Alphabet.hsv2rgb = function(hue, sat, value, output_object) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2194 // achromatic (grey)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2195 var r = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2196 var g = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2197 var b = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2198 if (sat != 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2199 var h = hue / 60.0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2200 var i = Math.floor(h);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2201 var f = h - i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2202 var p = value * (1.0 - sat);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2203 var q = value * (1.0 - (sat * f));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2204 var t = value * (1.0 - (sat * (1.0 - f)));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2205 if (i == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2206 r = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2207 g = t;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2208 b = p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2209 } else if (i == 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2210 r = q;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2211 g = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2212 b = p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2213 } else if (i == 2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2214 r = p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2215 g = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2216 b = t;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2217 } else if (i == 3) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2218 r = p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2219 g = q;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2220 b = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2221 } else if (i == 4) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2222 r = t;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2223 g = p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2224 b = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2225 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2226 r = value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2227 g = p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2228 b = q;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2229 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2230 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2231 if (output_object) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2232 return {"red": r, "green": g, "blue": b};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2233 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2234 return (Math.floor(r * 255) << 15) | (Math.floor(g * 255) << 8) | (Math.floor(b * 255));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2235 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2236 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2237
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2238 // Calculate a distance score between two colours in LAB colourspace
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2239 Alphabet.lab_dist = function(lab1, lab2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2240 var c1 = Math.sqrt((lab1.l * lab1.l) + (lab1.a * lab1.a));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2241 var c2 = Math.sqrt((lab2.l * lab2.l) + (lab2.a * lab2.a));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2242 var dc = c1 - c2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2243 var dl = lab1.l - lab2.l;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2244 var da = lab1.a - lab2.a;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2245 var db = lab1.b - lab2.b;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2246 // we don't want NaN due to rounding errors so fudge things a bit...
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2247 var dh = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2248 var dh_squared = (da * da) + (db * db) - (dc * dc);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2249 if (dh_squared > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2250 dh = Math.sqrt(dh_squared);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2251 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2252 var first = dl;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2253 var second = dc / (1.0 + (0.045 * c1));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2254 var third = dh / (1.0 + (0.015 * c1));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2255 return Math.sqrt((first * first) + (second * second) + (third * third));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2256 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2257
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2258 // convert an RGB value into a HSL value
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2259 Alphabet.rgb2hsl = function(rgb) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2260 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2261 var min, max, delta, h, s, l, r, g, b;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2262 if (typeof rgb == "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2263 r = ((rgb >> 16) & 0xFF) / 255.0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2264 g = ((rgb >> 8) & 0xFF) / 255.0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2265 b = (rgb & 0xFF) / 255.0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2266 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2267 r = rgb.red;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2268 g = rgb.green;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2269 b = rgb.blue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2270 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2271 min = Math.min(r, g, b);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2272 max = Math.max(r, g, b);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2273 delta = max - min;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2274 l = min + (delta / 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2275 if (max == min) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2276 h = 0; // achromatic (grayscale)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2277 s = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2278 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2279 if (l > 0.5) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2280 s = delta / (2 - max - min);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2281 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2282 s = delta / (max + min);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2283 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2284 if (max == r) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2285 h = (g - b) / delta;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2286 if (g < b) h += 6;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2287 } else if (max == g) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2288 h = ((b - r) / delta) + 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2289 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2290 h = ((r - g) / delta) + 4;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2291 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2292 h /= 6;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2293 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2294 return {"h": h, "s": s, "l": l};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2295 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2296
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2297 // convert a HSL value into an RGB value
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2298 Alphabet.hsl2rgb = function(hsl, output_object) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2299 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2300 function _hue(p, q, t) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2301 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2302 if (t < 0) t += 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2303 else if (t > 1) t -= 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2304 if (t < (1.0 / 6.0)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2305 return p + ((q - p) * 6.0 * t);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2306 } else if (t < 0.5) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2307 return q;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2308 } else if (t < (2.0 / 3.0)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2309 return p + ((q - p) * ((2.0 / 3.0) - t) * 6.0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2310 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2311 return p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2312 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2313 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2314 var r, g, b, p, q;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2315 if (hsl.s == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2316 // achromatic (grayscale)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2317 r = hsl.l;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2318 g = hsl.l;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2319 b = hsl.l;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2320 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2321 if (hsl.l < 0.5) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2322 q = hsl.l * (1 + hsl.s);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2323 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2324 q = hsl.l + hsl.s - (hsl.l * hsl.s);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2325 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2326 p = (2 * hsl.l) - q;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2327 r = _hue(p, q, hsl.h + (1.0 / 3.0));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2328 g = _hue(p, q, hsl.h);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2329 b = _hue(p, q, hsl.h - (1.0 / 3.0));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2330 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2331 if (output_object) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2332 return {"red": r, "green": g, "blue": b};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2333 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2334 return (Math.floor(r * 255) << 15) | (Math.floor(g * 255) << 8) | (Math.floor(b * 255));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2335 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2336 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2337
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2338 Alphabet.lighten_colour = function(rgb) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2339 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2340 var hsl = Alphabet.rgb2hsl(rgb);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2341 hsl.l += (1.0 - hsl.l) * 2 / 3;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2342 return Alphabet.hsl2rgb(hsl, typeof rgb != "number");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2343 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2344
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2345 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2346 // end Alphabet object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2347 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2348
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2349 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2350 // start StandardAlphabet object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2351 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2352
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2353 // an extension of the alphabet object to support some additional fields
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2354 // only present in standard alphabets.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2355 var StandardAlphabet = function(enum_code, enum_name, alphabet_data) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2356 Alphabet.apply(this, [alphabet_data]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2357 this.enum_code = enum_code;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2358 this.enum_name = enum_name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2359 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2360 StandardAlphabet.prototype = Alphabet.prototype;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2361 StandardAlphabet.prototype.constructor = StandardAlphabet;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2362
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2363 // A unique code for this standard alphabet.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2364 // This code will be a power of 2 to enable creation of bitsets for
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2365 // a selection of standard alphabets.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2366 StandardAlphabet.prototype.get_code = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2367 return this.enum_code;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2368 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2369
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2370 // A unique name for this standard alphabet.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2371 // this name will be all upper case and the same as the property that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2372 // refers to this alphabet in the AlphStd collection.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2373 StandardAlphabet.prototype.get_enum = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2374 return this.enum_name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2375 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2376
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2377 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2378 // end StandardAlphabet object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2379 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2380
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2381 // A collection of standard alphabets.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2382 var AlphStd = {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2383 RNA: new StandardAlphabet(1, "RNA", {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2384 "name": "RNA",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2385 "like": "RNA",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2386 "ncore": 4,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2387 "symbols": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2388 {"symbol": "A", "name": "Adenine", "colour": "CC0000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2389 {"symbol": "C", "name": "Cytosine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2390 {"symbol": "G", "name": "Guanine", "colour": "FFB300"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2391 {"symbol": "U", "name": "Uracil", "colour": "008000",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2392 "aliases": "T"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2393 {"symbol": "N", "name": "Any base", "equals": "ACGU", "aliases": "X."},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2394 {"symbol": "V", "name": "Not U", "equals": "ACG"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2395 {"symbol": "H", "name": "Not G", "equals": "ACU"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2396 {"symbol": "D", "name": "Not C", "equals": "AGU"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2397 {"symbol": "B", "name": "Not A", "equals": "CGU"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2398 {"symbol": "M", "name": "Amino", "equals": "AC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2399 {"symbol": "R", "name": "Purine", "equals": "AG"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2400 {"symbol": "W", "name": "Weak", "equals": "AU"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2401 {"symbol": "S", "name": "Strong", "equals": "CG"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2402 {"symbol": "Y", "name": "Pyrimidine", "equals": "CU"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2403 {"symbol": "K", "name": "Keto", "equals": "GU"}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2404 ]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2405 }),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2406 DNA: new StandardAlphabet(2, "DNA", {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2407 "name": "DNA",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2408 "like": "DNA",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2409 "ncore": 4,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2410 "symbols": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2411 {"symbol": "A", "name": "Adenine", "colour": "CC0000", "complement": "T"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2412 {"symbol": "C", "name": "Cytosine", "colour": "0000CC", "complement": "G"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2413 {"symbol": "G", "name": "Guanine", "colour": "FFB300", "complement": "C"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2414 {"symbol": "T", "name": "Thymine", "colour": "008000", "complement": "A",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2415 "aliases": "U"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2416 {"symbol": "N", "name": "Any base", "equals": "ACGT", "aliases": "X."},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2417 {"symbol": "V", "name": "Not T", "equals": "ACG"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2418 {"symbol": "H", "name": "Not G", "equals": "ACT"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2419 {"symbol": "D", "name": "Not C", "equals": "AGT"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2420 {"symbol": "B", "name": "Not A", "equals": "CGT"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2421 {"symbol": "M", "name": "Amino", "equals": "AC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2422 {"symbol": "R", "name": "Purine", "equals": "AG"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2423 {"symbol": "W", "name": "Weak", "equals": "AT"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2424 {"symbol": "S", "name": "Strong", "equals": "CG"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2425 {"symbol": "Y", "name": "Pyrimidine", "equals": "CT"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2426 {"symbol": "K", "name": "Keto", "equals": "GT"}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2427 ]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2428 }),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2429 PROTEIN: new StandardAlphabet(4, "PROTEIN", {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2430 "name": "Protein",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2431 "like": "PROTEIN",
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2432 "ncore": 20,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2433 "symbols": [
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2434 {"symbol": "A", "name": "Alanine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2435 {"symbol": "C", "name": "Cysteine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2436 {"symbol": "D", "name": "Aspartic acid", "colour": "FF00FF"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2437 {"symbol": "E", "name": "Glutamic acid", "colour": "FF00FF"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2438 {"symbol": "F", "name": "Phenylalanine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2439 {"symbol": "G", "name": "Glycine", "colour": "FFB300"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2440 {"symbol": "H", "name": "Histidine", "colour": "FFCCCC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2441 {"symbol": "I", "name": "Isoleucine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2442 {"symbol": "K", "name": "Lysine", "colour": "CC0000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2443 {"symbol": "L", "name": "Leucine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2444 {"symbol": "M", "name": "Methionine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2445 {"symbol": "N", "name": "Asparagine", "colour": "008000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2446 {"symbol": "P", "name": "Proline", "colour": "FFFF00"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2447 {"symbol": "Q", "name": "Glutamine", "colour": "008000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2448 {"symbol": "R", "name": "Arginine", "colour": "CC0000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2449 {"symbol": "S", "name": "Serine", "colour": "008000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2450 {"symbol": "T", "name": "Threonine", "colour": "008000"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2451 {"symbol": "V", "name": "Valine", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2452 {"symbol": "W", "name": "Tryptophan", "colour": "0000CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2453 {"symbol": "Y", "name": "Tyrosine", "colour": "33E6CC"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2454 {"symbol": "X", "name": "Any amino acid", "equals": "ACDEFGHIKLMNPQRSTVWY", "aliases": "*."},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2455 {"symbol": "B", "name": "Asparagine or Aspartic acid", "equals": "DN"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2456 {"symbol": "Z", "name": "Glutamine or Glutamic acid", "equals": "EQ"},
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2457 {"symbol": "J", "name": "Leucine or Isoleucine", "equals": "IL"}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2458 ]
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2459 })
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2460 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2461
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2462 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2463 // start Symbol object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2464 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2465 var Symbol = function(alph_index, scale, alphabet) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2466 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2467 //variable prototype
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2468 this.symbol = alphabet.get_symbol(alph_index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2469 this.scale = scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2470 this.colour = alphabet.get_colour(alph_index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2471 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2472
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2473 Symbol.prototype.get_symbol = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2474 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2475 return this.symbol;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2476 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2477
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2478 Symbol.prototype.get_scale = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2479 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2480 return this.scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2481 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2482
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2483 Symbol.prototype.get_colour = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2484 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2485 return this.colour;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2486 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2487
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2488 Symbol.prototype.toString = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2489 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2490 return this.symbol + " " + (Math.round(this.scale*1000)/10) + "%";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2491 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2492
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2493 function compare_symbol(sym1, sym2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2494 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2495 if (sym1.get_scale() < sym2.get_scale()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2496 return -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2497 } else if (sym1.get_scale() > sym2.get_scale()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2498 return 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2499 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2500 return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2501 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2502 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2503 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2504 // end Symbol object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2505 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2506
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2507 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2508 // start Pspm object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2509 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2510 var Pspm = function(matrix, name, ltrim, rtrim, nsites, evalue, pssm, alt) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2511 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2512 var row, col, data, row_sum, delta, evalue_re;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2513 if (typeof name !== "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2514 name = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2515 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2516 this.name = name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2517 //construct
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2518 if (matrix instanceof Pspm) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2519 // copy constructor
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2520 this.alph_length = matrix.alph_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2521 this.motif_length = matrix.motif_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2522 this.name = matrix.name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2523 this.alt = matrix.alt;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2524 this.nsites = matrix.nsites;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2525 this.evalue = matrix.evalue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2526 this.ltrim = matrix.ltrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2527 this.rtrim = matrix.rtrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2528 this.pspm = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2529 for (row = 0; row < matrix.motif_length; row++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2530 this.pspm[row] = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2531 for (col = 0; col < matrix.alph_length; col++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2532 this.pspm[row][col] = matrix.pspm[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2533 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2534 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2535 if (matrix.pssm != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2536 this.pssm = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2537 for (row = 0; row < matrix.motif_length; row++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2538 this.pspm[row] = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2539 for (col = 0; col < matrix.alph_length; col++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2540 this.pssm[row][col] = matrix.pssm[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2541 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2542 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2543 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2544 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2545 // check parameters
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2546 if (ltrim == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2547 ltrim = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2548 } else if (typeof ltrim !== "number" || ltrim % 1 !== 0 || ltrim < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2549 throw new Error("ltrim must be a non-negative integer, got: " + ltrim);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2550 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2551 if (rtrim == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2552 rtrim = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2553 } else if (typeof rtrim !== "number" || rtrim % 1 !== 0 || rtrim < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2554 throw new Error("rtrim must be a non-negative integer, got: " + rtrim);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2555 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2556 if (nsites != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2557 if (typeof nsites !== "number" || nsites < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2558 throw new Error("nsites must be a positive number, got: " + nsites);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2559 } else if (nsites == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2560 nsites = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2561 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2562 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2563 if (evalue != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2564 if (typeof evalue === "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2565 if (evalue < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2566 throw new Error("evalue must be a non-negative number, got: " + evalue);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2567 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2568 } else if (typeof evalue === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2569 evalue_re = /^((?:[+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|inf)$/;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2570 if (!evalue_re.test(evalue)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2571 throw new Error("evalue must be a non-negative number, got: " + evalue);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2572 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2573 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2574 throw new Error("evalue must be a non-negative number, got: " + evalue);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2575 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2576 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2577 // set properties
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2578 this.name = name;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2579 this.alt = alt;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2580 this.nsites = nsites;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2581 this.evalue = evalue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2582 this.ltrim = ltrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2583 this.rtrim = rtrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2584 if (typeof matrix === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2585 // string constructor
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2586 data = parse_pspm_string(matrix);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2587 this.alph_length = data["alph_length"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2588 this.motif_length = data["motif_length"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2589 this.pspm = data["pspm"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2590 if (this.evalue == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2591 if (data["evalue"] != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2592 this.evalue = data["evalue"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2593 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2594 this.evalue = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2595 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2596 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2597 if (this.nsites == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2598 if (typeof data["nsites"] === "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2599 this.nsites = data["nsites"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2600 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2601 this.nsites = 20;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2602 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2603 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2604 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2605 // assume pspm is a nested array
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2606 this.motif_length = matrix.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2607 this.alph_length = (matrix.length > 0 ? matrix[0].length : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2608 if (this.nsites == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2609 this.nsites = 20;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2610 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2611 if (this.evalue == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2612 this.evalue = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2613 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2614 this.pspm = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2615 // copy pspm and check
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2616 for (row = 0; row < this.motif_length; row++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2617 if (this.alph_length != matrix[row].length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2618 throw new Error("COLUMN_MISMATCH");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2619 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2620 this.pspm[row] = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2621 row_sum = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2622 for (col = 0; col < this.alph_length; col++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2623 this.pspm[row][col] = matrix[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2624 row_sum += this.pspm[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2625 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2626 delta = 0.1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2627 if (isNaN(row_sum) || (row_sum > 1 && (row_sum - 1) > delta) ||
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2628 (row_sum < 1 && (1 - row_sum) > delta)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2629 throw new Error("INVALID_SUM");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2630 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2631 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2632 // copy pssm
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2633 if (pssm != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2634 this.pssm = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2635 for (row = 0; row < this.motif_length; row++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2636 this.pssm[row] = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2637 for (col = 0; col < this.alph_length; col++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2638 this.pssm[row][col] = pssm[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2639 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2640 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2641 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2642 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2643 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2644 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2645
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2646 Pspm.prototype.copy = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2647 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2648 return new Pspm(this);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2649 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2650
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2651 Pspm.prototype.reverse = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2652 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2653 var x, y, temp, temp_trim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2654 //reverse
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2655 x = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2656 y = this.motif_length-1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2657 while (x < y) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2658 temp = this.pspm[x];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2659 this.pspm[x] = this.pspm[y];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2660 this.pspm[y] = temp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2661 x++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2662 y--;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2663 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2664 // reverse pssm (if defined)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2665 if (typeof this.pssm !== "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2666 //reverse
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2667 x = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2668 y = this.motif_length-1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2669 while (x < y) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2670 temp = this.pssm[x];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2671 this.pspm[x] = this.pssm[y];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2672 this.pssm[y] = temp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2673 x++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2674 y--;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2675 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2676 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2677 //swap triming
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2678 temp_trim = this.ltrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2679 this.ltrim = this.rtrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2680 this.rtrim = temp_trim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2681 return this; //allow function chaining...
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2682 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2683
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2684 Pspm.prototype.reverse_complement = function(alphabet) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2685 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2686 var x, y, temp, i, row, c, temp_trim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2687 if (this.alph_length != alphabet.get_size_core()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2688 throw new Error("The alphabet size does not match the size of the pspm.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2689 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2690 if (!alphabet.has_complement()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2691 throw new Error("The specified alphabet can not be complemented.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2692 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2693 // reverse motif
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2694 this.reverse();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2695 //complement
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2696 for (x = 0; x < this.motif_length; x++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2697 row = this.pspm[x];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2698 for (i = 0; i < row.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2699 c = alphabet.get_complement(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2700 if (c < i) continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2701 temp = row[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2702 row[i] = row[c];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2703 row[c] = temp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2704 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2705 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2706 // complement pssm (if defined)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2707 if (typeof this.pssm !== "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2708 //complement
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2709 for (x = 0; x < this.motif_length; x++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2710 row = this.pssm[x];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2711 for (i = 0; i < row.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2712 c = alphabet.get_complement(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2713 if (c < i) continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2714 temp = row[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2715 row[i] = row[c];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2716 row[c] = temp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2717 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2718 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2719 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2720 return this; //allow function chaining...
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2721 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2722
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2723 Pspm.prototype.get_stack = function(position, alphabet, ssc) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2724 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2725 var row, stack_ic, alphabet_ic, stack, i, sym;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2726 if (this.alph_length != alphabet.get_size_core()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2727 throw new Error("The alphabet size does not match the size of the pspm.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2728 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2729 row = this.pspm[position];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2730 stack_ic = this.get_stack_ic(position, alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2731 if (ssc) stack_ic -= this.get_error(alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2732 alphabet_ic = alphabet.get_ic();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2733 stack = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2734 for (i = 0; i < this.alph_length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2735 sym = new Symbol(i, row[i]*stack_ic/alphabet_ic, alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2736 if (sym.get_scale() <= 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2737 continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2738 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2739 stack.push(sym);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2740 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2741 stack.sort(compare_symbol);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2742 return stack;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2743 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2744
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2745 Pspm.prototype.get_stack_ic = function(position, alphabet) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2746 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2747 var row, H, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2748 if (this.alph_length != alphabet.get_size_core()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2749 throw new Error("The alphabet size does not match the size fo the pspm.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2750 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2751 row = this.pspm[position];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2752 H = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2753 for (i = 0; i < this.alph_length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2754 if (row[i] === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2755 continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2756 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2757 H -= (row[i] * (Math.log(row[i]) / Math.LN2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2758 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2759 return alphabet.get_ic() - H;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2760 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2761
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2762 Pspm.prototype.get_error = function(alphabet) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2763 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2764 if (this.nsites === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2765 return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2766 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2767 return (alphabet.get_size_core()-1) / (2 * Math.LN2 * this.nsites);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2768 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2769
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2770 Pspm.prototype.get_motif_length = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2771 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2772 return this.motif_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2773 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2774
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2775 Pspm.prototype.get_alph_length = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2776 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2777 return this.alph_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2778 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2779
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2780 Pspm.prototype.get_left_trim = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2781 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2782 return this.ltrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2783 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2784
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2785 Pspm.prototype.get_right_trim = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2786 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2787 return this.rtrim;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2788 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2789
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2790 Pspm.prototype.as_best_match = function(alphabet) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2791 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2792 var match, odds, best_odds, best_index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2793 var i, j;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2794 match = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2795 for (i = 0; i < this.motif_length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2796 best_index = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2797 best_odds = this.pspm[i][0] / alphabet.get_bg_freq(0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2798 for (j = 1; j < this.alph_length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2799 odds = this.pspm[i][j] / alphabet.get_bg_freq(j);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2800 if (odds > best_odds) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2801 best_odds = odds;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2802 best_index = j;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2803 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2804 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2805 match += alphabet.get_symbol(best_index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2806 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2807 return match;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2808 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2809
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2810 Pspm.prototype.as_count_matrix = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2811 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2812 var count, count_text, text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2813 var i, j;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2814 text = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2815 for (i = 0; i < this.motif_length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2816 if (i !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2817 text += "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2818 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2819 for (j = 0; j < this.alph_length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2820 if (j !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2821 text += " ";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2822 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2823 count = Math.round(this.nsites * this.pspm[i][j]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2824 count_text = "" + count;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2825 // pad up to length of 4
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2826 if (count_text.length < 4) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2827 text += (new Array(5 - count_text.length)).join(" ") + count_text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2828 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2829 text += count_text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2830 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2831 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2832 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2833 return text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2834 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2835
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2836 Pspm.prototype.as_probability_matrix = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2837 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2838 var text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2839 var i, j;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2840 text = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2841 for (i = 0; i < this.motif_length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2842 if (i !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2843 text += "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2844 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2845 for (j = 0; j < this.alph_length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2846 if (j !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2847 text += " ";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2848 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2849 text += this.pspm[i][j].toFixed(6);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2850 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2851 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2852 return text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2853 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2854
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2855 Pspm.prototype.as_score_matrix = function(alphabet, pseudo) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2856 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2857 var me, score, out, row, col, score_text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2858 me = this;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2859 if (typeof this.pssm === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2860 if (!(typeof alphabet === "object" && alphabet != null && alphabet instanceof Alphabet)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2861 throw new Error("The alphabet is required to generate the pssm.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2862 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2863 if (typeof pseudo === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2864 pseudo = 0.01;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2865 } else if (typeof pseudo !== "number" || pseudo < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2866 throw new Error("Expected positive number for pseudocount");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2867 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2868 score = function(row, col) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2869 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2870 var p, bg, p2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2871 p = me.pspm[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2872 bg = alphabet.get_bg_freq(col);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2873 p2 = (p * me.nsites + bg * pseudo) / (me.nsites + pseudo);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2874 return (p2 > 0 ? Math.round((Math.log(p2 / bg) / Math.LN2) * 100) : -10000);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2875 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2876 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2877 score = function(row, col) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2878 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2879 return me.pssm[row][col];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2880 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2881 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2882 out = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2883 for (row = 0; row < this.motif_length; row++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2884 for (col = 0; col < this.alph_length; col++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2885 if (col !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2886 out += " ";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2887 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2888 score_text = "" + score(row, col);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2889 // pad out to 6 characters
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2890 if (score_text.length < 6) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2891 out += (new Array(7 - score_text.length)).join(" ") + score_text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2892 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2893 out += score_text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2894 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2895 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2896 out += "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2897 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2898 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2899 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2900
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2901 Pspm.prototype.as_pspm = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2902 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2903 return "letter-probability matrix: alength= " + this.alph_length +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2904 " w= " + this.motif_length + " nsites= " + this.nsites +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2905 " E= " + (typeof this.evalue === "number" ?
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2906 this.evalue.toExponential() : this.evalue) + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2907 this.as_probability_matrix();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2908 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2909
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2910 Pspm.prototype.as_pssm = function(alphabet, pseudo) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2911 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2912 return "log-odds matrix: alength= " + this.alph_length +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2913 " w= " + this.motif_length +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2914 " E= " + (typeof this.evalue == "number" ?
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2915 this.evalue.toExponential() : this.evalue) + "\n" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2916 this.as_score_matrix(alphabet, pseudo);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2917 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2918
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2919 Pspm.prototype.as_meme = function(options) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2920 var with_header, with_pspm, with_pssm, version, alphabet, bg_source, pseudocount, strands;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2921 var out, alen, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2922 // get the options
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2923 if (typeof options !== "object" || options === null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2924 options = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2925 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2926 with_header = (typeof options["with_header"] === "boolean" ? options["with_header"] : false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2927 with_pspm = (typeof options["with_pspm"] === "boolean" ? options["with_pspm"] : false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2928 with_pssm = (typeof options["with_pssm"] === "boolean" ? options["with_pssm"] : false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2929 if (!with_pspm && !with_pssm) with_pspm = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2930 if (with_header) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2931 if (typeof options["version"] === "string" && /^\d+(?:\.\d+){0,2}$/.test(options["version"])) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2932 version = options["version"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2933 } else if (typeof options["version"] === "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2934 version = options["version"].toFixed(0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2935 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2936 version = "4";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2937 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2938 if (typeof options["strands"] === "number" && options["strands"] === 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2939 strands = 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2940 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2941 strands = 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2942 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2943 if (typeof options["bg_source"] === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2944 bg_source = options["bg_source"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2945 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2946 bg_source = "unknown source";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2947 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2948 if (typeof options["alphabet"] === "object" && options["alphabet"] != null
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2949 && options["alphabet"] instanceof Alphabet) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2950 alphabet = options["alphabet"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2951 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2952 throw new Error("The alphabet is required to generate the header.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2953 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2954 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2955 // now create the output
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2956 out = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2957 if (with_header) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2958 out = "MEME version " + version + "\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2959 out += alphabet.as_meme() + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2960 if (alphabet.has_complement()) { // assume DNA has both strands unless otherwise specified
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2961 out += "strands: " + (strands === 1 ? "+" : "+ -") + "\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2962 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2963 out += "Background letter frequencies (from " + bg_source + "):\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2964 alen = alphabet.get_size_core();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2965 for (i = 0; i < alen; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2966 if (i !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2967 if (i % 9 === 0) { // maximum of nine entries per line
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2968 out += "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2969 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2970 out += " ";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2971 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2972 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2973 out += alphabet.get_symbol(i) + " " + alphabet.get_bg_freq(i).toFixed(3);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2974 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2975 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2976 out += "\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2977 out += "MOTIF " + this.name + (this.alt == null ? "" : " " + this.alt);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2978 if (with_pssm) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2979 out += "\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2980 out += this.as_pssm(options["alphabet"], options["pseudocount"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2981 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2982 if (with_pspm) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2983 out += "\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2984 out += this.as_pspm();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2985 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2986 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2987 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2988
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2989 Pspm.prototype.toString = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2990 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2991 var str, i, row;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2992 str = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2993 for (i = 0; i < this.pspm.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2994 row = this.pspm[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2995 str += row.join("\t") + "\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2996 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2997 return str;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2998 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2999
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3000 function parse_pspm_properties(str) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3001 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3002 var parts, i, eqpos, before, after, properties, prop, num, num_re;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3003 num_re = /^((?:[+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|inf)$/;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3004 parts = trim(str).split(/\s+/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3005 // split up words containing =
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3006 for (i = 0; i < parts.length;) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3007 eqpos = parts[i].indexOf("=");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3008 if (eqpos != -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3009 before = parts[i].substr(0, eqpos);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3010 after = parts[i].substr(eqpos+1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3011 if (before.length > 0 && after.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3012 parts.splice(i, 1, before, "=", after);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3013 i += 3;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3014 } else if (before.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3015 parts.splice(i, 1, before, "=");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3016 i += 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3017 } else if (after.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3018 parts.splice(i, 1, "=", after);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3019 i += 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3020 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3021 parts.splice(i, 1, "=");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3022 i++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3023 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3024 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3025 i++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3026 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3027 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3028 properties = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3029 for (i = 0; i < parts.length; i += 3) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3030 if (parts.length - i < 3) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3031 throw new Error("Expected PSPM property was incomplete. "+
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3032 "Remaing parts are: " + parts.slice(i).join(" "));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3033 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3034 if (parts[i+1] !== "=") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3035 throw new Error("Expected '=' in PSPM property between key and " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3036 "value but got " + parts[i+1]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3037 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3038 prop = parts[i].toLowerCase();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3039 num = parts[i+2];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3040 if (!num_re.test(num)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3041 throw new Error("Expected numeric value for PSPM property '" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3042 prop + "' but got '" + num + "'");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3043 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3044 properties[prop] = num;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3045 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3046 return properties;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3047 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3048
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3049 function parse_pspm_string(pspm_string) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3050 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3051 var header_re, lines, first_line, line_num, col_num, alph_length,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3052 motif_length, nsites, evalue, pspm, i, line, match, props, parts,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3053 j, prob;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3054 header_re = /^letter-probability\s+matrix:(.*)$/i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3055 lines = pspm_string.split(/\n/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3056 first_line = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3057 line_num = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3058 col_num = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3059 alph_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3060 motif_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3061 nsites;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3062 evalue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3063 pspm = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3064 for (i = 0; i < lines.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3065 line = trim(lines[i]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3066 if (line.length === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3067 continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3068 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3069 // check the first line for a header though allow matrices without it
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3070 if (first_line) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3071 first_line = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3072 match = header_re.exec(line);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3073 if (match !== null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3074 props = parse_pspm_properties(match[1]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3075 if (props.hasOwnProperty("alength")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3076 alph_length = parseFloat(props["alength"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3077 if (alph_length != 4 && alph_length != 20) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3078 throw new Error("PSPM property alength should be 4 or 20" +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3079 " but got " + alph_length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3080 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3081 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3082 if (props.hasOwnProperty("w")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3083 motif_length = parseFloat(props["w"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3084 if (motif_length % 1 !== 0 || motif_length < 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3085 throw new Error("PSPM property w should be an integer larger " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3086 "than zero but got " + motif_length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3087 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3088 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3089 if (props.hasOwnProperty("nsites")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3090 nsites = parseFloat(props["nsites"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3091 if (nsites <= 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3092 throw new Error("PSPM property nsites should be larger than " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3093 "zero but got " + nsites);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3094 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3095 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3096 if (props.hasOwnProperty("e")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3097 evalue = props["e"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3098 if (evalue < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3099 throw new Error("PSPM property evalue should be " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3100 "non-negative but got " + evalue);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3101 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3102 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3103 continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3104 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3105 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3106 pspm[line_num] = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3107 col_num = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3108 parts = line.split(/\s+/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3109 for (j = 0; j < parts.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3110 prob = parseFloat(parts[j]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3111 if (prob != parts[j] || prob < 0 || prob > 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3112 throw new Error("Expected probability but got '" + parts[j] + "'");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3113 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3114 pspm[line_num][col_num] = prob;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3115 col_num++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3116 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3117 line_num++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3118 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3119 if (typeof motif_length === "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3120 if (pspm.length != motif_length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3121 throw new Error("Expected PSPM to have a motif length of " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3122 motif_length + " but it was actually " + pspm.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3123 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3124 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3125 motif_length = pspm.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3126 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3127 if (typeof alph_length !== "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3128 alph_length = pspm[0].length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3129 if (alph_length != 4 && alph_length != 20) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3130 throw new Error("Expected length of first row in the PSPM to be " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3131 "either 4 or 20 but got " + alph_length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3132 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3133 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3134 for (i = 0; i < pspm.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3135 if (pspm[i].length != alph_length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3136 throw new Error("Expected PSPM row " + i + " to have a length of " +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3137 alph_length + " but the length was " + pspm[i].length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3138 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3139 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3140 return {"pspm": pspm, "motif_length": motif_length,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3141 "alph_length": alph_length, "nsites": nsites, "evalue": evalue};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3142 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3143 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3144 // end Pspm object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3145 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3146
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3147 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3148 // start Logo object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3149 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3150
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3151 var Logo = function(alphabet, options) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3152 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3153 this.alphabet = alphabet;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3154 this.fine_text = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3155 this.x_axis = 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3156 this.y_axis = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3157 this.xlate_nsyms = 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3158 this.xlate_start = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3159 this.xlate_end = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3160 this.pspm_list = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3161 this.pspm_column = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3162 this.rows = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3163 this.columns = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3164 if (typeof options === "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3165 // the old method signature had fine_text here so we support that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3166 this.fine_text = options;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3167 } else if (typeof options === "object" && options != null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3168 this.fine_text = (typeof options.fine_text === "string" ? options.fine_text : "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3169 this.x_axis = (typeof options.x_axis === "boolean" ? (options.x_axis ? 1 : 0) : 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3170 if (options.x_axis_hidden != null && options.x_axis_hidden) this.x_axis = -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3171 this.y_axis = (typeof options.y_axis === "boolean" ? options.y_axis : true);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3172 this.xlate_nsyms = (typeof options.xlate_nsyms === "number" ? options.xlate_nsyms : this.xlate_nsyms);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3173 this.xlate_start = (typeof options.xlate_start === "number" ? options.xlate_start : this.xlate_start);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3174 this.xlate_end = (typeof options.xlate_end === "number" ? options.xlate_end : this.xlate_end);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3175 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3176 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3177
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3178 Logo.prototype.add_pspm = function(pspm, column) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3179 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3180 var col;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3181 if (typeof column === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3182 column = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3183 } else if (column < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3184 throw new Error("Column index out of bounds.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3185 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3186 this.pspm_list[this.rows] = pspm;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3187 this.pspm_column[this.rows] = column;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3188 this.rows++;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3189 col = column + pspm.get_motif_length();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3190 if (col > this.columns) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3191 this.columns = col;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3192 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3193 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3194
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3195 Logo.prototype.get_columns = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3196 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3197 return this.columns;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3198 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3199
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3200 Logo.prototype.get_xlate_nsyms = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3201 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3202 return this.xlate_nsyms;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3203 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3204
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3205 Logo.prototype.get_xlate_start = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3206 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3207 return (this.xlate_start != null ? this.xlate_start : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3208 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3209
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3210 Logo.prototype.get_xlate_end = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3211 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3212 return (this.xlate_end != null ? this.xlate_end : this.columns * this.xlate_nsyms);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3213 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3214
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3215 Logo.prototype.get_xlate_columns = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3216 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3217 return this.get_xlate_end() - this.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3218 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3219
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3220 Logo.prototype.get_rows = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3221 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3222 return this.rows;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3223 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3224
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3225 Logo.prototype.get_pspm = function(row_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3226 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3227 if (row_index < 0 || row_index >= this.rows) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3228 throw new Error("INDEX_OUT_OF_BOUNDS");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3229 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3230 return this.pspm_list[row_index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3231 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3232
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3233 Logo.prototype.get_offset = function(row_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3234 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3235 if (row_index < 0 || row_index >= this.rows) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3236 throw new Error("INDEX_OUT_OF_BOUNDS");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3237 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3238 return this.pspm_column[row_index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3239 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3240
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3241 Logo.prototype._as_eps_data = function(ssc, errbars) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3242 var i, j, pos, stack_pos, pspm, stack, sym, out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3243 out = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3244 for (i = 0; i < this.rows; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3245 out += "\nStartLine\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3246 // Indent
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3247 for (j = 0; j < this.pspm_column[i]; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3248 out += "() startstack\nendstack\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3249 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3250 pspm = this.pspm_list[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3251 if (pspm.get_left_trim() > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3252 out += "MuteColour\nDrawTrimEdge\n" + pspm.get_left_trim() + " DrawTrimBg\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3253 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3254 for (pos = 0; pos < pspm.get_motif_length(); pos++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3255 if (pos != 0 && pos == pspm.get_left_trim()) { // enable full colour
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3256 out += "DrawTrimEdge\nRestoreColour\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3257 } else if (pos == (pspm.get_motif_length() - pspm.get_right_trim())) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3258 out += "MuteColour\n" + pspm.get_right_trim() + " DrawTrimBg\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3259 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3260 out += "(" + (pos + 1) + ") startstack\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3261 stack = pspm.get_stack(pos, this.alphabet, ssc);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3262 for (stack_pos = 0; stack_pos < stack.length; stack_pos++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3263 sym = stack[stack_pos];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3264 out += " " + (sym.get_scale() * this.alphabet.get_ic()) + " (" + sym.get_symbol() + ") numchar\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3265 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3266 if (errbars) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3267 out += " " + pspm.get_error(this.alphabet) + " Ibeam\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3268 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3269 out += "endstack\n\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3270 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3271 if (pspm.get_right_trim() > 0 || pspm.get_left_trim() == pspm.get_motif_length()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3272 out += "RestoreColour\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3273 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3274 out += "EndLine\n";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3275 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3276 return out;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3277 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3278
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3279 Logo.prototype.as_eps = function(options) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3280 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3281 if (this.xlate_nsyms != 1) throw new Error("Unsupported setting xlate_nsyms for EPS");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3282 if (this.xlate_start != null) throw new Error("Unsupported setting xlate_start for EPS");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3283 if (this.xlate_end != null) throw new Error("Unsupported setting xlate_end for EPS");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3284
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3285 var LOGOHEIGHT = 7.5; // default height of line in cm
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3286 var cm2pts, height, width, now, ssc, errbars;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3287 if (typeof options === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3288 options = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3289 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3290 cm2pts = 72 / 2.54;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3291 if (typeof options.logo_height == "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3292 height = options.logo_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3293 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3294 height = LOGOHEIGHT * this.rows;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3295 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3296 if (typeof options.logo_width == "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3297 width = options.logo_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3298 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3299 width = this.columns + 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3300 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3301 now = new Date();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3302 ssc = (typeof options.ssc == "boolean" ? options.ssc : false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3303 errbars = (typeof options.show_error_bar == "boolean" ? options.show_error_bar : ssc);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3304 var values = {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3305 "LOGOHEIGHT": height,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3306 "LOGOWIDTH": width,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3307 "BOUNDINGHEIGHT": Math.round(height * cm2pts),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3308 "BOUNDINGWIDTH": Math.round(width * cm2pts),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3309 "LOGOLINEHEIGHT": (height / this.rows),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3310 "CHARSPERLINE": this.columns,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3311 "BARBITS": this.alphabet.get_ic(),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3312 "LOGOTYPE": (this.alphabet.has_complement() ? "NA" : "AA"),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3313 "CREATIONDATE": now.getDate() + "." + (now.getMonth() + 1) + "." + now.getFullYear() + " " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds(),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3314 "ERRORBARFRACTION": (typeof options.error_bar_fraction == "number" ? options.error_bar_fraction : 1.0),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3315 "TICBITS": (typeof options.ticbits == "number" ? options.ticbits : 1.0),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3316 "TITLE": (typeof options.title == "string" ? options.title : ""),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3317 "FINEPRINT": (typeof options.fineprint == "string" ? options.fineprint : this.fine_text),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3318 "XAXISLABEL": (typeof options.xaxislabel == "string" ? options.xaxislabel : ""),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3319 "YAXISLABEL": (typeof options.yaxislabel == "string" ? options.yaxislabel : "bits"),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3320 "SSC": ssc,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3321 "YAXIS": (typeof options.show_y_axis == "boolean" ? options.show_y_axis : this.y_axis),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3322 "SHOWENDS": (typeof options.show_ends == "boolean" ? options.show_ends : false),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3323 "ERRBAR": errbars,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3324 "OUTLINE": (typeof options.show_outline == "boolean" ? options.show_outline : false),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3325 "NUMBERING": (typeof options.show_numbering == "boolean" ? options.show_numbering : this.x_axis != 0),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3326 "SHOWINGBOX": (typeof options.show_box == "boolean" ? options.show_box : false),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3327 "CREATOR": (typeof options.creator == "string" ? options.creator : "motif_logo.js"),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3328 "FONTSIZE": (typeof options.label_font_size == "number" ? options.label_font_size : 12),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3329 "TITLEFONTSIZE": (typeof options.title_font_size == "number" ? options.title_font_size : 12),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3330 "SMALLFONTSIZE": (typeof options.small_font_size == "number" ? options.small_font_size : 6),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3331 "TOPMARGIN" : (typeof options.top_margin == "number" ? options.top_margin : 0.9),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3332 "BOTTOMMARGIN": (typeof options.bottom_margin == "number" ? options.bottom_margin : 0.9),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3333 "COLORDICT": this.alphabet._as_eps_dict(),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3334 "DATA": this._as_eps_data(ssc, errbars)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3335 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3336 // now this requires that the script containing the template has been imported!
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3337 return motif_logo_template(values);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3338 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3339
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3340 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3341 // end Logo object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3342 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3343
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3344 // calculate the exact size (in pixels) of an object drawn on the
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3345 // canvas assuming that the background of the canvas is transparent.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3346 function canvas_bounds(ctx, cwidth, cheight) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3347 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3348 var data, r, c, top_line, bottom_line, left_line, right_line,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3349 txt_width, txt_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3350
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3351 // extract the image data
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3352 data = ctx.getImageData(0, 0, cwidth, cheight).data;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3353
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3354 // set initial values
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3355 top_line = -1; bottom_line = -1; left_line = -1; right_line = -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3356 txt_width = 0; txt_height = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3357
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3358 // Find the top-most line with a non-transparent pixel
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3359 for (r = 0; r < cheight; r++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3360 for (c = 0; c < cwidth; c++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3361 if (data[r * cwidth * 4 + c * 4 + 3]) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3362 top_line = r;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3363 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3364 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3365 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3366 if (top_line != -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3367 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3368 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3369 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3370
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3371 // Only bother looking if we found at least one set pixel...
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3372 if (top_line != -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3373
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3374 //find the last line with a non-transparent pixel
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3375 for (r = cheight-1; r >= top_line; r--) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3376 for(c = 0; c < cwidth; c++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3377 if(data[r * cwidth * 4 + c * 4 + 3]) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3378 bottom_line = r;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3379 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3380 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3381 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3382 if (bottom_line != -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3383 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3384 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3385 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3386 // calculate height
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3387 txt_height = bottom_line - top_line + 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3388
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3389 // Find the left-most line with a non-transparent pixel
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3390 for (c = 0; c < cwidth; c++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3391 for (r = top_line; r <= bottom_line; r++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3392 if (data[r * cwidth * 4 + c * 4 + 3]) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3393 left_line = c;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3394 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3395 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3396 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3397 if (left_line != -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3398 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3399 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3400 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3401
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3402 //find the right most line with a non-transparent pixel
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3403 for (c = cwidth-1; c >= left_line; c--) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3404 for(r = top_line; r <= bottom_line; r++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3405 if(data[r * cwidth * 4 + c * 4 + 3]) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3406 right_line = c;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3407 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3408 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3409 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3410 if (right_line != -1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3411 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3412 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3413 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3414 txt_width = right_line - left_line + 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3415 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3416
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3417 //return the bounds
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3418 return {bound_top: top_line, bound_bottom: bottom_line,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3419 bound_left: left_line, bound_right: right_line, width: txt_width,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3420 height: txt_height};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3421 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3422
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3423 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3424 // start RasterizedAlphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3425 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3426
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3427 // Rasterize Alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3428 // 1) Measure width of text at default font for all symbols in alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3429 // 2) sort in width ascending
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3430 // 3) Drop the top and bottom 10% (designed to ignore outliers like 'W' and 'I')
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3431 // 4) Calculate the average as the maximum scaling factor (designed to stop I becoming a rectangular blob).
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3432 // 5) Assume scale of zero would result in width of zero, interpolate scale required to make perfect width font
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3433 // 6) Draw text onto temp canvas at calculated scale
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3434 // 7) Find bounds of drawn text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3435 // 8) Paint on to another canvas at the desired height (but only scaling width to fit if larger).
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3436 var RasterizedAlphabet = function(alphabet, logo_scale, font, width) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3437 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3438 var default_size, safety_pad, canvas, ctx, middle, baseline, widths, sizes,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3439 i, sym, size, tenpercent, avg_width, scale,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3440 target_width, target_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3441 //variable prototypes
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3442 this.alphabet = alphabet;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3443 this.scale = logo_scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3444 this.sym_cache = {};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3445 this.stack_num_cache = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3446 this.scale_num_cache = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3447 // size of canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3448 default_size = 60; // size of measuring canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3449 safety_pad = 20; // pixels to pad around so we don't miss the edges
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3450 // create a canvas to do our measuring
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3451 canvas = document.createElement("canvas");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3452 if (!canvas.getContext) throw new Error("No canvas support");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3453 canvas.width = default_size + 2 * safety_pad;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3454 canvas.height = default_size + 2 * safety_pad;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3455 middle = Math.round(canvas.width / 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3456 baseline = Math.round(canvas.height - safety_pad);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3457 ctx = canvas.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3458 if (!supports_text(ctx)) throw new Error("Canvas does not support text");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3459 ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3460 ctx.textAlign = "center";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3461 ctx.translate(middle, baseline);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3462 // list of widths
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3463 widths = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3464 sizes = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3465 //now measure each letter in the alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3466 for (i = 0; i < alphabet.get_size_core(); ++i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3467 // reset the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3468 ctx.clearRect(0, 0, canvas.width, canvas.height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3469 ctx.fillStyle = alphabet.get_colour(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3470 // draw the test text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3471 ctx.fillText(alphabet.get_symbol(i), 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3472 //measure
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3473 size = canvas_bounds(ctx, canvas.width, canvas.height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3474 if (size.width === 0) throw new Error("Invisible symbol!");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3475 widths.push(size.width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3476 sizes[i] = size;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3477 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3478 //sort the widths
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3479 widths.sort(function(a,b) {return a - b;});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3480 //drop 10% of the items off each end
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3481 tenpercent = Math.floor(widths.length / 10);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3482 for (i = 0; i < tenpercent; ++i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3483 widths.pop();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3484 widths.shift();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3485 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3486 //calculate average width
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3487 avg_width = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3488 for (i = 0; i < widths.length; ++i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3489 avg_width += widths[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3490 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3491 avg_width /= widths.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3492 // calculate the target width
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3493 target_width = width * this.scale * 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3494 // calculate scales
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3495 for (i = 0; i < alphabet.get_size_core(); ++i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3496 sym = alphabet.get_symbol(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3497 size = sizes[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3498 // calculate scale
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3499 scale = target_width / Math.max(avg_width, size.width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3500 // estimate scaled height
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3501 target_height = size.height * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3502 // create an appropriately sized canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3503 canvas = document.createElement("canvas");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3504 canvas.width = target_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3505 canvas.height = target_height + safety_pad * 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3506 // calculate the middle
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3507 middle = Math.round(canvas.width / 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3508 // calculate the baseline
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3509 baseline = Math.round(canvas.height - safety_pad);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3510 // get the context and prepare to draw the rasterized text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3511 ctx = canvas.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3512 ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3513 ctx.fillStyle = alphabet.get_colour(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3514 ctx.textAlign = "center";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3515 ctx.translate(middle, baseline);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3516 ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3517 ctx.scale(scale, scale);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3518 // draw the text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3519 ctx.fillText(sym, 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3520 ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3521 this.sym_cache[sym] = {"image": canvas, "size": canvas_bounds(ctx, canvas.width, canvas.height)};
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3522 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3523 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3524
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3525 RasterizedAlphabet.prototype.get_alphabet = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3526 return this.alphabet;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3527 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3528
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3529 RasterizedAlphabet.prototype.get_scale = function() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3530 return this.scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3531 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3532
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3533 RasterizedAlphabet.prototype.draw_stack_sym = function(ctx, letter, dx, dy, dWidth, dHeight) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3534 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3535 var entry, image, size;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3536 entry = this.sym_cache[letter];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3537 image = entry.image;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3538 size = entry.size;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3539 ctx.drawImage(image, 0, size.bound_top -1, image.width, size.height+1, dx, dy, dWidth, dHeight);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3540 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3541
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3542 RasterizedAlphabet.prototype.draw_stack_num = function(ctx, font, stack_width, index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3543 var image, image_ctx, text_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3544 if (index >= this.stack_num_cache.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3545 image = document.createElement("canvas");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3546 // measure the text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3547 image_ctx = image.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3548 image_ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3549 image_ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3550 text_length = image_ctx.measureText("" + (index + 1)).width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3551 image_ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3552 // resize the canvas to fit
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3553 image.width = Math.ceil(stack_width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3554 image.height = Math.ceil(text_length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3555 // draw the text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3556 image_ctx = image.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3557 image_ctx.translate(Math.round(stack_width / 2), 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3558 image_ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3559 image_ctx.textBaseline = "middle";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3560 image_ctx.textAlign = "right";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3561 image_ctx.rotate(-(Math.PI / 2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3562 image_ctx.fillText("" + (index + 1), 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3563 this.stack_num_cache[index] = image;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3564 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3565 image = this.stack_num_cache[index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3566 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3567 ctx.drawImage(image, 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3568 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3569
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3570 RasterizedAlphabet.prototype.draw_scale_num = function(ctx, font, num) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3571 var image, image_ctx, text_size, m_length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3572 if (num >= this.scale_num_cache.length) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3573 image = document.createElement("canvas");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3574 // measure the text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3575 image_ctx = image.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3576 image_ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3577 text_size = image_ctx.measureText("" + num);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3578 if (text_size.actualBoundingBoxAscent && text_size.actualBoundingBoxDesent) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3579 // resize the canvas to fit
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3580 image.width = Math.ceil(text_size.width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3581 image.height = Math.ceil(text_size.actualBoundingBoxAscent + text_size.actualBoundingBoxDesent);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3582 // draw the text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3583 image_ctx = image.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3584 image_ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3585 image_ctx.textAlign = "right";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3586 image_ctx.fillText("" + num, image.width, text_size.actualBoundingBoxAscent);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3587 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3588 // measure width of 'm' to approximate height, we double it later anyway
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3589 m_length = image_ctx.measureText("m").width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3590 // resize the canvas to fit
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3591 image.width = Math.ceil(text_size.width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3592 image.height = Math.ceil(2 * m_length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3593 // draw the text
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3594 image_ctx = image.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3595 image_ctx.font = font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3596 image_ctx.textAlign = "right";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3597 image_ctx.textBaseline = "middle";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3598 image_ctx.fillText("" + num, image.width, m_length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3599 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3600 this.scale_num_cache[num] = image;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3601 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3602 image = this.scale_num_cache[num];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3603 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3604 ctx.drawImage(image, -image.width, -Math.round(image.height / 2))
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3605 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3606
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3607 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3608 // end RasterizedAlphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3609 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3610
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3611 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3612 // start LogoMetrics object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3613 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3614
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3615 var LogoMetrics = function(ctx, logo_columns, logo_rows, has_names, has_finetext, x_axis, y_axis) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3616 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3617 var i, row_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3618 //variable prototypes
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3619 this.pad_top = (has_names ? 5 : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3620 this.pad_left = (y_axis ? 10 : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3621 this.pad_right = (has_finetext ? 15 : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3622 this.pad_bottom = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3623 this.pad_middle = 20;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3624 this.name_height = 14;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3625 this.name_font = "bold " + this.name_height + "px Times, sans-serif";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3626 this.name_spacer = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3627 this.y_axis = y_axis;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3628 this.y_label = "bits";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3629 this.y_label_height = 12;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3630 this.y_label_font = "bold " + this.y_label_height + "px Helvetica, sans-serif";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3631 this.y_label_spacer = 3;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3632 this.y_num_height = 12;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3633 this.y_num_width = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3634 this.y_num_font = "bold " + this.y_num_height + "px Helvetica, sans-serif";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3635 this.y_tic_width = 5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3636 this.stack_pad_left = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3637 this.stack_font = "bold 25px Helvetica, sans-serif";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3638 this.stack_height = 90;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3639 this.stack_width = 26;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3640 this.stacks_pad_right = 5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3641 this.x_axis = x_axis;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3642 this.x_num_above = 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3643 this.x_num_height = 12;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3644 this.x_num_width = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3645 this.x_num_font = "bold " + this.x_num_height + "px Helvetica, sans-serif";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3646 this.fine_txt_height = 6;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3647 this.fine_txt_above = 2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3648 this.fine_txt_font = "normal " + this.fine_txt_height + "px Helvetica, sans-serif";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3649 this.letter_metrics = new Array();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3650 this.summed_width = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3651 this.summed_height = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3652 //calculate the width of the y axis numbers
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3653 ctx.font = this.y_num_font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3654 for (i = 0; i <= 2; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3655 this.y_num_width = Math.max(this.y_num_width, ctx.measureText("" + i).width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3656 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3657 //calculate the width of the x axis numbers (but they are rotated so it becomes height)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3658 if (x_axis == 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3659 ctx.font = this.x_num_font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3660 for (i = 1; i <= logo_columns; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3661 this.x_num_width = Math.max(this.x_num_width, ctx.measureText("" + i).width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3662 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3663 } else if (x_axis == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3664 this.x_num_height = 4;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3665 this.x_num_width = 4;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3666 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3667 this.x_num_height = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3668 this.x_num_width = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3669 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3670
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3671 //calculate how much vertical space we want to draw this
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3672 //first we add the padding at the top and bottom since that's always there
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3673 this.summed_height += this.pad_top + this.pad_bottom;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3674 //all except the last row have the same amount of space allocated to them
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3675 if (logo_rows > 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3676 row_height = this.stack_height + this.pad_middle;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3677 if (has_names) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3678 row_height += this.name_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3679 //the label is allowed to overlap into the spacer
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3680 row_height += Math.max(this.y_num_height/2, this.name_spacer);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3681 //the label is allowed to overlap the space used by the other label
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3682 row_height += Math.max(this.y_num_height/2, this.x_num_height + this.x_num_above);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3683 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3684 row_height += this.y_num_height/2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3685 //the label is allowed to overlap the space used by the other label
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3686 row_height += Math.max(this.y_num_height/2, this.x_num_height + this.x_num_above);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3687 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3688 this.summed_height += row_height * (logo_rows - 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3689 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3690 //the last row has the name and fine text below it but no padding
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3691 this.summed_height += this.stack_height + (this.y_axis ? this.y_num_height/2 : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3692
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3693 var fine_txt_total = (has_finetext ? this.fine_txt_height + this.fine_txt_above : 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3694 if (has_names) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3695 this.summed_height += fine_txt_total + this.name_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3696 this.summed_height += Math.max((this.y_axis ? this.y_num_height/2 : 0),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3697 this.x_num_height + this.x_num_above + this.name_spacer);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3698 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3699 this.summed_height += Math.max((this.y_axis ? this.y_num_height/2 : 0),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3700 this.x_num_height + this.x_num_above + fine_txt_total);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3701 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3702
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3703 //calculate how much horizontal space we want to draw this
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3704 //first add the padding at the left and right since that's always there
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3705 this.summed_width += this.pad_left + this.pad_right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3706 if (this.y_axis) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3707 //add on the space for the y-axis label
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3708 this.summed_width += this.y_label_height + this.y_label_spacer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3709 //add on the space for the y-axis
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3710 this.summed_width += this.y_num_width + this.y_tic_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3711 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3712 //add on the space for the stacks
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3713 this.summed_width += (this.stack_pad_left + this.stack_width) * logo_columns;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3714 //add on the padding after the stacks (an offset from the fine text)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3715 this.summed_width += this.stacks_pad_right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3716
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3717 };
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3718
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3719 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3720 // end LogoMetrics object
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3721 //======================================================================
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3722
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3723 //found this trick at http://talideon.com/weblog/2005/02/detecting-broken-images-js.cfm
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3724 function image_ok(img) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3725 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3726 // During the onload event, IE correctly identifies any images that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3727 // weren't downloaded as not complete. Others should too. Gecko-based
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3728 // browsers act like NS4 in that they report this incorrectly.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3729 if (!img.complete) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3730 return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3731 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3732 // However, they do have two very useful properties: naturalWidth and
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3733 // naturalHeight. These give the true size of the image. If it failed
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3734 // to load, either of these should be zero.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3735 if (typeof img.naturalWidth !== "undefined" && img.naturalWidth === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3736 return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3737 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3738 // No other way of checking: assume it's ok.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3739 return true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3740 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3741
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3742 function supports_text(ctx) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3743 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3744 if (!ctx.fillText) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3745 return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3746 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3747 if (!ctx.measureText) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3748 return false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3749 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3750 return true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3751 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3752
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3753 //draws the scale, returns the width
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3754 function draw_scale(ctx, metrics, alphabet_ic, raster) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3755 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3756 var tic_height, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3757 tic_height = metrics.stack_height / alphabet_ic;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3758 ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3759 ctx.translate(metrics.y_label_height, metrics.y_num_height/2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3760 //draw the axis label
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3761 ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3762 ctx.font = metrics.y_label_font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3763 ctx.translate(0, metrics.stack_height/2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3764 ctx.rotate(-(Math.PI / 2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3765 ctx.textAlign = "center";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3766 ctx.fillText("bits", 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3767 ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3768
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3769 ctx.translate(metrics.y_label_spacer + metrics.y_num_width, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3770
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3771 //draw the axis tics
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3772 ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3773 ctx.translate(0, metrics.stack_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3774 for (i = 0; i <= alphabet_ic; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3775 //draw the number
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3776 ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3777 ctx.translate(-1, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3778 raster.draw_scale_num(ctx, metrics.y_num_font, i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3779 ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3780 //draw the tic
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3781 ctx.fillRect(0, -1, metrics.y_tic_width, 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3782 //prepare for next tic
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3783 ctx.translate(0, -tic_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3784 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3785 ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3786
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3787 ctx.fillRect(metrics.y_tic_width - 2, 0, 2, metrics.stack_height)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3788
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3789 ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3790 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3791
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3792 function draw_stack_num(ctx, metrics, row_index, raster) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3793 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3794 ctx.save();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3795 ctx.translate(0, Math.round(metrics.stack_height + metrics.x_num_above));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3796 if (metrics.x_axis == 1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3797 raster.draw_stack_num(ctx, metrics.x_num_font, metrics.stack_width, row_index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3798 } else if (metrics.x_axis == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3799 // draw dots instead of the numbers (good for small logos)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3800 ctx.beginPath();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3801 var radius = Math.round(metrics.x_num_height / 2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3802 ctx.arc(Math.round(metrics.stack_width / 2), radius, radius, 0, 2 * Math.PI, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3803 ctx.fill();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3804 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3805 ctx.restore();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3806 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3807
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3808 function draw_stack(ctx, metrics, symbols, raster) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3809 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3810 var preferred_pad, sym_min, i, sym, sym_height, pad;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3811 preferred_pad = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3812 sym_min = 5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3813
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3814 ctx.save();//1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3815 ctx.translate(0, metrics.stack_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3816 for (i = 0; i < symbols.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3817 sym = symbols[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3818 sym_height = metrics.stack_height * sym.get_scale();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3819
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3820 pad = preferred_pad;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3821 if (sym_height - pad < sym_min) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3822 pad = Math.min(pad, Math.max(0, sym_height - sym_min));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3823 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3824 sym_height -= pad;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3825
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3826 //translate to the correct position
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3827 ctx.translate(0, -(pad/2 + sym_height));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3828
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3829 //draw
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3830 raster.draw_stack_sym(ctx, sym.get_symbol(), 0, 0, metrics.stack_width, sym_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3831 //translate past the padding
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3832 ctx.translate(0, -(pad/2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3833 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3834 ctx.restore();//1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3835 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3836
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3837 function draw_dashed_line(ctx, pattern, start, x1, y1, x2, y2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3838 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3839 var x, y, len, i, dx, dy, tlen, theta, mulx, muly, lx, ly;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3840 dx = x2 - x1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3841 dy = y2 - y1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3842 tlen = Math.pow(dx*dx + dy*dy, 0.5);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3843 theta = Math.atan2(dy,dx);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3844 mulx = Math.cos(theta);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3845 muly = Math.sin(theta);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3846 lx = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3847 ly = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3848 for (i = 0; i < pattern; ++i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3849 lx.push(pattern[i] * mulx);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3850 ly.push(pattern[i] * muly);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3851 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3852 i = start;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3853 x = x1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3854 y = y1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3855 len = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3856 ctx.beginPath();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3857 while (len + pattern[i] < tlen) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3858 ctx.moveTo(x, y);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3859 x += lx[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3860 y += ly[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3861 ctx.lineTo(x, y);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3862 len += pattern[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3863 i = (i + 1) % pattern.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3864 x += lx[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3865 y += ly[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3866 len += pattern[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3867 i = (i + 1) % pattern.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3868 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3869 if (len < tlen) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3870 ctx.moveTo(x, y);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3871 x += mulx * (tlen - len);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3872 y += muly * (tlen - len);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3873 ctx.lineTo(x, y);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3874 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3875 ctx.stroke();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3876 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3877
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3878 function draw_trim_background(ctx, metrics, left_start, left_end, left_divider, right_start, right_end, right_divider) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3879 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3880 var left_size = left_end - left_start;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3881 var right_size = right_end - right_start;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3882 var line_x;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3883
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3884 ctx.save();//s8
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3885 ctx.fillStyle = "rgb(240, 240, 240)";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3886 if (left_size > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3887 ctx.fillRect(left_start * metrics.stack_width, 0, left_size * metrics.stack_width, metrics.stack_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3888 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3889 if (right_size > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3890 ctx.fillRect(right_start * metrics.stack_width, 0, right_size * metrics.stack_width, metrics.stack_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3891 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3892 ctx.fillStyle = "rgb(51, 51, 51)";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3893 if (left_size > 0 && left_divider) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3894 line_x = (left_end * metrics.stack_width) - 0.5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3895 draw_dashed_line(ctx, [3], 0, line_x, 0, line_x, metrics.stack_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3896 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3897 if (right_size > 0 && right_divider) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3898 line_x = (right_start * metrics.stack_width) + 0.5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3899 draw_dashed_line(ctx, [3], 0, line_x, 0, line_x, metrics.stack_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3900 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3901 ctx.restore();//s8
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3902 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3903
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3904 function size_logo_on_canvas(logo, canvas, show_names, scale) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3905 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3906 var draw_name, draw_finetext, metrics;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3907 draw_name = (typeof show_names === "boolean" ? show_names : (logo.get_rows() > 1));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3908 draw_finetext = (logo.fine_text.length > 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3909 if (canvas.width !== 0 && canvas.height !== 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3910 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3911 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3912 metrics = new LogoMetrics(canvas.getContext('2d'),
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3913 logo.get_xlate_columns(), logo.get_rows(), draw_name, draw_finetext, logo.x_axis, logo.y_axis);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3914 if (typeof scale == "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3915 //resize the canvas to fit the scaled logo
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3916 canvas.width = metrics.summed_width * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3917 canvas.height = metrics.summed_height * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3918 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3919 if (canvas.width === 0 && canvas.height === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3920 canvas.width = metrics.summed_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3921 canvas.height = metrics.summed_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3922 } else if (canvas.width === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3923 canvas.width = metrics.summed_width * (canvas.height / metrics.summed_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3924 } else if (canvas.height === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3925 canvas.height = metrics.summed_height * (canvas.width / metrics.summed_width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3926 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3927 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3928 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3929
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3930 function draw_logo_on_canvas(logo, canvas, show_names, scale) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3931 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3932 var i, draw_name, draw_finetext, ctx, metrics, raster, pspm_i, pspm,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3933 offset, col_index, motif_position, ssc;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3934 ssc = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3935 draw_name = (typeof show_names === "boolean" ? show_names : (logo.get_rows() > 1));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3936 draw_finetext = (logo.fine_text.length > 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3937 ctx = canvas.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3938 //assume that the user wants the canvas scaled equally so calculate what the best width for this image should be
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3939 metrics = new LogoMetrics(ctx, logo.get_xlate_columns(), logo.get_rows(), draw_name, draw_finetext, logo.x_axis, logo.y_axis);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3940 if (typeof scale == "number") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3941 //resize the canvas to fit the scaled logo
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3942 canvas.width = metrics.summed_width * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3943 canvas.height = metrics.summed_height * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3944 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3945 if (canvas.width === 0 && canvas.height === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3946 scale = 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3947 canvas.width = metrics.summed_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3948 canvas.height = metrics.summed_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3949 } else if (canvas.width === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3950 scale = canvas.height / metrics.summed_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3951 canvas.width = metrics.summed_width * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3952 } else if (canvas.height === 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3953 scale = canvas.width / metrics.summed_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3954 canvas.height = metrics.summed_height * scale;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3955 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3956 scale = Math.min(canvas.width / metrics.summed_width, canvas.height / metrics.summed_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3957 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3958 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3959 // cache the raster based on the assumption that we will be drawing a lot
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3960 // of logos the same size and alphabet
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3961 if (typeof draw_logo_on_canvas.raster_cache === "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3962 draw_logo_on_canvas.raster_cache = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3963 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3964 for (i = 0; i < draw_logo_on_canvas.raster_cache.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3965 raster = draw_logo_on_canvas.raster_cache[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3966 if (raster.get_alphabet().equals(logo.alphabet) &&
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3967 Math.abs(raster.get_scale() - scale) < 0.1) break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3968 raster = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3969 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3970 if (raster == null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3971 raster = new RasterizedAlphabet(logo.alphabet, scale, metrics.stack_font, metrics.stack_width);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3972 draw_logo_on_canvas.raster_cache.push(raster);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3973 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3974 ctx = canvas.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3975 ctx.save();//s1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3976 ctx.scale(scale, scale);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3977 ctx.save();//s2
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3978 ctx.save();//s7
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3979 //create margin
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3980 ctx.translate(Math.round(metrics.pad_left), Math.round(metrics.pad_top));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3981 for (pspm_i = 0; pspm_i < logo.get_rows(); ++pspm_i) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3982 pspm = logo.get_pspm(pspm_i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3983 offset = logo.get_offset(pspm_i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3984 //optionally draw name if this isn't the last row or is the only row
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3985 if (draw_name && (logo.get_rows() == 1 || pspm_i != (logo.get_rows()-1))) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3986 ctx.save();//s4
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3987 ctx.translate(Math.round(metrics.summed_width/2), Math.round(metrics.name_height));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3988 ctx.font = metrics.name_font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3989 ctx.textAlign = "center";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3990 ctx.fillText(pspm.name, 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3991 ctx.restore();//s4
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3992 ctx.translate(0, Math.round(metrics.name_height +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3993 Math.min(0, metrics.name_spacer - metrics.y_num_height/2)));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3994 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3995 //draw scale
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3996 if (logo.y_axis) draw_scale(ctx, metrics, logo.alphabet.get_ic(), raster);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3997 ctx.save();//s5
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3998 //translate across past the scale
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3999 if (logo.y_axis) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4000 ctx.translate(Math.round(metrics.y_label_height + metrics.y_label_spacer +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4001 metrics.y_num_width + metrics.y_tic_width), Math.round(metrics.y_num_height / 2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4002 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4003 //draw the trimming background
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4004 if (pspm.get_left_trim() > 0 || pspm.get_right_trim() > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4005 var left_start = offset * logo.get_xlate_nsyms();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4006 var left_end = (offset + pspm.get_left_trim()) * logo.get_xlate_nsyms();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4007 var left_divider = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4008 if (left_end < logo.get_xlate_start() || left_start > logo.get_xlate_end()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4009 // no overlap
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4010 left_start = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4011 left_end = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4012 left_divider = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4013 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4014 if (left_start < logo.get_xlate_start()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4015 left_start = logo.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4016 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4017 if (left_end > logo.get_xlate_end()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4018 left_end = logo.get_xlate_end();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4019 left_divider = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4020 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4021 left_start -= logo.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4022 left_end -= logo.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4023 if (left_end < left_start) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4024 left_start = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4025 left_end = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4026 left_divider = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4027 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4028 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4029 var right_end = (offset + pspm.get_motif_length()) * logo.get_xlate_nsyms();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4030 //var right_start = right_end - (pspm.get_left_trim() * logo.get_xlate_nsyms());
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4031 var right_start = right_end - (pspm.get_right_trim() * logo.get_xlate_nsyms());
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4032 var right_divider = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4033 if (right_end < logo.get_xlate_start() || right_start > logo.get_xlate_end()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4034 // no overlap
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4035 right_start = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4036 right_end = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4037 right_divider = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4038 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4039 if (right_start < logo.get_xlate_start()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4040 right_start = logo.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4041 right_divider = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4042 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4043 if (right_end > logo.get_xlate_end()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4044 right_end = logo.get_xlate_end();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4045 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4046 right_start -= logo.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4047 right_end -= logo.get_xlate_start();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4048 if (right_end < right_start) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4049 right_start = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4050 right_end = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4051 right_divider = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4052 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4053 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4054 draw_trim_background(ctx, metrics, left_start, left_end, left_divider, right_start, right_end, right_divider);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4055 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4056 //draw letters
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4057 var xlate_col;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4058 for (xlate_col = logo.get_xlate_start(); xlate_col < logo.get_xlate_end(); xlate_col++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4059 ctx.translate(metrics.stack_pad_left,0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4060 col_index = Math.floor(xlate_col / logo.get_xlate_nsyms());
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4061 if (xlate_col % logo.get_xlate_nsyms() == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4062 if (col_index >= offset && col_index < (offset + pspm.get_motif_length())) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4063 motif_position = col_index - offset;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4064 draw_stack_num(ctx, metrics, motif_position, raster);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4065 draw_stack(ctx, metrics, pspm.get_stack(motif_position, logo.alphabet, ssc), raster);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4066 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4067 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4068 if (col_index >= offset && col_index < (offset + pspm.get_motif_length())) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4069 ctx.save();// s5.1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4070 ctx.translate(0, Math.round(metrics.stack_height));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4071 // TODO draw a dot or dash or something to indicate continuity of the motif
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4072 ctx.restore(); //s5.1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4073 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4074 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4075 ctx.translate(Math.round(metrics.stack_width), 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4076 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4077 ctx.restore();//s5
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4078 ////optionally draw name if this is the last row but isn't the only row
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4079 if (draw_name && (logo.get_rows() != 1 && pspm_i == (logo.get_rows()-1))) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4080 //translate vertically past the stack and axis's
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4081 ctx.translate(0, metrics.y_num_height/2 + metrics.stack_height +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4082 Math.max(metrics.y_num_height/2, metrics.x_num_above + metrics.x_num_width + metrics.name_spacer));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4083
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4084 ctx.save();//s6
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4085 ctx.translate(metrics.summed_width/2, metrics.name_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4086 ctx.font = metrics.name_font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4087 ctx.textAlign = "center";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4088 ctx.fillText(pspm.name, 0, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4089 ctx.restore();//s6
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4090 ctx.translate(0, metrics.name_height);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4091 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4092 //translate vertically past the stack and axis's
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4093 ctx.translate(0, metrics.y_num_height/2 + metrics.stack_height +
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4094 Math.max(metrics.y_num_height/2, metrics.x_num_above + metrics.x_num_width));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4095 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4096 //if not the last row then add middle padding
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4097 if (pspm_i != (logo.get_rows() -1)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4098 ctx.translate(0, metrics.pad_middle);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4099 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4100 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4101 ctx.restore();//s7
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4102 if (logo.fine_text.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4103 ctx.translate(metrics.summed_width - metrics.pad_right, metrics.summed_height - metrics.pad_bottom);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4104 ctx.font = metrics.fine_txt_font;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4105 ctx.textAlign = "right";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4106 ctx.fillText(logo.fine_text, 0,0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4107 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4108 ctx.restore();//s2
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4109 ctx.restore();//s1
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4110 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4111
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4112 function create_canvas(c_width, c_height, c_id, c_title, c_display) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4113 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4114 var canvas = document.createElement("canvas");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4115 //check for canvas support before attempting anything
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4116 if (!canvas.getContext) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4117 return null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4118 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4119 var ctx = canvas.getContext('2d');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4120 //check for html5 text drawing support
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4121 if (!supports_text(ctx)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4122 return null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4123 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4124 //size the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4125 canvas.width = c_width;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4126 canvas.height = c_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4127 canvas.id = c_id;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4128 canvas.title = c_title;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4129 canvas.style.display = c_display;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4130 return canvas;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4131 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4132
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4133 function logo_1(alphabet, fine_text, pspm) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4134 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4135 var logo = new Logo(alphabet, fine_text);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4136 logo.add_pspm(pspm);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4137 return logo;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4138 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4139
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4140 function logo_2(alphabet, fine_text, target, query, query_offset) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4141 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4142 var logo = new Logo(alphabet, fine_text);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4143 if (query_offset < 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4144 logo.add_pspm(target, -query_offset);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4145 logo.add_pspm(query);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4146 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4147 logo.add_pspm(target);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4148 logo.add_pspm(query, query_offset);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4149 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4150 return logo;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4151 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4152
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4153 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4154 * Specifies an alternate source for an image.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4155 * If the image with the image_id specified has
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4156 * not loaded then a generated logo will be used
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4157 * to replace it.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4158 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4159 * Note that the image must either have dimensions
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4160 * or a scale must be set.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4161 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4162 function alternate_logo(logo, image_id, scale) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4163 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4164 var image = document.getElementById(image_id);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4165 if (!image) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4166 alert("Can't find specified image id (" + image_id + ")");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4167 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4168 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4169 //if the image has loaded then there is no reason to use the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4170 if (image_ok(image)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4171 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4172 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4173 //the image has failed to load so replace it with a canvas if we can.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4174 var canvas = create_canvas(image.width, image.height, image_id, image.title, image.style.display);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4175 if (canvas === null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4176 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4177 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4178 //draw the logo on the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4179 draw_logo_on_canvas(logo, canvas, null, scale);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4180 //replace the image with the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4181 image.parentNode.replaceChild(canvas, image);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4182 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4183
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4184 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4185 * Specifes that the element with the specified id
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4186 * should be replaced with a generated logo.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4187 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4188 function replace_logo(logo, replace_id, scale, title_txt, display_style) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4189 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4190 var element = document.getElementById(replace_id);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4191 if (!replace_id) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4192 alert("Can't find specified id (" + replace_id + ")");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4193 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4194 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4195 //found the element!
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4196 var canvas = create_canvas(50, 120, replace_id, title_txt, display_style);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4197 if (canvas === null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4198 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4199 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4200 //draw the logo on the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4201 draw_logo_on_canvas(logo, canvas, null, scale);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4202 //replace the element with the canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4203 element.parentNode.replaceChild(canvas, element);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4204 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4205
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4206 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4207 * Fast string trimming implementation found at
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4208 * http://blog.stevenlevithan.com/archives/faster-trim-javascript
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4209 *
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4210 * Note that regex is good at removing leading space but
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4211 * bad at removing trailing space as it has to first go through
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4212 * the whole string.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4213 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4214 function trim (str) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4215 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4216 var ws, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4217 str = str.replace(/^\s\s*/, '');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4218 ws = /\s/; i = str.length;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4219 while (ws.test(str.charAt(--i)));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4220 return str.slice(0, i + 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4221 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4222 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4223 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4224 var current_motif = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4225 var dreme_alphabet = new Alphabet(data.alphabet, data.control_db.freqs);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4226
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4227 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4228 * Create a pspm for the given motif data
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4229 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4230 function motif_pspm(m) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4231 return new Pspm(m.pwm, m.id, 0, 0, m.nsites, m.evalue);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4232 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4233
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4234 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4235 * Create a count matrix from the given motif data
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4236 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4237 function motif_count_matrix(motif) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4238 return motif_pspm(motif).as_count_matrix();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4239 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4240
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4241 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4242 * Create a probablity matrix from the given motif data
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4243 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4244 function motif_prob_matrix(motif) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4245 return motif_pspm(motif).as_probability_matrix();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4246 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4247
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4248 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4249 * Create a minimal meme format motif from the given motif data
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4250 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4251 function motif_minimal_meme(motif) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4252 return motif_pspm(motif).as_meme({
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4253 "with_header": true,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4254 "with_pspm": true,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4255 "with_pssm": false,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4256 "version": data["version"],
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4257 "alphabet": dreme_alphabet,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4258 "strands": (data.options.revcomp ? 2 : 1)
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4259 });
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4260 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4261
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4262 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4263 * Fill in a template variable
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4264 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4265 function set_tvar(template, tvar, value) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4266 var node;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4267 node = find_child(template, tvar);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4268 if (node === null) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4269 throw new Error("Template does not contain variable " + tvar);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4270 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4271 node.innerHTML = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4272 if (typeof value !== "object") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4273 node.appendChild(document.createTextNode(value));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4274 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4275 node.appendChild(value);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4276 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4277 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4278
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4279 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4280 * Make a canvas with the motif logo drawn on it.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4281 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4282 function make_logo(motif, height, rc) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4283 var pspm = new Pspm(motif["pwm"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4284 if (rc) pspm = pspm.copy().reverse_complement(dreme_alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4285 var logo = new Logo(dreme_alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4286 logo.add_pspm(pspm, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4287 var canvas = document.createElement('canvas');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4288 canvas.height = height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4289 canvas.width = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4290 draw_logo_on_canvas(logo, canvas, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4291 return canvas;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4292 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4293
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4294 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4295 * Create a button designed to contain a single symbol
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4296 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4297 function make_sym_btn(symbol, title, action) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4298 var box, sbox;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4299 box = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4300 box.tabIndex = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4301 box.className = "sym_btn";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4302 sbox = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4303 if (typeof symbol == "string") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4304 sbox.appendChild(document.createTextNode(symbol));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4305 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4306 sbox.appendChild(symbol);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4307 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4308 box.appendChild(sbox);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4309 box.title = title;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4310 box.addEventListener('click', action, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4311 box.addEventListener('keydown', action, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4312 return box;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4313 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4314
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4315 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4316 * Create a pair of text spans with different classes.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4317 * This is useful when using CSS to only display one of them.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4318 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4319 function text_pair(txt1, cls1, txt2, cls2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4320 var container, part1, part2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4321 container = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4322 part1 = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4323 part1.appendChild(document.createTextNode(txt1));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4324 part1.className = cls1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4325 container.appendChild(part1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4326 part2 = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4327 part2.appendChild(document.createTextNode(txt2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4328 part2.className = cls2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4329 container.appendChild(part2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4330 return container;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4331 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4332
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4333 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4334 * Make a colourised sequence.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4335 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4336 function make_seq(seq) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4337 var i, j, letter, lbox, sbox;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4338 sbox = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4339 for (i = 0; i < seq.length; i = j) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4340 letter = seq.charAt(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4341 for (j = i+1; j < seq.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4342 if (seq.charAt(j) !== letter) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4343 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4344 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4345 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4346 lbox = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4347 lbox.style.color = dreme_alphabet.get_colour(dreme_alphabet.get_index(letter));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4348 lbox.appendChild(document.createTextNode(seq.substring(i, j)));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4349 sbox.appendChild(lbox);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4350 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4351 return sbox;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4352 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4353
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4354 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4355 * Create a description element taking into account the newlines in the source text.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4356 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4357 function make_description(text) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4358 var i, j, lines, p;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4359 var container = document.createElement("div");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4360 var paragraphs = text.split(/\n\n+/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4361 for (i = 0; i < paragraphs.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4362 lines = paragraphs[i].split(/\n/);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4363 p = document.createElement("p");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4364 p.appendChild(document.createTextNode(lines[0]));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4365 for (j = 1; j < lines.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4366 p.appendChild(document.createElement("br"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4367 p.appendChild(document.createTextNode(lines[j]));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4368 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4369 container.appendChild(p);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4370 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4371 return container;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4372 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4373
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4374 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4375 * Make the table header for the discovered motifs.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4376 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4377 function make_motif_header() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4378 var row = document.createElement("tr");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4379 add_text_header_cell(row, "", "", "motif_ordinal");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4380 add_text_header_cell(row, "Motif", "pop_motifs_word", "motif_word");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4381 add_text_header_cell(row, "Logo", "pop_motifs_logo", "motif_logo");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4382 if (data.options.revcomp) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4383 add_text_header_cell(row, "RC Logo", "pop_motifs_rc_logo", "motif_logo");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4384 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4385 add_text_header_cell(row, "E-value", "pop_motifs_evalue", "motif_evalue");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4386 add_text_header_cell(row, "Unerased E-value", "pop_motifs_uevalue", "motif_evalue");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4387 add_text_header_cell(row, "More", "pop_more", "motif_more");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4388 add_text_header_cell(row, "Submit/Download", "pop_submit_dl", "motif_submit");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4389 row.className = "more";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4390 return row;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4391 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4392
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4393 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4394 * Make a compact motif summary row for the discovered motifs.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4395 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4396 function make_motif_row(tbody, ordinal, motif) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4397 var row = document.createElement("tr");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4398 add_text_cell(row, "" + ordinal + ".", "motif_ordinal");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4399 add_text_cell(row, motif["id"], "motif_word");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4400 add_cell(row, make_logo(motif, 50, false), "motif_logo");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4401 if (data.options.revcomp) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4402 add_cell(row, make_logo(motif, 50, true), "motif_logo");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4403 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4404 add_text_cell(row, motif["evalue"], "motif_evalue");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4405 add_text_cell(row, motif["unerased_evalue"], "motif_evalue");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4406 add_cell(row, make_sym_btn(text_pair("\u21A7", "less", "\u21A5", "more"), "Show more information.", function(e) { toggle_class(tbody, "collapsed"); }, "\u21A5", ""), "motif_more");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4407 add_cell(row, make_sym_btn("\u21E2", "Submit the motif to another MEME Suite program or download it.", function(e) { action_show_outpop(e, ordinal); }), "motif_submit");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4408 return row;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4409 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4410
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4411 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4412 * Make a sortable table of enriched matching rows.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4413 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4414 function make_motif_words(motif) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4415 var row, i, match;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4416 var table = document.createElement("table");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4417 var thead = document.createElement("thead");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4418 row = document.createElement("tr");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4419 add_text_header_cell(row, "Word", "pop_match_word", "match_word", function(e) {sort_table(this, compare_words);});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4420 add_text_header_cell(row, "Positives", "pop_match_pos", "match_count", function(e) {sort_table(this, compare_counts);});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4421 add_text_header_cell(row, "Negatives", "pop_match_neg", "match_count", function(e) {sort_table(this, compare_counts);});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4422 add_text_header_cell(row, "P-value", "pop_match_pval", "match_evalue", function(e) {sort_table(this, compare_evalues);});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4423 add_text_header_cell(row, "E-value", "pop_match_eval", "match_evalue", function(e) {sort_table(this, compare_evalues);});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4424 thead.appendChild(row);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4425 table.appendChild(thead);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4426 var tbody = document.createElement("tbody");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4427 for (i = 0; i < motif.matches.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4428 match = motif.matches[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4429 row = document.createElement("tr");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4430 add_cell(row, make_seq(match.seq), "match_word");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4431 add_text_cell(row, match.p + " / " + data.sequence_db.count, "match_count");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4432 add_text_cell(row, match.n + " / " + data.control_db.count, "match_count");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4433 add_text_cell(row, match.pvalue, "match_evalue");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4434 add_text_cell(row, match.evalue, "match_evalue");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4435 tbody.appendChild(row);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4436 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4437 table.appendChild(tbody);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4438 return table;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4439 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4440
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4441 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4442 * Make an expanded view of a discovered motif.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4443 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4444 function make_motif_exp(tbody, ordinal, motif) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4445 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4446 var box, pspm, logo_box;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4447 box = $("tmpl_motif_expanded").cloneNode(true);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4448 toggle_class(box, "template", false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4449 box.id = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4450 find_child(box, "tvar_logo").appendChild(make_logo(motif, 150, false));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4451 if (data.options.revcomp) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4452 find_child(box, "tvar_rclogo").appendChild(make_logo(motif, 150, true));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4453 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4454 set_tvar(box, "tvar_p", motif["p"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4455 set_tvar(box, "tvar_p_total", data.sequence_db.count);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4456 set_tvar(box, "tvar_n", motif["n"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4457 set_tvar(box, "tvar_n_total", data.control_db.count);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4458 set_tvar(box, "tvar_pvalue", motif["pvalue"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4459 set_tvar(box, "tvar_evalue", motif["evalue"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4460 set_tvar(box, "tvar_uevalue", motif["unerased_evalue"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4461 set_tvar(box, "tvar_words", make_motif_words(motif));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4462 var cell = document.createElement("td");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4463 cell.colSpan = 8;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4464 cell.appendChild(box);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4465 var row = document.createElement("tr");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4466 row.className = "more";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4467 row.appendChild(cell);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4468 return row;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4469 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4470
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4471 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4472 * Convert a string containing a scientific number into the log of that number
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4473 * without having an intermediate representation of the number.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4474 * This is intended to avoid underflow problems with the tiny evalues that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4475 * MEME and DREME can create.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4476 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4477 function sci2log(scinum) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4478 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4479 var ev_re, match, sig, exp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4480 ev_re = /^(.*)e(.*)$/;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4481 if (match = ev_re.exec(scinum)) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4482 sig = parseFloat(match[1]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4483 exp = parseInt(match[2]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4484 return Math.log(sig) + (exp * Math.log(10));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4485 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4486 return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4487 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4488
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4489 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4490 * Create a table of discovered motifs. A fresh table body is used for each
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4491 * motif to make hiding/showing rows with css easier.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4492 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4493 function make_motifs() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4494 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4495 var i, row, tbody, motif, ordinal;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4496 // make the motifs table
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4497 var container = $("motifs");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4498 container.innerHTML = ""; // clear content
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4499 var table = document.createElement("table");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4500 // add a header that is always shown
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4501 var thead = document.createElement("thead");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4502 thead.appendChild(make_motif_header());
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4503 table.appendChild(thead);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4504 for (i = 0; i < data.motifs.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4505 ordinal = i + 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4506 motif = data.motifs[i];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4507 tbody = document.createElement("tbody");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4508 tbody.className = "collapsed";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4509 tbody.appendChild(make_motif_row(tbody, ordinal, motif));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4510 tbody.appendChild(make_motif_exp(tbody, ordinal, motif));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4511 // create a following header for every row except the last one
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4512 if ((i + 1) < data.motifs.length) tbody.appendChild(make_motif_header());
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4513 table.appendChild(tbody);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4514 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4515 container.appendChild(table);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4516 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4517
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4518 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4519 * Create a table showing all the alphabet symbols, their names and frequencies.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4520 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4521 function make_alpha_bg(alph, freqs) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4522 function colour_symbol(index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4523 var span = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4524 span.appendChild(document.createTextNode(alph.get_symbol(index)));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4525 span.style.color = alph.get_colour(index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4526 span.className = "alpha_symbol";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4527 return span;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4528 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4529 var table, thead, tbody, row, th, span, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4530 // create table
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4531 table = document.createElement("table");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4532 table.className = "inputs";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4533 // create header
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4534 thead = document.createElement("thead");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4535 table.appendChild(thead);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4536 row = thead.insertRow(thead.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4537 if (alph.has_complement()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4538 add_text_header_cell(row, "Name", "pop_alph_name");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4539 add_text_header_cell(row, "Bg.", "pop_alph_control");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4540 add_text_header_cell(row, "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4541 add_text_header_cell(row, "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4542 add_text_header_cell(row, "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4543 add_text_header_cell(row, "Bg.", "pop_alph_control");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4544 add_text_header_cell(row, "Name", "pop_alph_name");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4545 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4546 add_text_header_cell(row, "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4547 add_text_header_cell(row, "Name", "pop_alph_name");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4548 add_text_header_cell(row, "Bg.", "pop_alph_control");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4549 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4550 // add alphabet entries
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4551 tbody = document.createElement("tbody");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4552 table.appendChild(tbody);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4553 if (alph.has_complement()) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4554 for (i = 0; i < alph.get_size_core(); i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4555 var c = alph.get_complement(i);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4556 if (i > c) continue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4557 row = tbody.insertRow(tbody.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4558 add_text_cell(row, alph.get_name(i));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4559 add_text_cell(row, "" + freqs[i].toFixed(3));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4560 add_cell(row, colour_symbol(i));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4561 add_text_cell(row, "~");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4562 add_cell(row, colour_symbol(c));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4563 add_text_cell(row, "" + freqs[c].toFixed(3));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4564 add_text_cell(row, alph.get_name(c));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4565 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4566 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4567 for (i = 0; i < alph.get_size_core(); i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4568 row = tbody.insertRow(tbody.rows.length);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4569 add_cell(row, colour_symbol(i));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4570 add_text_cell(row, alph.get_name(i));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4571 add_text_cell(row, "" + freqs[i].toFixed(3));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4572 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4573 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4574 return table;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4575 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4576
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4577 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4578 * Updates the format download text in the popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4579 * This is called when either the format or current motif changes.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4580 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4581 function update_outpop_format(index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4582 var motif = data.motifs[index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4583 var fn = [motif_count_matrix, motif_prob_matrix, motif_minimal_meme];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4584 var suffix = ["_counts.txt", "_freqs.txt", ".meme"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4585 var format = parseInt($("text_format").value);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4586 var text = fn[format](motif);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4587 prepare_download(text, "text/plain", motif.id + suffix[format], $("outpop_text_dl"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4588 $("outpop_text").value = text;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4589 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4590
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4591 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4592 * Updates the motif logos and format download text in the popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4593 * This is called whenever the current motif changes.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4594 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4595 function update_outpop_motif(index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4596 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4597 var motifs, motif, pspm, logo, canvas, num;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4598 motifs = data["motifs"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4599 if (index < 0 || index >= motifs.length) {return;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4600 current_motif = index;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4601 motif = motifs[index];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4602 pspm = new Pspm(motif["pwm"]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4603 logo = new Logo(dreme_alphabet, "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4604 logo.add_pspm(pspm, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4605 canvas = $("outpop_logo");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4606 canvas.width = canvas.width; // clear canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4607 draw_logo_on_canvas(logo, canvas, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4608 canvas = $("outpop_logo_rc");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4609 canvas.width = canvas.width; // clear rc canvas
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4610 if (data.options.revcomp) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4611 pspm.reverse_complement(dreme_alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4612 logo = new Logo(dreme_alphabet, "");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4613 logo.add_pspm(pspm, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4614 draw_logo_on_canvas(logo, canvas, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4615 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4616 num = $("outpop_num");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4617 num.innerHTML = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4618 num.appendChild(document.createTextNode("" + (index + 1)));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4619 update_outpop_format(index);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4620 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4621
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4622
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4623 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4624 * Initialise and display the download popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4625 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4626 function action_show_outpop(e, ordinal) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4627 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4628 function init() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4629 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4630 var close_btn, next_btn, prev_btn, cancel_btn, do_btn;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4631 var tab1, tab2, tab3;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4632 var pnl1, pnl2, pnl3;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4633 var format_list;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4634 var tbl_submit, inputs, i, default_prog;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4635 close_btn = $("outpop_close");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4636 close_btn.addEventListener("click", action_hide_outpop, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4637 close_btn.addEventListener("keydown", action_hide_outpop, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4638 next_btn = $("outpop_next");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4639 next_btn.addEventListener("click", action_outpop_next, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4640 next_btn.addEventListener("keydown", action_outpop_next, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4641 prev_btn = $("outpop_prev");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4642 prev_btn.addEventListener("click", action_outpop_prev, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4643 prev_btn.addEventListener("keydown", action_outpop_prev, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4644 cancel_btn = $("outpop_cancel");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4645 cancel_btn.addEventListener("click", action_hide_outpop, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4646 do_btn = $("outpop_do");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4647 do_btn.addEventListener("click", action_outpop_submit, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4648 tab1 = $("outpop_tab_1");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4649 tab1.tabIndex = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4650 tab1.addEventListener("click", action_outpop_tab, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4651 tab1.addEventListener("keydown", action_outpop_tab, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4652 tab2 = $("outpop_tab_2");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4653 tab2.tabIndex = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4654 tab2.addEventListener("click", action_outpop_tab, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4655 tab2.addEventListener("keydown", action_outpop_tab, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4656 tab3 = $("outpop_tab_3");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4657 tab3.tabIndex = 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4658 tab3.addEventListener("click", action_outpop_tab, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4659 tab3.addEventListener("keydown", action_outpop_tab, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4660 pnl1 = $("outpop_pnl_1");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4661 pnl2 = $("outpop_pnl_2");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4662 pnl3 = $("outpop_pnl_3");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4663 toggle_class(tab1, "activeTab", true);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4664 toggle_class(tab2, "activeTab", false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4665 toggle_class(tab3, "activeTab", false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4666 pnl1.style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4667 pnl2.style.display = "none";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4668 pnl3.style.display = "none";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4669 format_list = $("text_format");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4670 format_list.addEventListener("change", action_outpop_format, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4671 // setup program selection
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4672 tbl_submit = $("programs");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4673 // when not dna, hide the inputs for programs that require dna motifs
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4674 toggle_class(tbl_submit, "alphabet_dna", dreme_alphabet.has_complement());//TODO FIXME alphabet_dna is a bad name for a field when allowing custom alphabets
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4675 // add a click listener for the radio buttons
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4676 inputs = tbl_submit.querySelectorAll("input[type='radio']");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4677 for (i = 0; i < inputs.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4678 inputs[i].addEventListener("click", action_outpop_program, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4679 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4680 // ensure that a default program option is selected for DNA and Protein
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4681 default_prog = document.getElementById(dreme_alphabet.has_complement() ? "submit_tomtom" : "submit_fimo");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4682 default_prog.checked = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4683 action_outpop_program.call(default_prog);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4684 // disable reverse-complement when not DNA
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4685 $("logo_rc_option").disabled = !dreme_alphabet.has_complement();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4686 // set errorbars on when ssc is on
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4687 $("logo_ssc").addEventListener("change", action_outpop_ssc, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4688 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4689 // store the focused element
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4690 action_hide_outpop.last_active = document.activeElement;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4691 if (!e) e = window.event;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4692 if (e.type === "keydown") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4693 if (e.keyCode !== 13 && e.keyCode !== 32) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4694 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4695 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4696 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4697 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4698 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4699 // hide the help popup
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4700 help_popup();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4701 // on first load initilize the popup
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4702 if (!action_show_outpop.ready) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4703 init();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4704 action_show_outpop.ready = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4705 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4706 update_outpop_motif(ordinal - 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4707 // display the download popup
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4708 $("grey_out_page").style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4709 $("download").style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4710 $("outpop_close").focus();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4711 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4712
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4713 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4714 * Hide the download popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4715 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4716 function action_hide_outpop(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4717 if (!e) e = window.event;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4718 if (e.type === "keydown") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4719 if (e.keyCode !== 13 && e.keyCode !== 32) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4720 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4721 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4722 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4723 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4724 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4725 $("download").style.display = "none";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4726 $("grey_out_page").style.display = "none";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4727 if (typeof action_hide_outpop.last_active !== "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4728 action_hide_outpop.last_active.focus();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4729 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4730 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4731
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4732 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4733 * Show the next motif in the download popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4734 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4735 function action_outpop_next(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4736 if (!e) e = window.event;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4737 if (e.type === "keydown") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4738 if (e.keyCode !== 13 && e.keyCode !== 32) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4739 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4740 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4741 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4742 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4743 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4744 update_outpop_motif(current_motif + 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4745 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4746
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4747 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4748 * Show the previous motif in the download popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4749 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4750 function action_outpop_prev(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4751 if (!e) e = window.event;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4752 if (e.type === "keydown") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4753 if (e.keyCode !== 13 && e.keyCode !== 32) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4754 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4755 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4756 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4757 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4758 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4759 update_outpop_motif(current_motif - 1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4760 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4761
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4762 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4763 * Highlight the selected row in the program list.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4764 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4765 function action_outpop_program() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4766 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4767 var table, tr, rows, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4768 tr = find_parent_tag(this, "TR");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4769 table = find_parent_tag(tr, "TABLE");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4770 rows = table.querySelectorAll("tr");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4771 for (i = 0; i < rows.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4772 toggle_class(rows[i], "selected", rows[i] === tr);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4773 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4774 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4775
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4776 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4777 * Enable error bars when small sample correction is enabled.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4778 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4779 function action_outpop_ssc() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4780 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4781 $("logo_err").value = $("logo_ssc").value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4782 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4783
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4784 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4785 * Submit the motif to the selected program.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4786 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4787 function action_outpop_submit(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4788 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4789 var form, input, program, motifs;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4790 // find out which program is selected
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4791 var radios, i;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4792 radios = document.getElementsByName("program");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4793 program = "fimo"; // default to fimo, since it works with all alphabet types
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4794 for (i = 0; i < radios.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4795 if (radios[i].checked) program = radios[i].value;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4796 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4797
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4798 motifs = motif_minimal_meme(data.motifs[current_motif]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4799 form = document.createElement("form");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4800 form.setAttribute("method", "post");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4801 form.setAttribute("action", site_url + "/tools/" + program);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4802
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4803 input = document.createElement("input");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4804 input.setAttribute("type", "hidden");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4805 input.setAttribute("name", "motifs_embed");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4806 input.setAttribute("value", motifs);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4807 form.appendChild(input);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4808
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4809 document.body.appendChild(form);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4810 form.submit();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4811 document.body.removeChild(form);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4812 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4813
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4814 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4815 * Download the format text.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4816 * Wire the link containing the data URI text to a download button so it looks
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4817 * the same as the server submit stuff.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4818 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4819 function action_outpop_download_motif(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4820 $("outpop_text_dl").click();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4821 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4822
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4823 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4824 * Download the motif logo.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4825 * The EPS format can be calculated locally in Javascript
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4826 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4827 function action_outpop_download_logo(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4828 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4829 var pspm, logo, eps;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4830 var logo_rc, logo_ssc, logo_width, logo_height;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4831 var motif = data.motifs[current_motif];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4832 if ($("logo_format").value == "0") { // EPS
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4833 logo_rc = ($("logo_rc").value == "1");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4834 logo_ssc = ($("logo_ssc").value == "1");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4835 logo_width = parseFloat($("logo_width").value);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4836 if (isNaN(logo_width) || !isFinite(logo_width) || logo_width <= 0) logo_width = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4837 logo_height = parseFloat($("logo_height").value);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4838 if (isNaN(logo_height) || !isFinite(logo_height) || logo_height <= 0) logo_height = null;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4839 // create a PSPM from the motif
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4840 pspm = motif_pspm(motif);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4841 if (logo_rc) pspm.reverse_complement(dreme_alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4842 logo = new Logo(dreme_alphabet);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4843 logo.add_pspm(pspm, 0);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4844 eps = logo.as_eps({"ssc": logo_ssc, "logo_width": logo_width, "logo_height": logo_height});
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4845 prepare_download(eps, "application/postscript", motif.id + ".eps");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4846 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4847 $("logo_motifs").value = motif_minimal_meme(motif);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4848 $("logo_form").submit();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4849 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4850 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4851
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4852 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4853 * Change the selected tab in the download popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4854 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4855 function action_outpop_tab(e) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4856 "use strict";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4857 var tab1, tab2, tab3, pnl1, pnl2, pnl3, do_btn;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4858 if (!e) e = window.event;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4859 if (e.type === "keydown") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4860 if (e.keyCode !== 13 && e.keyCode !== 32) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4861 return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4862 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4863 // stop a submit or something like that
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4864 e.preventDefault();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4865 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4866 tab1 = $("outpop_tab_1");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4867 tab2 = $("outpop_tab_2");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4868 tab3 = $("outpop_tab_3");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4869 pnl1 = $("outpop_pnl_1");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4870 pnl2 = $("outpop_pnl_2");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4871 pnl3 = $("outpop_pnl_3");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4872 do_btn = $("outpop_do");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4873
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4874 toggle_class(tab1, "activeTab", (this === tab1));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4875 toggle_class(tab2, "activeTab", (this === tab2));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4876 toggle_class(tab3, "activeTab", (this === tab3));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4877 pnl1.style.display = ((this === tab1) ? "block" : "none");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4878 pnl2.style.display = ((this === tab2) ? "block" : "none");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4879 pnl3.style.display = ((this === tab3) ? "block" : "none");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4880 do_btn.value = ((this === tab1) ? "Submit" : "Download");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4881 do_btn.removeEventListener("click", action_outpop_submit, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4882 do_btn.removeEventListener("click", action_outpop_download_logo, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4883 do_btn.removeEventListener("click", action_outpop_download_motif, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4884 if (this === tab1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4885 do_btn.addEventListener("click", action_outpop_submit, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4886 } else if (this === tab2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4887 do_btn.addEventListener("click", action_outpop_download_motif, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4888 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4889 do_btn.addEventListener("click", action_outpop_download_logo, false);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4890 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4891 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4892
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4893 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4894 * Update the text in the download format popup.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4895 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4896 function action_outpop_format() {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4897 update_outpop_format(current_motif);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4898 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4899
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4900 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4901 * Find all text nodes in the given container.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4902 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4903 function text_nodes(container) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4904 var textNodes = [];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4905 var stack = [container];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4906 // depth first search to maintain ordering when flattened
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4907 while (stack.length > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4908 var node = stack.pop();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4909 if (node.nodeType == Node.TEXT_NODE) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4910 textNodes.push(node);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4911 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4912 for (var i = node.childNodes.length-1; i >= 0; i--) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4913 stack.push(node.childNodes[i]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4914 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4915 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4916 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4917 return textNodes;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4918 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4919
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4920 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4921 * Get the text out of a specific text node.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4922 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4923 function node_text(node) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4924 if (node === undefined) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4925 return '';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4926 } else if (node.textContent) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4927 return node.textContent;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4928 } else if (node.innerText) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4929 return node.innerText;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4930 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4931 return '';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4932 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4933 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4934
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4935 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4936 * Get the text contained within the element.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4937 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4938 function elem_text(elem, separator) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4939 if (separator === undefined) separator = '';
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4940 return text_nodes(elem).map(node_text).join(separator);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4941 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4942
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4943 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4944 * Sort all rows in the first table body based on the column of the given element and the comparison function.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4945 * The sort is not very fast and is intended for small tables only.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4946 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4947 function sort_table(colEle, compare_function) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4948 //find the parent of colEle that is either a td or th
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4949 var i, j;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4950 var cell = colEle;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4951 while (true) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4952 if (cell == null) return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4953 if (cell.nodeType == Node.ELEMENT_NODE &&
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4954 (cell.tagName.toLowerCase() == "td" || cell.tagName.toLowerCase() == "th")) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4955 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4956 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4957 cell = cell.parentNode;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4958 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4959 //find the parent of cell that is a tr
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4960 var row = cell;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4961 while (true) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4962 if (row == null) return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4963 if (row.nodeType == Node.ELEMENT_NODE && row.tagName.toLowerCase() == "tr") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4964 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4965 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4966 row = row.parentNode;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4967 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4968 //find the parent of row that is a table
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4969 var table = row;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4970 while (true) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4971 if (table == null) return;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4972 if (table.nodeType == Node.ELEMENT_NODE && table.tagName.toLowerCase() == "table") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4973 break;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4974 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4975 table = table.parentNode;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4976 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4977 var column_index = cell.cellIndex;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4978 // do a bubble sort, because the tables are so small it doesn't matter
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4979 var change;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4980 var trs = table.tBodies[0].getElementsByTagName('tr');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4981 var already_sorted = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4982 var reverse = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4983 while (true) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4984 do {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4985 change = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4986 for (i = 0; i < trs.length -1; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4987 var v1 = elem_text(trs[i].cells[column_index]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4988 var v2 = elem_text(trs[i+1].cells[column_index]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4989 if (reverse) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4990 var tmp = v1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4991 v1 = v2;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4992 v2 = tmp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4993 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4994 if (compare_function(v1, v2) > 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4995 exchange(trs[i], trs[i+1], table);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4996 change = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4997 already_sorted = false;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4998 trs = table.tBodies[0].getElementsByTagName('tr');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4999 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5000 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5001 } while (change);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5002 if (reverse) break;// we've sorted twice so exit
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5003 if (!already_sorted) break;// sort did something so exit
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5004 // when it's sorted one way already then sort the opposite way
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5005 reverse = true;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5006 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5007 // put arrows on the headers
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5008 var headers = table.tHead.getElementsByTagName('tr');
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5009 for (i = 0; i < headers.length; i++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5010 for (j = 0; j < headers[i].cells.length; j++) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5011 var cell = headers[i].cells[j];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5012 var arrows = cell.getElementsByClassName("sort_arrow");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5013 var arrow;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5014 if (arrows.length == 0) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5015 arrow = document.createElement("span");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5016 arrow.className = "sort_arrow";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5017 cell.insertBefore(arrow, cell.firstChild);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5018 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5019 arrow = arrows[0];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5020 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5021 arrow.innerHTML = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5022 if (j == column_index) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5023 arrow.appendChild(document.createTextNode(reverse ? "\u25B2" : "\u25BC"));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5024 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5025 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5026 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5027 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5028
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5029 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5030 * Swap two rows in a table.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5031 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5032 function exchange(oRowI, oRowJ, oTable) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5033 var i = oRowI.rowIndex;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5034 var j = oRowJ.rowIndex;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5035 if (i == j+1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5036 oTable.tBodies[0].insertBefore(oRowI, oRowJ);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5037 } if (j == i+1) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5038 oTable.tBodies[0].insertBefore(oRowJ, oRowI);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5039 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5040 var tmpNode = oTable.tBodies[0].replaceChild(oRowI, oRowJ);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5041 if(typeof(oRowI) != "undefined") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5042 oTable.tBodies[0].insertBefore(tmpNode, oRowI);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5043 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5044 oTable.appendChild(tmpNode);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5045 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5046 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5047 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5048
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5049 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5050 * Compare two E-values which may be very small.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5051 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5052 function compare_evalues(v1, v2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5053 var e1 = sci2log(v1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5054 var e2 = sci2log(v2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5055 if (e1 < e2) return -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5056 else if (e1 > e2) return 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5057 return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5058 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5059
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5060 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5061 * Compare two counts.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5062 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5063 function compare_counts(v1, v2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5064 var re = /(\d+)\s*\/\s*\d+/;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5065 var m1 = re.exec(v1);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5066 var m2 = re.exec(v2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5067 if (m1 == null && m2 == null) return 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5068 if (m1 == null) return -1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5069 if (m2 == null) return 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5070 return parseInt(m2[1]) - parseInt(m1[1]);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5071 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5072
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5073 /*
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5074 * Compare two sequence words.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5075 */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5076 function compare_words(v1, v2) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5077 return v1.localeCompare(v2);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5078 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5079
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5080
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5081 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5082 <style>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5083 /* The following is the content of meme.css */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5084 body { background-color:white; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5085
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5086 div.help {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5087 display: inline-block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5088 margin: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5089 padding: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5090 width: 12px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5091 height: 13px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5092 cursor: pointer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5093 background-image: url(data:image/gif;base64,R0lGODlhDAANAIABANR0AP///yH5BAEAAAEALAAAAAAMAA0AAAIdhI8Xy22MIFgv1DttrrJ7mlGNNo4c+aFg6SQuUAAAOw==);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5094 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5095
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5096 div.help:hover {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5097 background-image: url(data:image/gif;base64,R0lGODlhDAANAKEAANR0AP///9R0ANR0ACH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEAAAIALAAAAAAMAA0AAAIdDGynCe3PgoxONntvwqz2/z2K2ImjR0KhmSIZUgAAOw==);
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5098 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5099
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5100 p.spaced { line-height: 1.8em;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5101
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5102 span.citation { font-family: "Book Antiqua", "Palatino Linotype", serif; color: #004a4d;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5103
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5104 p.pad { padding-left: 30px; padding-top: 5px; padding-bottom: 10px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5105
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5106 td.jump { font-size: 13px; color: #ffffff; background-color: #00666a;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5107 font-family: Georgia, "Times New Roman", Times, serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5108
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5109 a.jump { margin: 15px 0 0; font-style: normal; font-variant: small-caps;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5110 font-weight: bolder; font-family: Georgia, "Times New Roman", Times, serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5111
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5112 h2.mainh {font-size: 1.5em; font-style: normal; margin: 15px 0 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5113 font-variant: small-caps; font-family: Georgia, "Times New Roman", Times, serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5114
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5115 h2.line {border-bottom: 1px solid #CCCCCC; font-size: 1.5em; font-style: normal;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5116 margin: 15px 0 0; padding-bottom: 3px; font-variant: small-caps;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5117 font-family: Georgia, "Times New Roman", Times, serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5118
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5119 h4 {border-bottom: 1px solid #CCCCCC; font-size: 1.2em; font-style: normal;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5120 margin: 10px 0 0; padding-bottom: 3px; font-family: Georgia, "Times New Roman", Times, serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5121
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5122 h5 {margin: 0px}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5123
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5124 a.help { font-size: 9px; font-style: normal; text-transform: uppercase;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5125 font-family: Georgia, "Times New Roman", Times, serif;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5126
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5127 div.pad { padding-left: 30px; padding-top: 5px; padding-bottom: 10px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5128
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5129 div.pad1 { margin: 10px 5px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5130
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5131 div.pad2 { margin: 25px 5px 5px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5132 h2.pad2 { padding: 25px 5px 5px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5133
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5134 div.pad3 { padding: 5px 0px 10px 30px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5135
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5136 div.box { border: 2px solid #CCCCCC; padding:10px; overflow: hidden;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5137
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5138 div.bar { border-left: 7px solid #00666a; padding:5px; margin-top:25px; }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5139
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5140 div.subsection {margin:25px 0px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5141
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5142 img {border:0px none;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5143
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5144 th.majorth {text-align:left;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5145 th.minorth {font-weight:normal; text-align:left; width:8em; padding: 3px 0px;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5146 th.actionth {font-weight:normal; text-align:left;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5147
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5148 .explain h5 {font-size:1em; margin-left: 1em;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5149
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5150 div.doc {margin-left: 2em; margin-bottom: 3em;}
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5151
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5152 th.trainingset {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5153 border-bottom: thin dashed black;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5154 font-weight:normal;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5155 padding:0px 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5156 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5157 div.pop_content {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5158 position:absolute;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5159 z-index:50;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5160 width:300px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5161 padding: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5162 background: #E4ECEC;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5163 font-size: 12px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5164 font-family: Arial;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5165 border-style: double;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5166 border-width: 3px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5167 border-color: #AA2244;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5168 display:none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5169 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5170
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5171 div.pop_content > *:first-child {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5172 margin-top: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5173 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5174
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5175 div.pop_content h1, div.pop_content h2, div.pop_content h3, div.pop_content h4,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5176 div.pop_content h5, div.pop_content h6, div.pop_content p {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5177 margin: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5178 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5179
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5180 div.pop_content p + h1, div.pop_content p + h2, div.pop_content p + h3,
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5181 div.pop_content p + h4, div.pop_content p + h5, div.pop_content p + h6 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5182 margin-top: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5183 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5184
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5185 div.pop_content p + p {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5186 margin-top: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5187 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5188
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5189 div.pop_content > *:last-child {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5190 margin-bottom: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5191 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5192
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5193 div.pop_content div.pop_close {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5194 /* old definition */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5195 float:right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5196 bottom: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5197 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5198
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5199 div.pop_content span.pop_close, div.pop_content span.pop_back {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5200 display: inline-block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5201 border: 2px outset #661429;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5202 background-color: #CCC;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5203 padding-left: 1px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5204 padding-right: 1px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5205 padding-top: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5206 padding-bottom: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5207 cursor: pointer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5208 color: #AA2244; /*#661429;*/
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5209 font-weight: bold;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5210 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5211
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5212 div.pop_content span.pop_close:active, div.pop_content span.pop_back:active {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5213 border-style: inset;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5214 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5215
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5216 div.pop_content span.pop_close {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5217 float:right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5218 /*border: 2px outset #AA002B;*/
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5219 /*color: #AA2244;*/
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5220 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5221
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5222 div.pop_content:not(.nested) .nested_only {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5223 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5224 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5225
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5226 div.pop_back_sec {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5227 margin-bottom: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5228 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5229
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5230 div.pop_close_sec {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5231 margin-top: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5232 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5233
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5234 table.hide_advanced tr.advanced {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5235 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5236 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5237 span.show_more {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5238 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5239 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5240 table.hide_advanced span.show_more {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5241 display: inline;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5242 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5243 table.hide_advanced span.show_less {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5244 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5245 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5246
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5247
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5248 /*****************************************************************************
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5249 * Program logo styling
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5250 ****************************************************************************/
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5251 div.prog_logo {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5252 border-bottom: 0.25em solid #0f5f60;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5253 height: 4.5em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5254 width: 24em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5255 display:inline-block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5256 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5257 div.prog_logo img {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5258 float:left;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5259 width: 4em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5260 border-style: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5261 margin-right: 0.2em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5262 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5263 div.prog_logo h1, div.prog_logo h1:hover, div.prog_logo h1:active, div.prog_logo h1:visited {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5264 margin:0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5265 padding:0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5266 font-family: Arial, Helvetica, sans-serif;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5267 font-size: 3.2em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5268 line-height: 1em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5269 vertical-align: top;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5270 display: block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5271 color: #026666;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5272 letter-spacing: -0.06em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5273 text-shadow: 0.04em 0.06em 0.05em #666;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5274 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5275 div.prog_logo h2, div.prog_logo h2:hover, div.prog_logo h2:active, div.prog_logo h2:visited {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5276 display: block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5277 margin:0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5278 padding:0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5279 font-family: Helvetica, sans-serif;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5280 font-size: 0.9em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5281 line-height: 1em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5282 letter-spacing: -0.06em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5283 color: black;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5284 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5285
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5286 div.big.prog_logo {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5287 font-size: 18px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5288 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5289
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5290 </style>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5291 <style>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5292 /* dreme output specific css */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5293 div.header {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5294 position: relative;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5295 overflow: hidden;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5296 margin-top: 15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5297 margin-bottom: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5298 margin-right: 3px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5299 margin-left: 3px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5300 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5301 div.header > h2 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5302 font-size: 1.5em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5303 font-style: normal;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5304 margin: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5305 font-variant: small-caps;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5306 font-family: Georgia, "Times New Roman", Times, serif;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5307 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5308 div.header > span {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5309 position: absolute;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5310 right: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5311 bottom: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5312 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5313
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5314 div.template {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5315 position: absolute;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5316 z-index: 1;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5317 left: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5318 top: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5319 visibility: hidden;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5320 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5321
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5322 div.sym_btn {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5323 display:inline-block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5324 text-decoration: underline;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5325 cursor: pointer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5326 font-size: 20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5327 line-height:20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5328 text-align: center;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5329 width: 20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5330 height: 20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5331 color: blue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5332 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5333 div.sym_btn:hover {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5334 color: white;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5335 background-color: blue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5336 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5337
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5338 div.sym_btn.positioned {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5339 position: absolute;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5340 top: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5341 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5342
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5343 div.box + div.box {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5344 margin-top: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5345 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5346
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5347 th.motif_ordinal {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5348
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5349 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5350 td.motif_ordinal {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5351 text-align: right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5352 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5353 font-weight: bold;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5354 font-size: large;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5355 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5356 th.motif_word {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5357 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5358 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5359 td.motif_word {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5360 font-size:15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5361 font-family: 'Courier New', Courier, monospace;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5362 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5363 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5364 th.motif_logo {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5365 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5366 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5367 td.motif_logo {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5368 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5369 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5370 th.motif_evalue {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5371 text-align:right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5372 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5373 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5374 td.motif_evalue {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5375 text-align: right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5376 white-space: nowrap;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5377 padding-right: 20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5378 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5379 th.motif_more {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5380 padding: 0 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5381 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5382 td.motif_more {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5383 text-align: center;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5384 padding: 0 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5385 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5386 th.motif_submit {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5387 padding: 0 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5388 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5389 td.motif_submit {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5390 text-align: center;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5391 padding: 0 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5392 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5393 th.match_word {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5394 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5395 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5396 td.match_word {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5397 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5398 font-weight: bold;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5399 font-size: large;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5400 font-family: 'Courier New', Courier, monospace;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5401 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5402 th.match_evalue, th.match_count {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5403 text-align: right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5404 padding-right: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5405 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5406 td.match_evalue, td.match_count {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5407 text-align: right;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5408 white-space: nowrap;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5409 padding-right: 20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5410 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5411
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5412 div.tabArea {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5413 font-size: 80%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5414 font-weight: bold;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5415 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5416
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5417 .norc div.tabArea {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5418 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5419 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5420
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5421 span.tab, span.tab:visited {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5422 cursor: pointer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5423 color: #888;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5424 background-color: #ddd;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5425 border: 2px solid #ccc;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5426 padding: 2px 1em;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5427 text-decoration: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5428 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5429 span.tab.middle {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5430 border-left-width: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5431 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5432 div.tabArea.base span.tab {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5433 border-top-width: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5434 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5435 div.tabArea.top span.tab {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5436 border-bottom-width: 0px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5437 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5438
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5439 span.tab:hover {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5440 background-color: #bbb;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5441 border-color: #bbb;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5442 color: #666;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5443 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5444 span.tab.activeTab, span.tab.activeTab:hover, span.tab.activeTab:visited {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5445 background-color: white;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5446 color: black;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5447 cursor: default;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5448 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5449 div.tabMain {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5450 border: 2px solid #ccc;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5451 background-color: white;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5452 padding: 10px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5453 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5454 div.tabMain.base {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5455 margin-top: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5456 display: inline-block;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5457 max-width: 98%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5458 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5459
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5460 div.tabMain.top {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5461 margin-bottom: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5462 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5463
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5464 div.grey_background {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5465 position:fixed;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5466 z-index: 8;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5467 background-color: #000;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5468 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5469 opacity: 0.5;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5470 left: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5471 top: 0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5472 width: 100%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5473 height: 100%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5474 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5475
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5476 div.popup_wrapper {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5477 position:fixed;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5478 z-index:9;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5479 width:100%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5480 height:0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5481 top:50%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5482 left:0;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5483 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5484
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5485 div.popup {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5486 width: 600px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5487 z-index:9;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5488 margin-left: auto;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5489 margin-right: auto;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5490 padding: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5491 background-color: #FFF;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5492 border-style: double;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5493 border-width: 5px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5494 border-color: #00666a;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5495 position:relative;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5496 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5497 div.close {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5498 cursor: pointer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5499 border: 1px solid black;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5500 width:15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5501 height:15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5502 line-height:15px; /* this causes vertical centering */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5503 text-align:center;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5504 background-color:#FFF;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5505 color:#000;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5506 font-size:15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5507 font-family:monospace;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5508 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5509
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5510 div.close:hover {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5511 color:#FFF;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5512 background-color:#000;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5513 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5514
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5515 div.navnum {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5516 width:100%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5517 height:20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5518 line-height:20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5519 text-align:center;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5520 font-size:medium;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5521 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5522
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5523 div.navarrow {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5524 font-size: 30px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5525 text-decoration:none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5526 cursor: pointer;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5527 -moz-user-select: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5528 -webkit-user-select: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5529 -ms-user-select: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5530 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5531
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5532 div.navarrow > span.inactive {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5533 display: inline;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5534 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5535 div.navarrow > span.active {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5536 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5537 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5538
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5539 div.navarrow:hover > span.active {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5540 display: inline;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5541 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5542 div.navarrow:hover > span.inactive {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5543 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5544 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5545
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5546 table.programs {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5547 width: 100%;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5548 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5549
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5550 table.programs tr {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5551 background-color: #EFE;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5552 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5553
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5554 table.programs tr.selected {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5555 background-color: #262;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5556 color: #FFF;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5557 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5558
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5559 table.programs tr.dna_only {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5560 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5561 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5562
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5563 table.programs.alphabet_dna tr.dna_only {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5564 display: table-row;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5565 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5566
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5567 table.inputs {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5568 margin-top: 20px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5569 border-collapse:collapse;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5570 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5571 table.inputs * td, table.inputs * th {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5572 padding-left: 15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5573 padding-right: 15px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5574 padding-top: 1px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5575 padding-bottom: 1px;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5576 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5577
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5578 /* program settings */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5579 span.strand_none, span.strand_given, span.strand_both {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5580 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5581 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5582 td.none span.strand_none, td.given span.strand_given, td.both span.strand_both {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5583 display: inline;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5584 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5585
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5586 /* show the expanded motif only when the collapsed one is hidden */
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5587 tbody *.less, tbody.collapsed *.more {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5588 display: none;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5589 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5590
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5591 tbody.collapsed *.less {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5592 display: inline;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5593 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5594
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5595 </style>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5596 </head>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5597 <body data-scrollpad="true">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5598 <!-- -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5599 <div id="grey_out_page" class="grey_background" style="display:none;">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5600 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5601
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5602 <!-- Help popups -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5603 <div class="pop_content" id="pop_">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5604 <p>Help poup.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5605 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5606 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5607
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5608 <div class="pop_content" id="pop_motifs_word">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5609 <p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5610 The name of the motif uses the IUPAC codes for nucleotides which has
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5611 a different letter to represent each of the 15 possible combinations.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5612 </p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5613 <p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5614 The name is itself a representation of the motif though the position
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5615 weight matrix is not directly equalivant as it is generated from the
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5616 sites found that matched the letters given in the name.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5617 </p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5618 <p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5619 <a id="doc_alphabets_url" href="#">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5620 Read more about the MEME suite's use of the IUPAC alphabets.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5621 </a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5622 <script>$("doc_alphabets_url").href = site_url + "/doc/alphabets.html";</script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5623 </p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5624 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5625 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5626 <div class="pop_content" id="pop_motifs_logo">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5627 <p>The logo of the motif.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5628 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5629 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5630 <div class="pop_content" id="pop_motifs_rc_logo">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5631 <p>The logo of the reverse complement motif.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5632 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5633 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5634 <div class="pop_content" id="pop_motifs_evalue">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5635 <p>The E-value is the enrichment p-value times the number of candidate
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5636 motifs tested.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5637 <p>The enrichment p-value is calculated using Fisher's Exact Test for
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5638 enrichment of the motif in the positive sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5639 <p>Note that the counts used in Fisher's Exact Test are made after
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5640 erasing sites that match previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5641 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5642 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5643 <div class="pop_content" id="pop_motifs_uevalue">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5644 <p>The E-value of the motif calculated without erasing the sites of
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5645 previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5646 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5647 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5648 <div class="pop_content" id="pop_more">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5649 <p>Show more information on the motif.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5650 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5651 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5652 <div class="pop_content" id="pop_submit_dl">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5653 <p>Submit your motif to another MEME Suite program or download your motif.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5654 <h5>Supported Programs</h5>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5655 <dl>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5656 <dt>Tomtom</dt>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5657 <dd>Tomtom is a tool for searching for similar known motifs.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5658 </dd>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5659 <dt>MAST</dt>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5660 <dd>MAST is a tool for searching biological sequence databases for
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5661 sequences that contain one or more of a group of known motifs.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5662 </dd>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5663 <dt>FIMO</dt>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5664 <dd>FIMO is a tool for searching biological sequence databases for
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5665 sequences that contain one or more known motifs.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5666 </dd>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5667 <dt>GOMO</dt>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5668 <dd>GOMO is a tool for identifying possible roles (Gene Ontology
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5669 terms) for DNA binding motifs.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5670 </dd>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5671 <dt>SpaMo</dt>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5672 <dd>SpaMo is a tool for inferring possible transcription factor
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5673 complexes by finding motifs with enriched spacings.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5674 </dd>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5675 </dl>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5676 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5677 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5678 <div class="pop_content" id="pop_motif_positives">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5679 <p># positive sequences matching the motif / # positive sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5680 <p>Note these counts are made after erasing sites that match previously
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5681 found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5682 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5683 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5684 <div class="pop_content" id="pop_motif_negatives">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5685 <p># negative sequences matching the motif / # negative sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5686 <p>Note these counts are made after erasing sites that match previously
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5687 found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5688 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5689 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5690 <div class="pop_content" id="pop_motif_pvalue">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5691 <p>The p-value of Fisher's Exact Test for enrichment of the motif in
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5692 the positive sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5693 <p>Note that the counts used in Fisher's Exact Test are made after
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5694 erasing sites that match previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5695 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5696 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5697 <div class="pop_content" id="pop_motif_evalue">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5698 <p>The E-value is the motif p-value times the number of candidate motifs
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5699 tested.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5700 <p>Note that the p-value was calculated with counts made after
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5701 erasing sites that match previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5702 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5703 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5704 <div class="pop_content" id="pop_motif_uevalue">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5705 <p>The E-value of the motif calculated without erasing the sites of
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5706 previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5707 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5708 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5709 <div class="pop_content" id="pop_match_word">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5710 <p>All words matching the motif whose uncorrected p-value is less than
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5711 <span id="help_add_pv_thresh"></span>.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5712 <script>$("help_add_pv_thresh").innerHTML = data.options.add_pv_thresh;</script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5713 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5714 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5715 <div class="pop_content" id="pop_match_pos">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5716 <p># positive sequences with matches to the word / # positive sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5717 <p>Note these counts are made after erasing sites that match previously
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5718 found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5719 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5720 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5721 <div class="pop_content" id="pop_match_neg">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5722 <p># negative sequences with matches to the word / # negative sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5723 <p>Note these counts are made after erasing sites that match previously
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5724 found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5725 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5726 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5727 <div class="pop_content" id="pop_match_pval">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5728 <p>The p-value of Fisher's Exact Test for enrichment of the word in
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5729 the positive sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5730 <p>Note that the counts used in Fisher's Exact Test are made after
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5731 erasing sites that match previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5732 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5733 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5734 <div class="pop_content" id="pop_match_eval">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5735 <p>The word p-value times the number of candidates tested.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5736 <p>Note that the p-value was calculated with counts made after
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5737 erasing sites that match previously found motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5738 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5739 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5740
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5741 <div class="pop_content" id="pop_seq_source">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5742 <p>The sequence file used by DREME to find the motifs.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5743 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5744 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5745 <div class="pop_content" id="pop_seq_alph">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5746 <p>The alphabet of the sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5747 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5748 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5749 <div class="pop_content" id="pop_seq_count">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5750 <p>The count of the sequences.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5751 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5752 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5753
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5754 <div class="pop_content" id="pop_alph_name">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5755 <p>The name of the alphabet symbol.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5756 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5757 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5758
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5759 <div class="pop_content" id="pop_alph_control">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5760 <p>The frequency of the alphabet symbol in the control dataset.</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5761 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5762 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5763
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5764 <!-- templates -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5765
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5766 <div class="template box expanded_motif" id="tmpl_motif_expanded">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5767 <div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5768 <span class="tvar_logo"></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5769 <span class="tvar_rclogo"></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5770 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5771 <h4>Details</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5772 <table class="details">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5773 <thead>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5774 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5775 <th class="match_count">Positives <div class="help" data-topic="pop_motif_positives"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5776 <th class="match_count">Negatives <div class="help" data-topic="pop_motif_negatives"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5777 <th class="match_evalue">P-value <div class="help" data-topic="pop_motif_pvalue"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5778 <th class="match_evalue">E-value <div class="help" data-topic="pop_motif_evalue"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5779 <th class="match_evalue">Unerased E-value <div class="help" data-topic="pop_motif_uevalue"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5780 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5781 </thead>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5782 <tbody>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5783 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5784 <td class="match_count">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5785 <span class="tvar_p"></span> / <span class="tvar_p_total"></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5786 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5787 <td class="match_count">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5788 <span class="tvar_n"></span> / <span class="tvar_n_total"></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5789 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5790 <td class="tvar_pvalue match_evalue"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5791 <td class="tvar_evalue match_evalue"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5792 <td class="tvar_uevalue match_evalue"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5793 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5794 </tbody>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5795 </table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5796 <h4>Enriched Matching Words</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5797 <div class="tvar_words"></div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5798 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5799
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5800
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5801 <div class="popup_wrapper">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5802 <div class="popup" style="display:none; top: -150px;" id="download">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5803 <div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5804 <div style="float:right; ">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5805 <div id="outpop_close" class="close" tabindex="0">x</div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5806 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5807 <h2 class="mainh" style="margin:0; padding:0;">Submit or Download</h2>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5808 <div style="clear:both"></div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5809 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5810 <div style="height:100px">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5811 <div style="float:right; width: 30px;">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5812 <div id="outpop_prev" class="navarrow" tabindex="0">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5813 <span class="inactive">&#8679;</span><span class="active">&#11014;</span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5814 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5815 <div id="outpop_num" class="navnum"></div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5816 <div id="outpop_next" class="navarrow" tabindex="0">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5817 <span class="inactive">&#8681;</span><span class="active">&#11015;</span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5818 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5819 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5820 <div id="logo_box" style="height: 100px; margin-right: 40px;">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5821 <canvas id="outpop_logo" height="100" width="250"></canvas>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5822 <canvas id="outpop_logo_rc" height="100" width="250"></canvas>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5823 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5824 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5825 <div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5826 <!-- tabs start -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5827 <div class="tabArea top">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5828 <span id="outpop_tab_1" class="tab">Submit Motif</span><span
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5829 id="outpop_tab_2" class="tab middle">Download Motif</span><span
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5830 id="outpop_tab_3" class="tab middle">Download Logo</span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5831 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5832 <div class="tabMain top">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5833 <!-- Submit to another program -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5834 <div id="outpop_pnl_1">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5835 <h4 class="compact">Submit to program</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5836 <table id="programs" class="programs">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5837 <tr class="dna_only">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5838 <td><input type="radio" name="program" value="tomtom" id="submit_tomtom"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5839 <td><label for="submit_tomtom">Tomtom</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5840 <td><label for="submit_tomtom">Find similar motifs in
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5841 published libraries or a library you supply.</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5842 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5843 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5844 <td><input type="radio" name="program" value="fimo" id="submit_fimo"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5845 <td><label for="submit_fimo">FIMO</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5846 <td><label for="submit_fimo">Find motif occurrences in
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5847 sequence data.</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5848 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5849 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5850 <td><input type="radio" name="program" value="mast" id="submit_mast"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5851 <td><label for="submit_mast">MAST</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5852 <td><label for="submit_mast">Rank sequences by affinity to
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5853 groups of motifs.</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5854 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5855 <tr class="dna_only">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5856 <td><input type="radio" name="program" value="gomo" id="submit_gomo"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5857 <td><label for="submit_gomo">GOMo</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5858 <td><label for="submit_gomo">Identify possible roles (Gene
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5859 Ontology terms) for motifs.</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5860 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5861 <tr class="dna_only">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5862 <td><input type="radio" name="program" value="spamo" id="submit_spamo"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5863 <td><label for="submit_spamo">SpaMo</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5864 <td><label for="submit_spamo">Find other motifs that are
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5865 enriched at specific close spacings which might imply the existance of a complex.</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5866 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5867 </table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5868 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5869 <!-- download text format -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5870 <div id="outpop_pnl_2">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5871 <div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5872 <label for="text_format">Format:</label>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5873 <select id="text_format">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5874 <option value="0">Count Matrix</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5875 <option value="1">Probability Matrix</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5876 <option value="2">Minimal MEME</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5877 </select>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5878 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5879 <textarea id="outpop_text" name="content"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5880 style="width:99%; white-space: pre; word-wrap: normal; overflow-x: scroll;"
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5881 rows="8" readonly="readonly" wrap="off"></textarea>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5882 <a id="outpop_text_dl" download="meme.txt" href=""></a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5883 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5884 <!-- download logo format -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5885 <div id="outpop_pnl_3">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5886 <form id="logo_form" method="post" action="">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5887 <script>$("logo_form").action = site_url + "/utilities/generate_logo";</script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5888 <input type="hidden" name="program" value="DREME"/>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5889 <input type="hidden" id="logo_motifs" name="motifs" value=""/>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5890 <table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5891 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5892 <td><label for="logo_format">Format:</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5893 <td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5894 <select id="logo_format" name="png">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5895 <option value="1">PNG (for web)</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5896 <option value="0">EPS (for publication)</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5897 </select>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5898 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5899 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5900 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5901 <td><label for="logo_rc">Orientation:</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5902 <td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5903 <select id="logo_rc" name="rc1">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5904 <option value="0">Normal</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5905 <option value="1" id="logo_rc_option">Reverse Complement</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5906 </select>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5907 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5908 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5909 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5910 <td><label for="logo_ssc">Small Sample Correction:</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5911 <td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5912 <input type="hidden" id="logo_err" name="errbars" value="0"/>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5913 <select id="logo_ssc" name="ssc">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5914 <option value="0">Off</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5915 <option value="1">On</option>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5916 </select>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5917 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5918 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5919 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5920 <td><label for="logo_width">Width:</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5921 <td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5922 <input type="text" id="logo_width" size="4" placeholder="default" name="width"/>&nbsp;cm
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5923 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5924 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5925 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5926 <td><label for="logo_height">Height:</label></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5927 <td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5928 <input type="text" id="logo_height" size="4" placeholder="default" name="height"/>&nbsp;cm
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5929 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5930 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5931 </table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5932 </form>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5933 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5934 <!-- Buttons -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5935 <div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5936 <div style="float:left;">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5937 <input type="button" id="outpop_do" value="Submit" />
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5938 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5939 <div style="float:right;">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5940 <input id="outpop_cancel" type="button" value="Cancel" />
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5941 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5942 <div style="clear:both;"></div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5943 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5944 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5945 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5946 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5947 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5948
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5949
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5950
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5951 <!-- Page starts here -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5952 <div id="top" class="pad1">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5953 <div class="prog_logo big">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5954 <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAPYQAAD2EBqD+naQAAAAd0SU1FB9wLGwYBMoyhiwgAACAASURBVHja7Z13fFRV9sC/503JpIeaKFVREBQVEEFFQVcUuyDouuraFoVV17IrayPjDP4U3XXXhrpiXxuKKF1dV8WCiEgXRUAQlJIYAilMf+f3x3szmVSSkICyOR/eh8wr9717z7mn3XPOhRZogRbYLQiQJiJGy1D8D0LHjh1/XrZsmQK9gU3Ap0mE0QL7KTx411136Z///GdV1ZhpmvrYY4+pqsZUVceNG6dAz5Zh2j/hnpKSEtM0TVVVrfq/qmosFtMxY8Yo8CPQHejucDjyfm0dbZFp1WGaxmJ3ppSWSiQUIhQKIWJxehGhpKSE1LQ0uvfowQHZ2exYt65D8dq1qzUaXR2LxTYCP7UM4a8MVFWA9mY0+nLhmjV63LHH6vMvvKATJkzQfn366CtPPKEDjjtOV61apeeedZZqMKgaCKju2KFmYaFqJKJaWqqqqoACR/9a+u5sQT+IiD77zDPbKCnR00aOZPHSpcydO5fLf/972rdvTzgcZsEnnzDmqquYPmsW/PxzxbMOB4NPOokRZ5+tB3XrJsAUYKmqOkQkVuVVKUBGDRbGz/vSvPlfBHcVDpB7XP/+Gz9/5x1mzJ/P1i1buPbaa1m/fj1du3alW5curPvqqxobCoVCpKSkIO3a1Wc89bCuBy51OZwu1RgiBqGYGf1uw09/Bd5t4QDNT+wKfPXoxIl9jzm6gkt/OmsWn3/4oRIMyrfLlzPuzjvp27cvHTt2ZNGXX+K/7baaW8zJITM1lflz5wL8ZtWqVWm9evXaVcv7Q2cN6hM68tAuR2MIhirFpUEef+MdBFK1RQQ0v6g/MC9PLxk5Uq+/7joIBECSJmwwKKqKR4RTTjyR0885h2effZaNa9Ywa9YstKQkoQzGwSwuJhwIwK5ddO3a9b+9evWqjQPoSf16qUOQles2gYLL5WDaBwu5dtSw8L/eeKdFB2huaJWTo0NOOMF8wOs1qiG/QhfghtGj+dMNN4DblhJlZVBaWg35AIYI7NgBbjcbNmwwjz766I+WLl16OfCDfUs3YB3AAdke6d7tYNR2Jv6wuZA2rbIwxbFPxfD/jBn4t7vv5uUnnzRsTNelEEIoBKWl1qH1YM7hMAXffWcsWbBgMLAB+AgoAtYC5SJCp86dUTPG89M/ACASi1mDH4u2+AH2Bvzhpps+p3Xrmi+mp2Oa5h613y4nh1WLFuHxeHTq1KmDVbWVqjJjxozU4cOH88rsj1FXKteMOh3D4eQ/ny/hjnwfn32zyWUYxtAWK6D54YW1X355WbcePSr32elk1EUX8cYbb1gzvvG+BEzA2b49msQ1RARVZe7cuTzzjwl079qB6R8s4PhThjF58mQADjroIDZs2CAtBLAXFMEaTwaDe4R8ALKzEbcbVUVVE4hP/t/lctGnTx9+c8op3HvffQm9YubMmZx77rlic2Rzbw7I/5oreNzJgwapqqI7dqA7d1pHSUnyVG5Uw0MGD6agoCCB7IQ+kcQFIpEIkydPZszYsQmuoaqEw2H95JNPdOHChTHgervJT4DTWzhA08OjwGWT7r8/u3xXhckei8W47c47obwcMjMtsy9OEHUojdhI/M2oUXwwb16dIqKqJVFaWkJmZlal60OGDJk7b968M1SVsWPH8uSTTxYC7WmBvQIbV6xcGQK0aM0a3bRsmW5fu1b1559NLSzUakdBgXXYawC7A0CXLVtW7fzMmTOrnTNNU03T1OXLl5u1ia4WaA4lQbXVmDFjcoFcIHfJ0qUXqKqaBQXVCMC0kZ+MtNogEAjoli1bar0ef/bee++tiXDMFszsQ+jbt+/r1111leqOHZWJIBBQ7913azgc1qaAeABCVUKqQgBvAO8BL7RgZu9xhd6nnnpqNLpzp8559VXVkhL9ZOZM/X79+j1Bdm1sP2KaZix+rqioSBctWqSqejPw2KhRo+IPxjp06KC0rOg2p82AkE8O4zkbiAJ6ySWXVJLRjUW2qmqrVq30+eefr3RrFWYQf4+pqjpq1Khq7zYMY4/0g5agxppgPCnARcC1GPRFSUF5gAn0VNVz69vMkiVLWLNmDRdeeGGt93Tu3JmNGzfu1slkGAZbt24lNze30jWHw4Fpmo3GYwv7SIY7GYKD8UA/INteQFaKEL7iqBNPPPHYhjTXp08f+vTpU+O1rVu38sc//pE5c+ZgmiaGUbtLJu5HqMNdfYXT6VwdjUY/b+EAdXm9DMNlmmYrAA/I6SKe6ao/JM38v2Pw52oPrgV9Seu06RugTzT62ZogNzeXbdu2ISIYhpFmmmagxRNYC7Gbptlnw5Il29Z/9dW2H1ev3jpddQPwQ79+/f5k32NNsSpStdeSXonZ99JLL+0RAkWEG2+8samUU7Zt2xb3KKppmptbREAd43Vwly5fdDniCLS42DoRDILb3fnRiRPzLzzrrIdVlX9MeoKCw36GSMUIpaWlJVh0UVHRHiPt4YcfbhqKruxyFiDUIsfrhpWAfjprlpplZVZUb1UHTyBgRfnGD1Xt0KlTvR0++xIcDodecMEFCvxDVXv/79nrM2lnzuAanUWdnV8InzocDu104IGqO3aY+vPPWqOrt7BQdds2jcRijTLzmsg5VO93RCyCNa+88kotKCgosTnC6f8rIkD/PGcsQ044AYAZL9XOgkdfdlnxibEYuzZvjkpOjrN1q1Yc1Llz4p4Lzz+fcePH21qBidMwGDhwIA8++CAn2O1XZcWjR4/mmmuuoX///k2ruIjw9ttvc/755+9enjudAGIYBu3atctUVXr16vXOqlWrOovIpv169pszeX/yP/9Z+0xOPqLRymy+yvHp7Nl61tChetbQoTpt6tRaF2x+qSLh6quvTvw9adIkE3hrw4YNjv3WDNSZDEZ5/6Hl9zhvGjsWzKZbOykH0tu2Tdjie9H9XCmYpCHPjR49mqeffjqZi5iq+jQwVkTM/c4MVCUfcM564y6u+8ufmxRRV1xxxb6xWUUSR0Ofa2clqdgSzOTVV181otHoNTNnzjxjv9MBzBl0EeUUNeD9e2Dkfc/z53xPnUGeN4wezcFHHlmvwX1j1iwAJk6cuNf7tmLFit16CavCww8/jMPhSHZ+sWDBAi688EL97W9/O0tVPSIS2m9EgDmda8XgSRRFKvqjigooQh85h+Xx819BaxO2nQ/ODGAjrA5A9WyeTA4kg1y2UCnO75cOJ510Eh9//HGN10aOHKmLFi2a98MPP5y834gAEYaikIx8+7wAhpr8oabnpgMvA5/Av4C+1Y5bWMRoIJUXBg0apL8G5KsqH3/8cY0iUFWZOnWqnHfeeUNUtcPeJoBUwFPHkdoYbqQ+BBiitYVMWYs57iqnYskv0trEoGlzjXGMX7du3R3RaNMlcDz55JN1c7VGKrFVg1DjiE++duutt6phGAtV1dhbBHBW6+zM0iM6tSkccFTPwv6HH1o44KiehUd0ap34PahPr0Kga4MJ4CjOUWgjUgvxKIiDc8yZpMVPReEkrZ/uk2hz69atr7344ot2i3sOY8aMqRXJt99+e40yf9q0aU2iRHbs2FEGDhx4wPr1689sbiXwcDEck3My044ePWKo4dRwRjQUILPtgZRt34rDeTCxWJSs1rk8PmUOKSkeCYWCDSR5OiXQpLYggLCCS8TCv0CmmBWELtDNThPeKZBdzzdtuPrqqyU1NVXPPPNMsrKyqs26hkJtil12dnaN7HvEiBEN1kPatGnD9OnTOe+88yqdnzRpkoiIpzk5wMnZGWkrhxxz+HG3XHRqqsPplPKyMlxZ7dkVCODMaEtZeRlpOe3419S5dOt8ANFYrDHy/5i4wocgKH9Xg0MFvkiewVolqNKexu+p5TFIq+/7fve733Wcm5PzStzbJyK43e4mHbjbbrutmgyvmmdQX+jatSu1ia4tW7asbS4O0Mntcn5wxx9GaUlJiQQiiivFQKNhHAaEy8pwuj1kt8njqTfepXvXA+nToyvzvlzZCK2HYxGsf8oKPNxunE5U3+Kv6uBdBI8qHlEOB76sLiBQA04GfPV840/dIPDEV1/dd5lhXP0TLAmrzveIyKlnnXV3z549uSknp/Qf27dnDh06lGHDhu2RLG+M4ygOmzZt4swzz+SCCy6o8f7PPvtsS3MRwPI22Zn61LT3JRwoQw0noIg4UP0Wp8uNwzAQEbp3PZDB/Xqxs2xXwzs8B6dGcNvs3BST2+V0ogAynI/N6SwTYYCCC8FTnQEkwNEwqYNDwbgZCoAPROSBL6CLMXv2rctmz85eC5suX7Yss3fv5lmMi0QiqGo1ziMiZGdns2LFCjp37kynTp3w+/01EoqtDJY0FwEEI6FAzgF5OQw6vi/ZuZ2qsDTFYRj4n5pKSXmAwcc0cqBCHC0ODrFlf1TdLK6CqWUKA5IxvhwkDCfsoSY3AHhCLQKIZ+x4gNgy0KOgpP9RR5kh1QNVVZrafEx28lRF7M6dO+vFXbZt2zYzLiKbRQfof2QvBg/sh5HZlrJdAcp2BSgPBO0jRFnAUvaGDuhNWKVR+XhacQiwQkJsq9RRk9fFVgvjKCgHUTjY/j0TCNOApItnraacWAUgNgI9kr4n8Hu4HejxCVwhIufbkT9ah07RoD5PmTIFwzBqVCDrS2hjxozh0ksvzW1WP4DGPTGqlO/4GTEMMGMJRBticGiXA4hEYxAO1J17V7sCmJpkq70vw6shsrwWV6fadPGFQkSg+6dW9a7dQtuK7glgSAXxuA3IFbgnaQhmPvroo2kvvviiTJkyhfnz51ebsa+++mqD+nzRRRdVUxAbsu6hqvztb3/ToqKi9LfeessNuJqFAFJcTsx4UqXhsIY8o03i7x+3FfH1uk10ymvbKOTbLP4uxEaFWb3CVtw5ZP9f0yw37OttU6mkI9QK7SALONh+7geFTp9bhHBI8jsdkGkTQeDyyy+XRy6++MCJQ4aQ4jJwuxy4nQYOw2DqM4/w6KOPNsi/EJ/p4XCYYDCIiDBz5sz6IF9FhKysLFHVZ4YPH74DiDQLAfxnwTI8bhcA6QceCmrCrh1JyFGcDgebC7ZbMe+N0XohB0BNtkuUFdUNapYqrBTlWnawIPnRKm8z+sHO+rzTsPP3HfCdAcUKrRwWAcTZglj0WNmpNV+15OgLYMLYU/nsoYP4+w0D6NPzIFYu/YqbLDEhDZ3NW7duZf369agq55xzTr0IZ+TIkfTs2fMqEflns4qAXcEQD7000+pQeBehcMTqY0paJXZkGILDYbDw63UYTkcjGQGFMrJ6oUXjZEKEOEHOZbJcTsy+1wW018revtKvbGKqr3SzxYgA6tiNFxFg1nhy+x4coaA0g+8Lc1mxqSsOw8CMmYrAIYcc8pWIMGHCBD744IN4mjGzZ8+u9UM6d+5Mz5496yP7TWDh+PHj5c0337z5m2++eS75YnNYAUuBYcUlZRTtLKNtNjhTMyAWhkAJVCm57zAMPl60ktRUD4FG+Nu1jjUEYxQlVe51A22A4hDsTIEihdxwPXUAJ7QywWXP9gKgvQluhSyjMmEkOqmzOBqTawpLiKalf+WcumQkaZ7VRCMRwsEyycnKCq9bt+4e4G2v1wswbs2aNfcfcsghnH322XsU26CqFBQUGHl5eZMsCca/apSDTQxnAEsNw+Bfb7yDw+nAiIYs5ljDfguC4HQ5oQEeOX2LTsDRtgqwraHjIrDhBNgKfA+kOmFIPblNOhADchXuAGKm1auOSRbJarGqh6PT6YPJuTj4dvgDrPv7zJNp3+pHwsEQS77bqNlpLkrLylxVfBEP9OvXL7t169bFzzzzTKMJIO4YysvLU9216wWgNRDYGwQAdrFkj8dj6WmGUaupVx4MIohCDXK8ts45SMewuJdq40usaoUdbzRABDgU3hZrrwBxWs/GrdJLgamAQ+dyACnI1PlDNslZW5Z/tvxC98at82MSLg+nOwkhEvnHy+8QicYEeDP5JSUlJSXFxcVnXH311Yfcd999DepTfJFpxIgRiAgbFi+Oh8gJtWnCzQBvJ3ynBdvrObkaKPs18aDRAIRrfcVHLc9nWRYoOTbCU0LWgpJD4Zn+VoiBiIGDCA+tWt/5xElPnb/11uzhOfD6tNUb1sy654XZcx+c8v5MPPpM4Q0l5yb67k36tnyuwcsaYN2bb7652lbidzvjwUpIFZFvZ8yY8U9AFi1bJpgmpw4e7Hn8iSfa7y0C2BFXmMLRmGUFZOVZXKBKR9I8KbYzr/khDVphKYJxKGggAXSsgWhjapmBAfueoKTQ86ftbd4cNvZv342KPtj3b/4FC4C/AOfbxygC/BGYjJerKymY+dyNn6fwsR1g8eLFh4kFNdr+yev9IsLAgQMBnjFN8xawah8RCjH12Wfd2dnZf9pbBHCl9U1JXj61TfHUrEZX4tpTiMJRgEcrMPiuzbu7NcDqSDYHDCzF0p0w5WBtaSDd3fGKDwdc1/rO464bt+kZbmRrjY35yQMW4+VBNNH0kYnr3sS5/r17917bt29fzjzzzER0kmmaiAiHdu/OgL59WfzBB0QikUqv+L/HHoNWrcjOztY/33jjnap6dnNbAYmPq8S2DAcYTUdvWuGTq7PAnzmdozEpM4azNsmMe99G5nr791H1fGerJCL4RKCvEzpbcSd8Y99jOohFx7cfNf/JS9Yu5C4b+V5yUcZWoiA/d+NjCV4mIVxGPjvwVzJJ7yGfUvxMXLly5aH2uRduvfXW30+bNo1Vq1bN9Hg8Zxd8842069TJKoAdDlf65uVLl743b/bsUwcff7zx1xtvVBE5CpjV7ARAJbepQGlBHaK+gSqA4BZLoIeBGnOAzHcRCeJVAy9wElbd3jgU1TyhdwuH2Q+8HYMrndaagClgKBTbDao4gtnzTlr93YZ/sslm688AF+InM2l2tyKfAEIaPo7HyybCDALgrwzEzTx8pPR6rJesYlXyN1z+97///fKMjAyXx+OJANF2HTo4CNSaFX76I5Mn6+Djj+emcePkhWnTzli6ePH/NbcIALghMcBij7DhqHGkXbYTyOPxXFw/9sJVGveKhqkWSWK+TT8JsdJGfk1UmdKYDomle84Pw4VRCKj1uyPQmQo38I8pMe75eGqSVePnanxJyAfwUYyfVOAa+3enj679aMW9H99bFLwn+Ln6NWKapq66flWNxFlWVhZpqNiipIQ+3bufoKr/anYCcDqdyypZ+6oEgoGqwbuEI1Fuu/J8cjLTFOhUrw4ZpCS5X6uy/KEYzEfoJdVV/Y72gMQX0x0NHIc0gc3HQ2SQlXi5zrAcLO74esMxML8//LsBQ/U1+TyOFx3yxJCH7njjjpM9Lo+ISIZhGPVhjY7vvv66Tg722cKF4HKBKrfecIOKyEnNTgAulyvJTWmha9eW7xEUl9NRKcwpHImi2mCTrDboIVW2hEl65veSNCkUFoiFyH71fGc/S5dMNBKxiSgSg28bOVSfIUxC+fCREY+s59GKHIZ6Qu+1dRealq0FBectWLBAAXr26SM9DjnksCVLlvTdGzoAYhgEy3bgycgmvU0eGijhgHatq/mw60fsu9ccpGK5tyZiidp/L7bPXwakaP11ALcJHye1G8WS/+4YBBs1QD4U+Bo45U/+PzXK9e5yuSq6XD3aWIEZp40cKSUbNyrl5fLa5Mn06dMnrVk5gL0Vm+XtKy4EEVLSMkGEDZsLKsKi7aybmy85m2CwYWOoDSeUDvbfZQthmgF3S8NCvdVIcqfO5oznT2POfxww5Xj4jn0Dg6KRSJyd0uGgg2q8qbSs7IzNP/0ksViMjPR0Jk+e3LwcQERmqypqmrTueDCoJpb+K0W0CIgKu4JNU91E6yYE077+qgGt1FoXkPrQ0nJwhaBrhUqxsN/duLIBTz+YyL6DBWaSuR0Oh2vMZDZEPuzQu3eJqmYempe3CXikua2ADBGxAkOo0AUioSrmSkome6sWssI2+0vi9nz8w7IWWG7eWmGXpVekAz/Cyr5geCD2M5hL+IWAmiaFRUU1LiCZqiERWSYiAaDL3jADUVW6dcy1RlmsSOBoMgGoWg6iRkYFST3PKbDQ0tYHUF0/UIEsl4XcOtcRBCKTuMYNWg6aB/IK9Iv9UghARKo5gqrg46SsrKz2e8MVXAnHoJDexqbS5HAMgWBZk7J7Tfo/mfdErb46arLt6/MuAzmojPSVU7i4OwT7gsyDfr+oqlyqWrHbWS1QUlJSvldcwTWlMZmmSVp2a3YW7UiSylEUSE9NaeIPoFwAFdJFCRh7mAp/LLo5j9e+DZAxEPgDHFP6S0G8y+UCtxsxDFrl5OAwjB9i9UwwbRYCSE1NTVFV0jzuauxZq85XO7Pz+Rkf4XanEA7Xf1JJ7d66dUQZpk7mohyCtQCkdbUT3s1YCItag7YB9wg4KvhLmvnDkmoR2/L/jfo+21wi4OGYaeqNvzuLmGnaYeL2QDprZlE/7yhtsC9Aa+7RQkyOM0awNp4cqyYxo3osQPJvtxN+U/fbytdD/zN/aciPm9zxgwZyuuYiAAUkGAoTLN2BiAFlRVbwlMOdUFhcTme1Ldb2WBE6h4XG+RRW0gOcGAYcYfdXbeSLwncmPG/fuxsZNHj3PNXLoc2K6b9wYigSupwbGNug527nZrxMx8uBe4sAKsynnUVWSFgSbYgITofBh4u+xu1qvBTanQEvlf9ok6R6isKiGBzeiJjCuuD4ZhvIfN7DyTtRjT6vj+gk7iJGvrUEXQdBtsPL53qvrsbHefjYvNcJoE3nQzFj8awgC11tsjO57OzB/PDTNis82jSJRmON4TMOcXNCXaZbTQShMMMJJw5M8utT+e+KJmJEGvBF/ya/0rJz04Gf05hIevq49C4dHuwgOkEnTr94+pXG3UYxXsprQH4PrEDQITEz1mGvKoGVNP9YLCGI4/hwuxw899qHiQCRcCRK6a5Ag6phYWn4DkyOISnAIXFtFjlqkpcsEW1q+MgDI3tXlIOOV1o+A3im0uRQbuGeKtE8Xt6ASkEoG/BhpeH6MPEyGS95+GqJAtpTeIiNm9kssk3ye3ftfT3wb5SX8PIZJrOZwL3cxFCUTvh5FqB/Xv8ruZNcHDyBn6K9SgAJuW6HhyngcDj3SN5rZQO+ZtYRpZc4yNDqzy5OQj6KpS9QOd4PDCbhY2MVNjwNHyOqEMQBeNmAcjF+PsdysZ6FFR3cfJDKSyu2rTDwsxYvxUC7Nultvp7749z/e+ubt7hv6H3xYNO3T+t2WtclY5fcszeVwKpmScULDQc7Nm+o17NL4IAaiUoxRHfLHQ6KZ2mQTlShVy3WY827bFRFvsWGR9Rw3xZ8dMXP53h5Dx8BlEnNrvr7+R5hjv0NrVCuL7qtqMexHY+VNFcaqvoR+UTxcf7EoRPz97YVUAnh5TsqZ25Z6wG1Y3ARdPsSvozC+Fq8iy8ma/k1EolB3wSq04hRS9yfNOVChDKKfD7GT64d5CE1yOamLBjQm3y+sAniIfJR8vnD+Nnjh8pd0gc/zqlfTxXqSH5tdgIQh5NYknPHNGO07nCQlRHkMFizcUul+7+EEQrLgWMEMudXDuOOY62Iiiz002tBRq5URnQ8O2JHLZ/q+XRPRaKfnfg5iXyOAYIog2v4rqvx8h7eSvpG48BHCD8D8NolboQr8PM0afyH/yP7uSXP6cjDR6qIPLbPCKDs581ktM2rpIkbTjfZGWm4nE4Wrfo+ce30aPQ0gdelIk1suLPCfKvNDGxXTfGciaHKwBruj5kwt5bmfmoSVuAlHcGNn1uQJI+cl1S8BPDzND5Ow5fIB2gKOAkvgo8X8LIVH4KXdVf2uVLI54p94QhKhP6nt26PiGHrAla9gFgsyvUXDSMQDNOv18EJVt5F9US1F2xs5LqB3+7GE5ii06tk95aSJkJ2LSKiqkNnrcIcAy48sWZTsKGzshyYZn/gNXjJJp8XUVrjs4paNDn4OBl4CC9ulP72uW54KUCYXdejzWYFHNyhPSJimYGGEzSGQ6Ns27KJtq1y2BUKgcbo0eVAAqEwrbMyMIp3uqtYbS7g8M/BcVwVbV8FEUUx6KIx+gIfJC5mcCbQVuIpRy5q3WHTgMIoXNKPKra0lwwUL5L0XqsYXVHco4iSDfyIn8cT8t0K8boLL0OB2cBDwN0Im5uV1fqI70S1KencbncdbzYC2Fq0w1oRVAVPBlq+nSlzP+LIzq1p1+aYRKZQLFEfUCv7kSvs80tdcC8VSRyIEFOTXRikq5WVcYr5Jh8aF6Dm2xgoN2Hlo/5HlFOD82kLdsx9FehnvW5HFXOvLVao9yuAQRTFQRQoRVmAUGqXoC0CnHgZh9IJpTtesvDxNF6eQ/Hhr+Id9HIYVuyBAEvwsU/jCZptLSAQClcIanEQDEdZvbmYEjMlYRq63W6m/OdzAqEwRTvLksmgIMlec8bssiwJ2Mk6YGVivV8ZKS477l7JQ+hjhyGEENAwTir0it33WSgGvkH4FlhVMr4kHViG8D1CayAHP53x0wc/vfHRFZgBPAisw0suEKiG/HwUK5l0FfD1HiE/n3FNgahm4QDJAaEgEA3iSXFxxx9GgghqmoghqEKq221XXDLi4rnIztm7LE4ADhgO/DfR4qWY5vREHJGqcChwhU5nKvCICh5bh1ibrAQohBywsR7sNEZS8GeWL+sTVT1fRKYnIWAW8Cx+W977GW4j/jzgRdTOcfAyFzgN2IKvCU1AaRrcNRcHGNOtY57l7bM9gPEUIVEzyTsIwXAET4qb1tnpcc3RNGGjWCHcaiPy5K9qswbssvCi/E2Fb9XgAtFEINKcKq7gsEKjQpAqId9C+NkIHrxMJZ8rbcLZBrwOvIcQxcst+DgDHw58VTyNzQVeO9MI4E+cz1+rW0PNzgFEhB8LiiqigtQEhxuJhSElA8JWZdBIOMzFw04gEAqT17YV5s/FCEwOw/1uuFEgw9L36Bi1qm58DqBvISqsUOhvl4lVxMrSTSDf0hVMtf6PU44a0wAADOxJREFUn3I2qcD18YqtJ1js3Y/gs7dq86JNMuO9OFBS8e+GcL38AZiAz/ae3sIgfVD/DVwo98veNwMPaJNTMdMjAUhrXaurWFUZecoATNMkBl96rLy7Fyo8v2Q54KoEgQ1HxeRf8ZTqeLl4iXMEQTD5UiN8KyDFy+gOuAVGD6SGlbOmYcmLbUSk2cUeXE3UsgehG16OrOJFrIrVc/FxAF4EL7dKpqwTkUzJl6v3jR+g0lqAQLicJKldjWNErcgh0wFb+kFU4Lvk5VyF3E+pZEerUPtSrQg7RXAA6wrnkgrc1h9ea0YzrJ9tBu6yZ36sidotx8cylP/aJibkEyJ5BTSfyfiIb2t/JcpoRXfh5SGEW+pyPze7J9CMRSzEh8vt11X+lnhmcHFJGbtgmwkLbYTPxpbX9hMnpVvr2xb2f2IpymqtzUOovI6DHRRzZHgbT/SHvze7/PUlqZy+Jk528NMOr+3UEYL4WJbk2ppuE8Ig4EH8dMfaMfRW/Gys61uanQBKCjYj8WqhalZUDgXEcLD42/VEojEem/IuLpcz8aUGbLft7PipzCgk0seN64iqEJUaOI/d/Eo5n1K5nED/2v3/vzaovnI5nmKdoGWMYxTwHj5a4eVRfLyOb/fBLM1OAK7UNKLhoB2IZev0CfvOwdpNW4nFYjgEypTCATbCTYvdB5NYhgGc+kVyAoda8Xw1sIAdmKxkfwMf99j6Raatb/TAYCxw76Aeg/6CnzTyeRz4x742AxOQ2ToPrSNGPVEvwDA40TTzAeZDZwP+A/TQCnkPMESS6wka/KhKTLWyG1FMJhvDKWV/BCUdtXZCE6QNPl57/MvHp8/fNH+aPaAd8FV4TfeZK7hCyzdxuOrOVkn1uGmdlU7fguDOhTBArLp58Uze5AQfF3AmtoUg5bxDGisQjrb3CUSEsLIXAjL2FfjZBTyLl+s0omNV9XC5XT5iIifjJYqvYTjdK9vGWYtCUWKRcC1EAqaVMpYr8K5ABxvzPyu8lMQFDIE+iXZ/S7kq/1TTrk5v7Rs03TiXH9jfQXno5d++/FdLg+YW8nkJu0DnL44A4gpf8eYNSKisxpKx9se8FN/JS+FHE07TuPPHeqrs2zwrGijJ3HsT4d9qEkL5gihj+F8AofCSIy+ZLSJiHGCkImTga7jes3cIQBwI0LZL90T5uNQUN0n1+uJOI6ddSvI7gcEDYEnMEgfrDNh16ZVMuOyaymvqci7l4uCPAscS5UQZYVXr+kWCFw/5XNpErT2Bl3mQKA/bqHLre4cAnCnWHLZdww7D4PE33sPpMDBVCYYjyRtHLVc49RirkDMu+DkTplx/Mb5VnVmFn8+q0ddZlMl5LDdGNCiGf19o8UHgVbw82ARtTQBOAejVvtdCfAxvHAHk4yOfmXjrXTO/8X7BlIxEQfUtQ4sItg9y5KGdMU0zTsWLIzDk2KSghmPAPOxe5n9+KFvxVY///xUqcTEaUBl9N0QQA/j6uq+vNk1zTuMkSYU78SWEQpQZ+PlwT74rNTVVO7RvzUWnHR93BliewMxcKN2G4XDwwLzpDOvQhz7du7Jm4xZ6z/n46xNUj64WljWeS1Bi3NOMbtx9AfHFoyYA0zQLDcNot2ciwM+l+LgZYSNeFC+X4G1qEWFxggm5r+PY6CAtxY0gvDx7Hk+53RdUQ76X36HsqIz8+Zn7iTkn5DeByPJiNhb5NesAPtbZixkLgbHkN5VHTatSLa/O+RhPiguny8VmkUiVGTKSGC7uSQ5qXDQK3K79hgsIfcnn/AZwjYer/P4C355NUqfdkA+pISJWWY6fI8hnIjALP5820htklYhRZYO7gKtWnMorfMp5pwwkGI4kfAVJbP8iYDJBKuLJ+eIWYCZEOmCtE/z6wccK8rmMpP0V6pjpU/BxUdLvl/FZNY/2nAD8NdfUxcsg8ilE6IFyCV5W4KvfDluVIFwOqZmwcyuSYmA4LKI9uEP76hWtLLb/AlBi+Ym/NICnQB8FvRKMf+5nFv3h9UD+DnxJSnp+EwWb7NYM9PEpftqhBBC6AB3twMbdTPgqhWAMB5QUgOEg3eXh6TffQ0Qo2F6FlsZzMcrLdrybsOVQB+gLIK+CXAuOt2BA4X6Ffj9nkV9rsgp4ObkS8r1kIPRtqtcb9fzIAPA8ynm28vJinaJNhEAwnCAGQwwrLkuVVzM/AXFgqtIxtyLML3RuaBjCYwl1IepciCttEX89+Wt6z/kdyELo+2UT59b9UnSBTnWoTq/ZiBe8DEK5CB9L9i4BWNxgJX7uxctHwH/JR/FyYhJbOiX+ZyQa5dQB1qbQhsNBSeFPliQIlFVgT8HjdlG0s8yOCMZEWWR/1TpWn5rJc08fyf0fLGHFsC/gmOftJw8mn6f2G+RbBH2pHcxRVel7Fz/xfX4PQTkFfxPkFO6RJ9DHEPy8gHAqMA8vx9lX1sRr0LicTuZ9ZW1yoKaJM8WDqsmM7C+4qei8Srs0/LClEIfDIGVGynsIp+HmFe5eOJVpvkugJAbGRXDsU/ZglaL0wZ8U+frrVwQVH0uRiiLUSVCSxAmm4cff1K937sGH/9f2JBaTz834eZ58lgNHqipOO9RLVUnNbGU5AtOzeOfdJXhS3PHVPwxDCF4TRLbLQGLi5a4VCrumoOEfIethkDH2bFhUbdOFX+aMdgC/QdmF8AJWfkFOPcLCT8FLb3yVts9bYre5EpLkfjwFLZ9DgG74G7913p7HA/hpRT7r8PIwPrLx8qg8IDbRWmG7ajggFkVRHA4rUbRjbmvmZixma7diPE95UId+ESyb1xVCr8Gx38PCiRC8CU6M4OXf+DjmVzKjY8B7NpK6JbHzOVh7FK/Cz4QanvwUrVjqTngKrXE9osq9t5DPQIQVifI0+4wALCLoRj4R8jkaMEzsDaPsAD1JyYRdxYm9/qKeGMHLggzddjzlgRCPx94lFnr8jyAvQb/vYeEEcE7Ce2w7YAE+OjdgBrpQ2iEU1icmrllZe+UxOrMScoUsfElRSz6ieHkT7L4KP9Rg++cA3yRi/5tEBHiTskkra58K5FCRVJFVp+3px0U+EZQRsQGxQ9Z/UnCa3RErGFSE7Fg6ZZlBUtJcXLJtCAK0ykq3zcZYAI5dAgvvwBF7lbuOPQblM6TyTty78ZTFgHeAMfALthYsS6ojXlYB1wMz8KGChBQFL2vw0ZX8JP+Ml09QzsHfdMiPc4D7azFNFDgQiODjbnuAb0bwxNGKcritqMzBzyybCFbHesZSnfMrPLYhwrgEWpmZzB+0mq7rc3FJ5eVrd9qNzwWdb9/K1cMGk7F9O7ABfz02dsznLWA7wiZ8jVsT30dE8CPQCS9DUd4ARuoOvfH292/X+96574JEZpFVfHKUbYI3eXSz7IadrrQR3BqlE0IaVkxeCJ+dj5/PowijgFyUE4AhrlmuAZGzI+fesXkkgrI6awcHl+XwwAFvcvyMXmwpLOZ3ZwyC9Na4gsXc88xbRA+68TPOes4gs+hKrMIQB9jf9yjCw/iS4vy8ZAPHAq/gox2/ZogrdF6+xcdhtnjItJXHTsBIfM2X0+DcjRw7ogbNcztwpR2eHEM5AR834KUz8APCBZEhkb84J7pY/4dtFLp2MiDSn+ScTDNeNNL2GEZvimA8mPeymVW0EFiDErMVIAOftRN3Jflp+c4v+NUjP1lX8HEYXhaggM8eLC/rsfYoajYCkEZSbW+U9ggG8B5KCTADP5fhZYkUSh5l5LXrlMXBgVx+Ez0JgqXMT/+G0vcCDO53OKkeD2ZaNs+lvc62B0rR0bHbtJ1+AzjxMy1pZjyFtd9uJjAK+BTffpPoUZNIU1tHUGAw/hr9A/vYD1DZVhW8HIdyDfkoyunaVt+lLRRHykihE0TDoCZhiWCq0io7g03fLufLo8ro9+khvNd9GeHW0ZsQXsbHX2wl9HK7ysZMhEvw8R/2d7C8gr9JKIp7xQvd9J24C2UGWLlrKeoiKjFu2zycmGny3oIVnH1aX/xZr3PnllGoKve2mUrqI6ndAuMCG7Ayf0pQyvGTQQs0KzRHUOgw/CyPk9ag8p5cuv0UAhKh+KfvibYx+XDV19y5ZRTRcIiH8mbieMZJcHRwNMpbKCUoHVqQ/2slAB+D8CKe+z0XuF9wU2IGOCCYzbK0DSw8ooRdrYJsWlWEAu+3W4G37CLMo00Q0hA+x4/gb+aKWi3QrBwAfKiIFOKEHms74ED4MHsF3QMHkvdjNtt3lmkwFObbnVujTy59d6drvnOjpmm0Vp9EC/zKCMAGx2ZHzAyHYmXbC2JXLTgilrOmNHZc58xYaSDMP16cPsN4zXHk+sHbMsO7wl1wM67Jc+pboJmsgPrBAlXNKy8uIJN0XA7LMxiOmfGNnQpLS8tIeO/2cb28FmiBFmiBFmiBFmiBFmiBFmiBFmiB/wH4f+jryq6sRdUDAAAAAElFTkSuQmCC" alt="DREME Logo"/>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5955 <h1>DREME</h1>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5956 <h2>Discriminative Regular Expression Motif Elicitation</h2>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5957 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5958 <p class="spaced">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5959 For further information on how to interpret these results or to get a
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5960 copy of the MEME software please access
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5961 <a href="http://meme.nbcr.net/">http://meme.nbcr.net</a>.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5962 </p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5963 <p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5964 If you use DREME in your research please cite the following paper:<br />
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5965 <span class="citation">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5966 Timothy L. Bailey, "DREME: Motif discovery in transcription factor ChIP-seq data", <i>Bioinformatics</i>, <b>27</b>(12):1653-1659, 2011.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5967 <a href="http://bioinformatics.oxfordjournals.org/content/27/12/1653">[full text]</a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5968 </span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5969 </p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5970 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5971 <!-- navigation -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5972 <div class="pad2">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5973 <a class="jump" href="#motifs_sec">Discovered Motifs</a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5974 &nbsp;&nbsp;|&nbsp;&nbsp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5975 <a class="jump" href="#inputs_sec">Inputs &amp; Settings</a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5976 &nbsp;&nbsp;|&nbsp;&nbsp;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5977 <a class="jump" href="#info_sec">Program information</a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5978 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5979 <!-- alert the user when their browser is not up to the task -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5980 <noscript><h1 style="color:red">Javascript is required to view these results!</h1></noscript>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5981 <h1 id="html5_warning" style="color:red; display:none;">Your browser does not support canvas!</h1>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5982 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5983 if (!window.HTMLCanvasElement) $("html5_warning").style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5984 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5985 <!-- description -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5986 <div id="description_section" style="display:none">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5987 <div id="description" class="header">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5988 <h2>Description</h2>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5989 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5990 <div id="description_text" class="box">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5991 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5992 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5993 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5994 if (data.description) {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5995 $("description_text").innerHTML = "";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5996 $("description_text").appendChild(make_description(data.description));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5997 $("description_section").style.display = "block";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5998 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5999 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6000 <!-- motifs -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6001 <div id="motifs_sec" class="header">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6002 <h2>Discovered Motifs</h2>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6003 <span><a href="#inputs_sec">Next</a>&nbsp;<a href="#">Top</a></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6004 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6005 <div id="motifs" class="box">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6006 <p>No motifs were discovered!</p>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6007 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6008 <script>make_motifs();</script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6009 <!-- inputs and settings -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6010 <div id="inputs_sec" class="header">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6011 <h2>Inputs &amp; Settings</h2>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6012 <span><a href="#motifs_sec">Previous</a>&nbsp;<a href="#info_sec">Next</a>&nbsp;<a href="#">Top</a></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6013 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6014 <div class="box">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6015 <h4>Sequences</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6016 <table id="seq_info" class="inputs">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6017 <tr><th>Source <div class="help" data-topic="pop_seq_source"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6018 <th>Alphabet <div class="help" data-topic="pop_seq_alph"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6019 <th>Sequence Count <div class="help" data-topic="pop_seq_count"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6020 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6021 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6022 <td id="ins_seq_source"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6023 <td id="ins_seq_alphabet"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6024 <td id="ins_seq_count"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6025 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6026 </table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6027 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6028 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6029 var db = data.sequence_db;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6030 $("ins_seq_source").innerHTML = db.file;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6031 $("ins_seq_alphabet").innerHTML = dreme_alphabet.get_alphabet_name();
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6032 $("ins_seq_count").innerHTML = db.count;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6033 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6034 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6035 <h4>Control Sequences</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6036 <table id="seq_info" class="inputs">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6037 <tr><th>Source <div class="help" data-topic="pop_seq_source"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6038 <th>Sequence Count <div class="help" data-topic="pop_seq_count"></div></th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6039 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6040 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6041 <td id="ins_cseq_source"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6042 <td id="ins_cseq_count"></td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6043 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6044 </table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6045 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6046 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6047 var db = data.control_db;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6048 if (db.from == "shuffled") {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6049 $("ins_cseq_source").innerHTML = "Shuffled Sequences";
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6050 } else {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6051 $("ins_cseq_source").innerHTML = db.file;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6052 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6053 $("ins_cseq_count").innerHTML = db.count;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6054 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6055 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6056 <h4>Background</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6057 <span id="alpha_bg"></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6058 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6059 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6060 $("alpha_bg").appendChild(make_alpha_bg(dreme_alphabet, data.control_db.freqs));
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6061 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6062 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6063 <h4>Other Settings</h4>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6064 <table id="tbl_settings" class="inputs hide_advanced">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6065 <tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6066 <th>Strand Handling</th>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6067 <td id="opt_strand">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6068 <span class="strand_none">This alphabet only has one strand</span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6069 <span class="strand_given">Only the given strand is processed</span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6070 <span class="strand_both">Both the given and reverse complement strands are processed</span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6071 </td>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6072 </tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6073 <tr><th># REs to Generalize</th><td id="opt_ngen"></td></tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6074 <tr><th>Shuffle Seed</th><td id="opt_seed"></td></tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6075 <tr><th>E-value Threshold</th><td id="opt_stop_evalue"></td></tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6076 <tr><th>Max Motif Count</th><td id="opt_stop_count"></td></tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6077 <tr><th>Max Run Time</th><td id="opt_stop_time"></td></tr>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6078 </table>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6079 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6080 {
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6081 $("opt_strand").className = (dreme_alphabet.has_complement() ? (data.options.revcomp ? "both" : "given") : "none");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6082 $("opt_ngen").innerHTML = data.options.ngen;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6083 $("opt_seed").innerHTML = data.options.seed;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6084 $("opt_stop_evalue").innerHTML = data.options.stop.evalue;
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6085 $("opt_stop_count").innerHTML = (typeof data.options.stop.count == "number" ? data.options.stop.count : "No maximum motif count.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6086 $("opt_stop_time").innerHTML = (typeof data.options.stop.time == "number" ? data.options.stop.time + " seconds." : "No maximum running time.");
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6087 }
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6088 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6089 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6090 <!-- list information on this program -->
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6091 <div id="info_sec" class="bar" style="position:relative">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6092 <div style="position: absolute; right: 0;"><a href="#inputs_sec">Previous</a> <a href="#">Top</a></div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6093 <div class="subsection">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6094 <h5 id="version">DREME version</h5>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6095 <span id="ins_version"></span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6096 (Release date: <span id="ins_release"></span>)<br>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6097 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6098 <script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6099 $("ins_version").innerHTML = data["version"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6100 $("ins_release").innerHTML = data["release"];
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6101 </script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6102 <div class="subsection">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6103 <h5 id="reference">Reference</h5>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6104 <span class="citation">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6105 Timothy L. Bailey, "DREME: Motif discovery in transcription factor ChIP-seq data", <i>Bioinformatics</i>, <b>27</b>(12):1653-1659, 2011.
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6106 <a href="http://bioinformatics.oxfordjournals.org/content/27/12/1653">[full text]</a>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6107 </span>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6108 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6109 <div class="subsection">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6110 <h5 id="command">Command line</h5>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6111 <textarea id="cmd" rows="3" style="width:100%;" readonly="readonly">
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6112 </textarea>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6113 <script>$("cmd").value = data["cmd"].join(" ");</script>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6114 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6115 </div>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6116
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6117 </body>
793225b11202 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6118 </html>