annotate test-data/dreme1.html @ 0:b386032d758d 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:22 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1 <!DOCTYPE HTML>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2 <html>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3 <head>
b386032d758d 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">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5 <title>DREME</title>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
7 // @JSON_VAR data
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
8 var data = {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
9 "program": "dreme",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
10 "version": "4.11.2",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
11 "release": "Thu May 05 14:58:55 2016 -0700",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
12 "cmd": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
13 "dreme", "-o", "./output", "-p",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
14 "/tmp/tmpijN1y0/files/000/dataset_1.dat", "-norc", "-rna", "-s",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
15 "1"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
16 ],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
17 "options": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
18 "revcomp": false,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
19 "ngen": 100,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
20 "add_pv_thresh": 0.01,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
21 "seed": 1,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
22 "stop": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
23 "evalue": "0.05"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
24 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
25 },
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
26 "alphabet": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
27 "name": "RNA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
28 "like": "rna",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
29 "ncore": 4,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
30 "symbols": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
31 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
32 "symbol": "A",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
33 "name": "Adenine",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
34 "colour": "CC0000"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
35 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
36 "symbol": "C",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
37 "name": "Cytosine",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
38 "colour": "0000CC"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
39 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
40 "symbol": "G",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
41 "name": "Guanine",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
42 "colour": "FFB300"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
43 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
44 "symbol": "U",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
45 "aliases": "T",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
46 "name": "Uracil",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
47 "colour": "008000"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
48 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
49 "symbol": "N",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
50 "aliases": "X.",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
51 "name": "Any base",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
52 "equals": "ACGU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
53 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
54 "symbol": "V",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
55 "name": "Not U",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
56 "equals": "ACG"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
57 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
58 "symbol": "H",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
59 "name": "Not G",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
60 "equals": "ACU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
61 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
62 "symbol": "D",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
63 "name": "Not C",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
64 "equals": "AGU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
65 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
66 "symbol": "B",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
67 "name": "Not A",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
68 "equals": "CGU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
69 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
70 "symbol": "M",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
71 "name": "Amino",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
72 "equals": "AC"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
73 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
74 "symbol": "R",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
75 "name": "Purine",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
76 "equals": "AG"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
77 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
78 "symbol": "W",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
79 "name": "Weak",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
80 "equals": "AU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
81 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
82 "symbol": "S",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
83 "name": "Strong",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
84 "equals": "CG"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
85 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
86 "symbol": "Y",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
87 "name": "Pyrimidine",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
88 "equals": "CU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
89 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
90 "symbol": "K",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
91 "name": "Keto",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
92 "equals": "GU"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
93 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
94 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
95 },
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
96 "background": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
97 "freqs": [0.221, 0.245, 0.221, 0.312]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
98 },
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
99 "sequence_db": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
100 "name": "dataset 1",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
101 "file": "/tmp/tmpijN1y0/files/000/dataset_1.dat",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
102 "lmod": "Tue Apr 24 13:55:48 CEST 2018",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
103 "count": 1000
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
104 },
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
105 "control_db": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
106 "name": "shuffled positive sequences",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
107 "from": "shuffled",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
108 "count": 1000,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
109 "freqs": [0.221, 0.245, 0.221, 0.312]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
110 },
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
111 "motifs": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
112 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
113 "db": 0,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
114 "id": "UUYUCY",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
115 "alt": "MEME",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
116 "len": 6,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
117 "nsites": 459,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
118 "evalue": "1.2e-013",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
119 "p": 387,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
120 "n": 210,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
121 "pvalue": "2.6e-018",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
122 "unerased_evalue": "1.2e-013",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
123 "pwm": [
b386032d758d 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],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
125 [0.000000, 0.000000, 0.000000, 1.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
126 [0.000000, 0.294118, 0.000000, 0.705882],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
127 [0.000000, 0.000000, 0.000000, 1.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
128 [0.000000, 1.000000, 0.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
129 [0.000000, 0.474946, 0.000000, 0.525054]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
130 ],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
131 "matches": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
132 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
133 "seq": "UUUUCC",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
134 "p": 147,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
135 "n": 75,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
136 "pvalue": "1.8e-007",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
137 "evalue": "8.1e-003"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
138 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
139 "seq": "UUUUCU",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
140 "p": 155,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
141 "n": 94,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
142 "pvalue": "2.2e-005",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
143 "evalue": "1.0e+000"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
144 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
145 "seq": "UUCUCU",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
146 "p": 94,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
147 "n": 51,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
148 "pvalue": "1.3e-004",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
149 "evalue": "6.1e+000"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
150 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
151 "seq": "UUCUCC",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
152 "p": 75,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
153 "n": 42,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
154 "pvalue": "1.1e-003",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
155 "evalue": "5.0e+001"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
156 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
157 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
158 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
159 "db": 0,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
160 "id": "YAGG",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
161 "alt": "MEME",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
162 "len": 4,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
163 "nsites": 793,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
164 "evalue": "5.1e-012",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
165 "p": 600,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
166 "n": 416,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
167 "pvalue": "1.1e-016",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
168 "unerased_evalue": "2.4e-012",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
169 "pwm": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
170 [0.000000, 0.692308, 0.000000, 0.307692],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
171 [1.000000, 0.000000, 0.000000, 0.000000],
b386032d758d 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],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
173 [0.000000, 0.000000, 1.000000, 0.000000]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
174 ],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
175 "matches": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
176 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
177 "seq": "CAGG",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
178 "p": 441,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
179 "n": 304,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
180 "pvalue": "1.5e-010",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
181 "evalue": "6.6e-006"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
182 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
183 "seq": "UAGG",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
184 "p": 232,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
185 "n": 165,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
186 "pvalue": "1.1e-004",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
187 "evalue": "4.7e+000"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
188 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
189 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
190 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
191 "db": 0,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
192 "id": "GAAGAW",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
193 "alt": "MEME",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
194 "len": 6,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
195 "nsites": 89,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
196 "evalue": "3.4e-005",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
197 "p": 81,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
198 "n": 22,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
199 "pvalue": "8.2e-010",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
200 "unerased_evalue": "3.5e-004",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
201 "pwm": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
202 [0.000000, 0.000000, 1.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
203 [1.000000, 0.000000, 0.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
204 [1.000000, 0.000000, 0.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
205 [0.000000, 0.000000, 1.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
206 [1.000000, 0.000000, 0.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
207 [0.494382, 0.000000, 0.000000, 0.505618]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
208 ],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
209 "matches": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
210 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
211 "seq": "GAAGAU",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
212 "p": 45,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
213 "n": 7,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
214 "pvalue": "2.4e-008",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
215 "evalue": "9.9e-004"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
216 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
217 "seq": "GAAGAA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
218 "p": 40,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
219 "n": 16,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
220 "pvalue": "7.9e-004",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
221 "evalue": "3.3e+001"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
222 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
223 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
224 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
225 "db": 0,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
226 "id": "SMUGGA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
227 "alt": "MEME",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
228 "len": 6,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
229 "nsites": 119,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
230 "evalue": "3.7e-003",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
231 "p": 110,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
232 "n": 47,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
233 "pvalue": "9.1e-008",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
234 "unerased_evalue": "2.6e-005",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
235 "pwm": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
236 [0.000000, 0.529412, 0.470588, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
237 [0.428571, 0.571429, 0.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
238 [0.000000, 0.000000, 0.000000, 1.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
239 [0.000000, 0.000000, 1.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
240 [0.000000, 0.000000, 1.000000, 0.000000],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
241 [1.000000, 0.000000, 0.000000, 0.000000]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
242 ],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
243 "matches": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
244 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
245 "seq": "GAUGGA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
246 "p": 22,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
247 "n": 6,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
248 "pvalue": "1.7e-003",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
249 "evalue": "7.1e+001"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
250 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
251 "seq": "GCUGGA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
252 "p": 33,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
253 "n": 14,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
254 "pvalue": "3.6e-003",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
255 "evalue": "1.5e+002"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
256 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
257 "seq": "CCUGGA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
258 "p": 32,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
259 "n": 15,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
260 "pvalue": "8.6e-003",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
261 "evalue": "3.5e+002"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
262 }, {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
263 "seq": "CAUGGA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
264 "p": 29,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
265 "n": 13,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
266 "pvalue": "9.1e-003",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
267 "evalue": "3.7e+002"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
268 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
269 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
270 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
271 ],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
272 "runtime": {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
273 "host": "ThinkPad-T450s",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
274 "when": "Tue Apr 24 13:55:53 CEST 2018",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
275 "cpu": 16.65,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
276 "real": 16.65,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
277 "stop": "evalue"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
278 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
279 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
280 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
281 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
282 var site_url = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
283 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
284 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
285
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
286 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
287 * $
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
288 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
289 * Shorthand function for getElementById
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
290 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
291 function $(el) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
292 return document.getElementById(el);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
293 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
294
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
295
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
296 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
297 * See http://stackoverflow.com/a/5450113/66387
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
298 * Does string multiplication like the perl x operator.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
299 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
300 function string_mult(pattern, count) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
301 if (count < 1) return '';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
302 var result = '';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
303 while (count > 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
304 if (count & 1) result += pattern;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
305 count >>= 1, pattern += pattern;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
306 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
307 return result + pattern;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
308 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
309
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
310 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
311 * See http://stackoverflow.com/questions/814613/how-to-read-get-data-from-a-url-using-javascript
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
312 * Slightly modified with information from
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
313 * https://developer.mozilla.org/en/DOM/window.location
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
314 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
315 function parse_params() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
316 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
317 var search, queryStart, queryEnd, query, params, nvPairs, i, nv, n, v;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
318 search = window.location.search;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
319 queryStart = search.indexOf("?") + 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
320 queryEnd = search.indexOf("#") + 1 || search.length + 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
321 query = search.slice(queryStart, queryEnd - 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
322
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
323 if (query === search || query === "") return {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
324
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
325 params = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
326 nvPairs = query.replace(/\+/g, " ").split("&");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
327
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
328 for (i = 0; i < nvPairs.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
329 nv = nvPairs[i].split("=");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
330 n = decodeURIComponent(nv[0]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
331 v = decodeURIComponent(nv[1]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
332 // allow a name to be used multiple times
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
333 // storing each value in the array
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
334 if (!(n in params)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
335 params[n] = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
336 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
337 params[n].push(nv.length === 2 ? v : null);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
338 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
339 return params;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
340 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
341
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
342 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
343 * coords
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
344 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
345 * Calculates the x and y offset of an element.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
346 * From http://www.quirksmode.org/js/findpos.html
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
347 * with alterations to take into account scrolling regions
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
348 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
349 function coords(elem) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
350 var myX = myY = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
351 if (elem.getBoundingClientRect) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
352 var rect;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
353 rect = elem.getBoundingClientRect();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
354 myX = rect.left + ((typeof window.pageXOffset !== "undefined") ?
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
355 window.pageXOffset : document.body.scrollLeft);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
356 myY = rect.top + ((typeof window.pageYOffset !== "undefined") ?
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
357 window.pageYOffset : document.body.scrollTop);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
358 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
359 // this fall back doesn't properly handle absolutely positioned elements
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
360 // inside a scrollable box
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
361 var node;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
362 if (elem.offsetParent) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
363 // subtract all scrolling
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
364 node = elem;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
365 do {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
366 myX -= node.scrollLeft ? node.scrollLeft : 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
367 myY -= node.scrollTop ? node.scrollTop : 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
368 } while (node = node.parentNode);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
369 // this will include the page scrolling (which is unwanted) so add it back on
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
370 myX += (typeof window.pageXOffset !== "undefined") ? window.pageXOffset : document.body.scrollLeft;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
371 myY += (typeof window.pageYOffset !== "undefined") ? window.pageYOffset : document.body.scrollTop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
372 // sum up offsets
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
373 node = elem;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
374 do {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
375 myX += node.offsetLeft;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
376 myY += node.offsetTop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
377 } while (node = node.offsetParent);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
378 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
379 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
380 return [myX, myY];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
381 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
382
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
383 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
384 * position_popup
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
385 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
386 * Positions a popup relative to an anchor element.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
387 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
388 * The avaliable positions are:
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
389 * 0 - Centered below the anchor.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
390 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
391 function position_popup(anchor, popup, position) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
392 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
393 var a_x, a_y, a_w, a_h, p_x, p_y, p_w, p_h;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
394 var a_xy, spacer, margin, scrollbar, page_w;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
395 // define constants
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
396 spacer = 5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
397 margin = 15;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
398 scrollbar = 15;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
399 // define the positions and widths
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
400 a_xy = coords(anchor);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
401 a_x = a_xy[0];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
402 a_y = a_xy[1];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
403 a_w = anchor.offsetWidth;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
404 a_h = anchor.offsetHeight;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
405 p_w = popup.offsetWidth;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
406 p_h = popup.offsetHeight;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
407 page_w = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
408 if (window.innerWidth) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
409 page_w = window.innerWidth;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
410 } else if (document.body) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
411 page_w = document.body.clientWidth;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
412 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
413 // check the position type is defined
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
414 if (typeof position !== "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
415 position = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
416 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
417 // calculate the popup position
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
418 switch (position) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
419 case 1:
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
420 p_x = a_x + a_w + spacer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
421 p_y = a_y + (a_h / 2) - (p_h / 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
422 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
423 case 0:
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
424 default:
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
425 p_x = a_x + (a_w / 2) - (p_w / 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
426 p_y = a_y + a_h + spacer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
427 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
428 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
429 // constrain the popup position
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
430 if (p_x < margin) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
431 p_x = margin;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
432 } else if (page_w != null && (p_x + p_w) > (page_w - margin - scrollbar)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
433 p_x = page_w - margin - scrollbar - p_w;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
434 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
435 if (p_y < margin) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
436 p_y = margin;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
437 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
438 // position the popup
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
439 popup.style.left = p_x + "px";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
440 popup.style.top = p_y + "px";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
441 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
442
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
443 function lookup_help_popup(popup_id) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
444 var _body, pop, info;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
445 pop = document.getElementById(popup_id);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
446 if (pop == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
447 _body = document.getElementsByTagName("body")[0];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
448 pop = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
449 pop.className = "pop_content";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
450 pop.id = popup_id;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
451 pop.style.backgroundColor = "#FFC";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
452 pop.style.borderColor = "black";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
453 info = document.createElement("p");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
454 info.style.fontWeight = "bold";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
455 info.appendChild(document.createTextNode("Error: No popup for topic \"" + popup_id + "\"."));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
456 pop.appendChild(info);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
457 // this might cause problems with the menu, but as this only happens
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
458 // when something is already wrong I don't think that's too much of a problem
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
459 _body.insertBefore(pop, _body.firstChild);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
460 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
461 if (document.getElementsByTagName('body')[0].hasAttribute("data-autobtns")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
462 if (!/\bauto_buttons\b/.test(pop.className)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
463 pop.className += " auto_buttons";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
464 var back_btn_sec = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
465 back_btn_sec.className = "nested_only pop_back_sec";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
466 var back_btn = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
467 back_btn.className = "pop_back";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
468 back_btn.appendChild(document.createTextNode("<< back"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
469 back_btn.addEventListener("click", function(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
470 help_return();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
471 }, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
472 back_btn_sec.appendChild(back_btn);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
473 pop.insertBefore(back_btn_sec, pop.firstChild);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
474 var close_btn_sec = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
475 close_btn_sec.className = "pop_close_sec";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
476 var close_btn = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
477 close_btn.className = "pop_close";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
478 close_btn.appendChild(document.createTextNode("close"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
479 close_btn.addEventListener("click", function(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
480 help_popup();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
481 }, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
482 close_btn_sec.appendChild(close_btn);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
483 pop.appendChild(close_btn_sec);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
484 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
485 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
486 return pop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
487 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
488
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
489 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
490 * help_popup
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
491 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
492 * Moves around help pop-ups so they appear
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
493 * below an activator.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
494 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
495 function help_popup(activator, popup_id) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
496 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
497 var pop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
498 // set default values
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
499 if (typeof help_popup.popup === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
500 help_popup.popup = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
501 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
502 if (typeof help_popup.activator === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
503 help_popup.activator = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
504 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
505 var last_pop = (help_popup.popup.length > 0 ? help_popup.popup[help_popup.popup.length - 1] : null);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
506 if (typeof(activator) == "undefined") { // no activator so hide
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
507 if (last_pop != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
508 last_pop.style.display = 'none';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
509 help_popup.popup = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
510 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
511 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
512 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
513 pop = lookup_help_popup(popup_id);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
514 if (pop == last_pop) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
515 if (activator == help_popup.activator) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
516 //hide popup (as we've already shown it for the current help button)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
517 last_pop.style.display = 'none';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
518 help_popup.popup = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
519 return; // toggling complete!
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
520 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
521 } else if (last_pop != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
522 //activating different popup so hide current one
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
523 last_pop.style.display = 'none';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
524 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
525 help_popup.popup = [pop];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
526 help_popup.activator = activator;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
527 toggle_class(pop, "nested", false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
528 //must make the popup visible to measure it or it has zero width
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
529 pop.style.display = 'block';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
530 position_popup(activator, pop);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
531 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
532
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
533 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
534 * help_refine
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
535 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
536 * Intended for links within a help popup. Stores a stack of state so
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
537 * you can go back.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
538 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
539 function help_refine(popup_id) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
540 if (help_popup.popup == null || help_popup.popup.length == 0 || help_popup.activator == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
541 throw new Error("Can not refine a help popup when one is not shown!");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
542 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
543 var pop = lookup_help_popup(popup_id);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
544 var last_pop = help_popup.popup[help_popup.popup.length - 1];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
545 if (pop == last_pop) return; // slightly odd, but no real cause for alarm
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
546 help_popup.popup.push(pop);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
547 toggle_class(pop, "nested", true);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
548 last_pop.style.display = "none";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
549 //must make the popup visible to measure it or it has zero width
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
550 pop.style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
551 position_popup(help_popup.activator, pop);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
552 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
553
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
554 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
555 * help_return
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
556 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
557 * Intended for links within a help popup. Stores a stack of state so
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
558 * you can go back.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
559 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
560 function help_return() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
561 if (help_popup.popup == null || help_popup.popup.length == 0 || help_popup.activator == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
562 throw new Error("Can not return to a earlier help popup when one is not shown!");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
563 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
564 var last_pop = help_popup.popup.pop();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
565 last_pop.style.display = "none";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
566 var pop = (help_popup.popup.length > 0 ? help_popup.popup[help_popup.popup.length - 1] : null);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
567 if (pop != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
568 toggle_class(pop, "nested", help_popup.popup.length > 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
569 pop.style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
570 position_popup(help_popup.activator, pop);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
571 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
572 help_popup.activator = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
573 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
574 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
575
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
576 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
577 * update_scroll_pad
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
578 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
579 * Creates padding at the bottom of the page to allow
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
580 * scrolling of anything into view.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
581 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
582 function update_scroll_pad() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
583 var page, pad;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
584 page = (document.compatMode === "CSS1Compat") ? document.documentElement : document.body;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
585 pad = $("scrollpad");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
586 if (pad === null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
587 pad = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
588 pad.id = 'scrollpad';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
589 document.getElementsByTagName('body')[0].appendChild(pad);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
590 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
591 pad.style.height = Math.abs(page.clientHeight - 100) + "px";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
592 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
593
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
594 function substitute_classes(node, remove, add) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
595 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
596 var list, all, i, cls, classes;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
597 list = node.className.split(/\s+/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
598 all = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
599 for (i = 0; i < list.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
600 if (list[i].length > 0) all[list[i]] = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
601 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
602 for (i = 0; i < remove.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
603 if (all.hasOwnProperty(remove[i])) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
604 delete all[remove[i]];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
605 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
606 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
607 for (i = 0; i < add.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
608 all[add[i]] = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
609 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
610 classes = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
611 for (cls in all) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
612 classes += cls + " ";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
613 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
614 node.className = classes;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
615 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
616
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
617 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
618 * toggle_class
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
619 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
620 * Adds or removes a class from the node. If the parameter 'enabled' is not
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
621 * passed then the existence of the class will be toggled, otherwise it will be
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
622 * included if enabled is true.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
623 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
624 function toggle_class(node, cls, enabled) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
625 var classes = node.className;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
626 var list = classes.replace(/^\s+/, '').replace(/\s+$/, '').split(/\s+/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
627 var found = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
628 for (var i = 0; i < list.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
629 if (list[i] == cls) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
630 list.splice(i, 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
631 i--;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
632 found = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
633 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
634 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
635 if (typeof enabled == "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
636 if (!found) list.push(cls);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
637 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
638 if (enabled) list.push(cls);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
639 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
640 node.className = list.join(" ");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
641 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
642
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
643 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
644 * find_child
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
645 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
646 * Searches child nodes in depth first order and returns the first it finds
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
647 * with the className specified.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
648 * TODO replace with querySelector
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
649 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
650 function find_child(node, className) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
651 var pattern;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
652 if (node == null || typeof node !== "object") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
653 return null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
654 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
655 if (typeof className === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
656 pattern = new RegExp("\\b" + className + "\\b");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
657 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
658 pattern = className;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
659 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
660 if (node.nodeType == Node.ELEMENT_NODE &&
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
661 pattern.test(node.className)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
662 return node;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
663 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
664 var result = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
665 for (var i = 0; i < node.childNodes.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
666 result = find_child(node.childNodes[i], pattern);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
667 if (result != null) break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
668 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
669 return result;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
670 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
671 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
672
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
673 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
674 * find_parent
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
675 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
676 * Searches parent nodes outwards from the node and returns the first it finds
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
677 * with the className specified.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
678 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
679 function find_parent(node, className) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
680 var pattern;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
681 pattern = new RegExp("\\b" + className + "\\b");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
682 do {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
683 if (node.nodeType == Node.ELEMENT_NODE &&
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
684 pattern.test(node.className)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
685 return node;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
686 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
687 } while (node = node.parentNode);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
688 return null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
689 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
690
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
691 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
692 * find_parent_tag
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
693 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
694 * Searches parent nodes outwards from the node and returns the first it finds
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
695 * with the tag name specified. HTML tags should be specified in upper case.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
696 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
697 function find_parent_tag(node, tag_name) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
698 do {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
699 if (node.nodeType == Node.ELEMENT_NODE && node.tagName == tag_name) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
700 return node;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
701 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
702 } while (node = node.parentNode);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
703 return null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
704 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
705
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
706 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
707 * __toggle_help
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
708 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
709 * Uses the 'topic' property of the this object to
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
710 * toggle display of a help topic.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
711 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
712 * This function is not intended to be called directly.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
713 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
714 function __toggle_help(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
715 if (!e) e = window.event;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
716 if (e.type === "keydown") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
717 if (e.keyCode !== 13 && e.keyCode !== 32) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
718 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
719 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
720 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
721 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
722 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
723
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
724 help_popup(this, this.getAttribute("data-topic"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
725 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
726
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
727 function setup_help_button(button) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
728 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
729 var topic;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
730 if (button.hasAttribute("data-topic")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
731 topic = button.getAttribute("data-topic");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
732 if (document.getElementById(topic) != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
733 button.tabIndex = "0"; // make keyboard selectable
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
734 button.addEventListener("click", function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
735 help_popup(button, topic);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
736 }, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
737 button.addEventListener("keydown", function(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
738 // toggle only on Enter or Spacebar, let other keys do their thing
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
739 if (e.keyCode !== 13 && e.keyCode !== 32) return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
740 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
741 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
742 help_popup(button, topic);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
743 }, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
744 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
745 button.style.visibility = "hidden";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
746 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
747 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
748 button.className += " active";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
749 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
750
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
751 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
752 * help_button
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
753 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
754 * Makes a help button for the passed topic.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
755 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
756 function help_button(topic) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
757 var btn = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
758 btn.className = "help";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
759 btn.setAttribute("data-topic", topic);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
760 setup_help_button(btn);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
761 return btn;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
762 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
763
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
764 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
765 * prepare_download
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
766 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
767 * Sets the attributes of a link to setup a file download using the given content.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
768 * If no link is provided then create one and click it.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
769 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
770 function prepare_download(content, mimetype, filename, link) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
771 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
772 // if no link is provided then create one and click it
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
773 var click_link = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
774 if (!link) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
775 link = document.createElement("a");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
776 click_link = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
777 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
778 try {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
779 // Use a BLOB to convert the text into a data URL.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
780 // We could do this manually with a base 64 conversion.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
781 // This will only be supported on modern browsers,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
782 // hence the try block.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
783 var blob = new Blob([content], {type: mimetype});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
784 var reader = new FileReader();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
785 reader.onloadend = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
786 // If we're lucky the browser will also support the download
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
787 // attribute which will let us suggest a file name to save the link.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
788 // Otherwise it is likely that the filename will be unintelligible.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
789 link.setAttribute("download", filename);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
790 link.href = reader.result;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
791 if (click_link) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
792 // must add the link to click it
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
793 document.body.appendChild(link);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
794 link.click();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
795 document.body.removeChild(link);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
796 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
797 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
798 reader.readAsDataURL(blob);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
799 } catch (error) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
800 if (console && console.log) console.log(error);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
801 // probably an old browser
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
802 link.href = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
803 link.visible = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
804 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
805 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
806
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
807 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
808 * add_cell
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
809 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
810 * Add a cell to the table row.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
811 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
812 function add_cell(row, node, cls, click_action) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
813 var cell = row.insertCell(row.cells.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
814 if (node) cell.appendChild(node);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
815 if (cls && cls !== "") cell.className = cls;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
816 if (click_action) cell.addEventListener("click", click_action, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
817 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
818
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
819 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
820 * add_header_cell
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
821 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
822 * Add a header cell to the table row.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
823 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
824 function add_header_cell(row, node, help_topic, cls, colspan) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
825 var th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
826 if (node) th.appendChild(node);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
827 if (help_topic && help_topic !== "") th.appendChild(help_button(help_topic));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
828 if (cls && cls !== "") th.className = cls;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
829 if (typeof colspan == "number" && colspan > 1) th.colSpan = colspan;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
830 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
831 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
832
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
833 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
834 * add_text_cell
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
835 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
836 * Add a text cell to the table row.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
837 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
838 function add_text_cell(row, text, cls, action) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
839 var node = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
840 if (typeof(text) != 'undefined') node = document.createTextNode(text);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
841 add_cell(row, node, cls, action);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
842 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
843
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
844 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
845 * add_text_header_cell
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
846 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
847 * Add a text header cell to the table row.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
848 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
849 function add_text_header_cell(row, text, help_topic, cls, action, colspan) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
850 var node = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
851 if (typeof(text) != 'undefined') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
852 var nbsp = (help_topic ? "\u00A0" : "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
853 var str = "" + text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
854 var parts = str.split(/\n/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
855 if (parts.length === 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
856 if (action) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
857 node = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
858 node.appendChild(document.createTextNode(str + nbsp));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
859 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
860 node = document.createTextNode(str + nbsp);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
861 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
862 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
863 node = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
864 for (var i = 0; i < parts.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
865 if (i !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
866 node.appendChild(document.createElement("br"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
867 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
868 node.appendChild(document.createTextNode(parts[i]));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
869 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
870 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
871 if (action) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
872 node.addEventListener("click", action, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
873 node.style.cursor = "pointer";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
874 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
875 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
876 add_header_cell(row, node, help_topic, cls, colspan);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
877 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
878
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
879 function setup_help() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
880 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
881 var help_buttons, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
882 help_buttons = document.querySelectorAll(".help:not(.active)");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
883 for (i = 0; i < help_buttons.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
884 setup_help_button(help_buttons[i]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
885 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
886 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
887
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
888 function setup_scrollpad() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
889 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
890 if (document.getElementsByTagName('body')[0].hasAttribute("data-scrollpad") && document.getElementById("scrollpad") == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
891 window.addEventListener("resize", update_scroll_pad, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
892 update_scroll_pad();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
893 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
894 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
895
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
896 // anon function to avoid polluting global scope
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
897 (function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
898 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
899 window.addEventListener("load", function load(evt) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
900 window.removeEventListener("load", load, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
901 setup_help();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
902 setup_scrollpad();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
903 }, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
904 })();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
905
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
906 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
907 * make_link
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
908 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
909 * Creates a text node and if a URL is specified it surrounds it with a link.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
910 * If the URL doesn't begin with "http://" it automatically adds it, as
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
911 * relative links don't make much sense in this context.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
912 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
913 function make_link(text, url) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
914 var textNode = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
915 var link = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
916 if (typeof text !== "undefined" && text !== null) textNode = document.createTextNode(text);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
917 if (typeof url === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
918 if (url.indexOf("//") == -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
919 url = "http://" + url;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
920 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
921 link = document.createElement('a');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
922 link.href = url;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
923 if (textNode) link.appendChild(textNode);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
924 return link;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
925 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
926 return textNode;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
927 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
928 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
929 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
930 function motif_logo_template(inputs) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
931 function _input(name) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
932 if (typeof inputs[name] === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
933 throw new Error("Missing template variable: " + name);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
934 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
935 return inputs[name];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
936 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
937 return (
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
938 "%!PS-Adobe-3.0 EPSF-3.0\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
939 "%%Title: Sequence Logo : " + _input("TITLE") + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
940 "%%Creator: " + _input("CREATOR") + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
941 "%%CreationDate: " + _input("CREATIONDATE") + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
942 "%%BoundingBox: 0 0 " + _input("BOUNDINGWIDTH") + " " + _input("BOUNDINGHEIGHT") + " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
943 "%%Pages: 0\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
944 "%%DocumentFonts: \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
945 "%%EndComments\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
946 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
947 "% ---- CONSTANTS ----\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
948 "\/cmfactor 72 2.54 div def % defines points -> cm conversion\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
949 "\/cm {cmfactor mul} bind def % defines centimeters\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
950 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
951 "% ---- VARIABLES ----\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
952 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
953 "% NA = Nucleic Acid, AA = Amino Acid\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
954 "\/logoType (" + _input("LOGOTYPE") + ") def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
955 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
956 "\/logoTitle (" + _input("TITLE") + ") def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
957 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
958 "% Dimensions in cm\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
959 "\/logoWidth " + _input("LOGOWIDTH") + " cm def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
960 "\/logoHeight " + _input("LOGOLINEHEIGHT") + " cm def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
961 "\/totalHeight " + _input("LOGOHEIGHT") + " cm def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
962 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
963 "\/yaxis " + _input("YAXIS") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
964 "\/yaxisLabel (" + _input("YAXISLABEL") + ") def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
965 "\/yaxisBits " + _input("BARBITS") + " def % bits\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
966 "\/yaxisTicBits " + _input("TICBITS") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
967 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
968 "\/xaxis " + _input("NUMBERING") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
969 "\/xaxisLabel (" + _input("XAXISLABEL") + ") def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
970 "\/showEnds (" + _input("SHOWENDS") + ") def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
971 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
972 "\/showFineprint true def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
973 "\/fineprint (" + _input("FINEPRINT") + ") def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
974 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
975 "\/charsPerLine " + _input("CHARSPERLINE") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
976 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
977 "\/showingBox " + _input("SHOWINGBOX") + " def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
978 "\/shrinking false def % true falses\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
979 "\/shrink 1.0 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
980 "\/outline " + _input("OUTLINE") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
981 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
982 "\/IbeamFraction " + _input("ERRORBARFRACTION") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
983 "\/IbeamGray 0.50 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
984 "\/IbeamLineWidth 0.5 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
985 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
986 "\/fontsize " + _input("FONTSIZE") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
987 "\/titleFontsize " + _input("TITLEFONTSIZE") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
988 "\/smallFontsize " + _input("SMALLFONTSIZE") + " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
989 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
990 "\/topMargin " + _input("TOPMARGIN") + " cm def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
991 "\/bottomMargin " + _input("BOTTOMMARGIN") + " cm def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
992 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
993 "\/defaultColor [0 0 0] def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
994 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
995 _input("COLORDICT") + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
996 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
997 "\/colorDict fullColourDict def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
998 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
999 "% ---- DERIVED PARAMETERS ----\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1000 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1001 "\/leftMargin\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1002 " fontsize 3.5 mul\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1003 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1004 "def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1005 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1006 "\/rightMargin \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1007 " %Add extra room if showing ends\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1008 " showEnds (false) eq { fontsize}{fontsize 1.5 mul} ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1009 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1010 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1011 "\/yaxisHeight \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1012 " logoHeight \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1013 " bottomMargin sub \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1014 " topMargin sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1015 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1016 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1017 "\/ticWidth fontsize 2 div def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1018 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1019 "\/pointsPerBit yaxisHeight yaxisBits div def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1020 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1021 "\/stackMargin 1 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1022 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1023 "% Do not add space aroung characters if characters are boxed\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1024 "\/charRightMargin \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1025 " showingBox { 0.0 } {stackMargin} ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1026 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1027 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1028 "\/charTopMargin \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1029 " showingBox { 0.0 } {stackMargin} ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1030 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1031 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1032 "\/charWidth\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1033 " logoWidth\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1034 " leftMargin sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1035 " rightMargin sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1036 " charsPerLine div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1037 " charRightMargin sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1038 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1039 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1040 "\/charWidth4 charWidth 4 div def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1041 "\/charWidth2 charWidth 2 div def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1042 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1043 "\/stackWidth \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1044 " charWidth charRightMargin add\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1045 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1046 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1047 "\/numberFontsize \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1048 " fontsize charWidth lt {fontsize}{charWidth} ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1049 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1050 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1051 "% movements to place 5'\/N and 3'\/C symbols\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1052 "\/leftEndDeltaX fontsize neg def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1053 "\/leftEndDeltaY fontsize 1.5 mul neg def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1054 "\/rightEndDeltaX fontsize 0.25 mul def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1055 "\/rightEndDeltaY leftEndDeltaY def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1056 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1057 "% Outline width is proporional to charWidth, \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1058 "% but no less that 1 point\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1059 "\/outlinewidth \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1060 " charWidth 32 div dup 1 gt {}{pop 1} ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1061 "def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1062 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1063 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1064 "% ---- PROCEDURES ----\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1065 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1066 "\/StartLogo { \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1067 " % Save state\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1068 " save \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1069 " gsave \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1070 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1071 " % Print Logo Title, top center \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1072 " gsave \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1073 " SetStringFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1074 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1075 " logoWidth 2 div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1076 " logoTitle\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1077 " stringwidth pop 2 div sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1078 " totalHeight\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1079 " titleFontsize sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1080 " moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1081 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1082 " logoTitle\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1083 " show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1084 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1085 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1086 " % Print X-axis label, bottom center\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1087 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1088 " SetStringFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1089 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1090 " logoWidth 2 div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1091 " xaxisLabel\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1092 " stringwidth pop 2 div sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1093 " 0\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1094 " titleFontsize 3 div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1095 " add\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1096 " moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1097 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1098 " xaxisLabel\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1099 " show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1100 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1101 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1102 " % Show Fine Print\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1103 " showFineprint {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1104 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1105 " SetSmallFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1106 " logoWidth\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1107 " fineprint stringwidth pop sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1108 " smallFontsize sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1109 " smallFontsize 3 div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1110 " moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1111 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1112 " fineprint show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1113 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1114 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1115 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1116 " % Move to lower left corner of last line, first stack\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1117 " leftMargin bottomMargin translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1118 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1119 " % Move above first line ready for StartLine \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1120 " 0 totalHeight translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1121 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1122 " SetLogoFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1123 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1124 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1125 "\/EndLogo { \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1126 " grestore \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1127 " showpage \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1128 " restore \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1129 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1130 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1131 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1132 "\/StartLine { \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1133 " % move down to the bottom of the line:\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1134 " 0 logoHeight neg translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1135 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1136 " gsave \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1137 " yaxis { MakeYaxis } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1138 " xaxis { showEnds (true) eq {ShowLeftEnd} if } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1139 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1140 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1141 "\/EndLine{ \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1142 " xaxis { showEnds (true) eq {ShowRightEnd} if } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1143 " grestore \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1144 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1145 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1146 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1147 "\/MakeYaxis {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1148 " gsave \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1149 " stackMargin neg 0 translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1150 " ShowYaxisBar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1151 " ShowYaxisLabel\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1152 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1153 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1154 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1155 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1156 "\/ShowYaxisBar { \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1157 " gsave \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1158 " SetStringFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1159 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1160 " \/str 10 string def % string to hold number \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1161 " \/smallgap stackMargin 2 div def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1162 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1163 " % Draw first tic and bar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1164 " gsave \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1165 " ticWidth neg 0 moveto \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1166 " ticWidth 0 rlineto \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1167 " 0 yaxisHeight rlineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1168 " stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1169 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1170 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1171 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1172 " % Draw the tics\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1173 " % initial increment limit proc for\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1174 " 0 yaxisTicBits yaxisBits abs %cvi\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1175 " {\/loopnumber exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1176 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1177 " % convert the number coming from the loop to a string\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1178 " % and find its width\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1179 " loopnumber 10 str cvrs\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1180 " \/stringnumber exch def % string representing the number\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1181 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1182 " stringnumber stringwidth pop\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1183 " \/numberwidth exch def % width of number to show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1184 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1185 " \/halfnumberheight\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1186 " stringnumber CharBoxHeight 2 div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1187 " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1188 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1189 " numberwidth % move back width of number\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1190 " neg loopnumber pointsPerBit mul % shift on y axis\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1191 " halfnumberheight sub % down half the digit\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1192 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1193 " moveto % move back the width of the string\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1194 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1195 " ticWidth neg smallgap sub % Move back a bit more \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1196 " 0 rmoveto % move back the width of the tic \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1197 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1198 " stringnumber show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1199 " smallgap 0 rmoveto % Make a small gap \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1200 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1201 " % now show the tic mark\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1202 " 0 halfnumberheight rmoveto % shift up again\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1203 " ticWidth 0 rlineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1204 " stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1205 " } for\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1206 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1207 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1208 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1209 "\/ShowYaxisLabel {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1210 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1211 " SetStringFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1212 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1213 " % How far we move left depends on the size of\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1214 " % the tic labels.\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1215 " \/str 10 string def % string to hold number \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1216 " yaxisBits yaxisTicBits div cvi yaxisTicBits mul \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1217 " str cvs stringwidth pop\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1218 " ticWidth 1.5 mul add neg \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1219 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1220 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1221 " yaxisHeight\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1222 " yaxisLabel stringwidth pop\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1223 " sub 2 div\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1224 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1225 " translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1226 " 90 rotate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1227 " 0 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1228 " yaxisLabel show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1229 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1230 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1231 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1232 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1233 "\/StartStack { % <stackNumber> startstack\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1234 " xaxis {MakeNumber}{pop} ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1235 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1236 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1237 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1238 "\/EndStack {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1239 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1240 " stackWidth 0 translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1241 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1242 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1243 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1244 "% Draw a character whose height is proportional to symbol bits\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1245 "\/MakeSymbol{ % charbits character MakeSymbol\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1246 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1247 " \/char exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1248 " \/bits exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1249 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1250 " \/bitsHeight \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1251 " bits pointsPerBit mul \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1252 " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1253 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1254 " \/charHeight \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1255 " bitsHeight charTopMargin sub\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1256 " dup \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1257 " 0.0 gt {}{pop 0.0} ifelse % if neg replace with zero \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1258 " def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1259 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1260 " charHeight 0.0 gt {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1261 " char SetColor\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1262 " charWidth charHeight char ShowChar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1263 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1264 " showingBox { % Unfilled box\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1265 " 0 0 charWidth charHeight false ShowBox\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1266 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1267 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1268 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1269 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1270 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1271 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1272 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1273 " 0 bitsHeight translate \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1274 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1275 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1276 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1277 "\/ShowChar { % <width> <height> <char> ShowChar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1278 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1279 " \/tc exch def % The character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1280 " \/ysize exch def % the y size of the character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1281 " \/xsize exch def % the x size of the character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1282 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1283 " \/xmulfactor 1 def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1284 " \/ymulfactor 1 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1285 " \/limmulfactor 0.01 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1286 " \/drawable true def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1287 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1288 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1289 " % if ysize is negative, make everything upside down!\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1290 " ysize 0 lt {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1291 " % put ysize normal in this orientation\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1292 " \/ysize ysize abs def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1293 " xsize ysize translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1294 " 180 rotate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1295 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1296 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1297 " shrinking {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1298 " xsize 1 shrink sub 2 div mul\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1299 " ysize 1 shrink sub 2 div mul translate \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1300 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1301 " shrink shrink scale\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1302 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1303 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1304 " % Calculate the font scaling factors\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1305 " % Loop twice to catch small correction due to first scaling\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1306 " 2 {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1307 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1308 " xmulfactor ymulfactor scale\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1309 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1310 " ysize % desired size of character in points\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1311 " tc CharBoxHeight \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1312 " dup 0.0 ne {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1313 " div % factor by which to scale up the character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1314 " \/ymulfactor exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1315 " } % end if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1316 " {pop pop}\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1317 " ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1318 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1319 " xsize % desired size of character in points\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1320 " tc CharBoxWidth \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1321 " dup 0.0 ne {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1322 " div % factor by which to scale up the character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1323 " \/xmulfactor exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1324 " } % end if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1325 " {pop pop}\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1326 " ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1327 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1328 " % if the multiplication factors get too small we need to avoid a crash\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1329 " xmulfactor limmulfactor lt {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1330 " \/xmulfactor 1 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1331 " \/drawable false def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1332 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1333 " ymulfactor limmulfactor lt {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1334 " \/ymulfactor 1 def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1335 " \/drawable false def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1336 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1337 " } repeat\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1338 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1339 " % Adjust horizontal position if the symbol is an I\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1340 " tc (I) eq {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1341 " charWidth 2 div % half of requested character width\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1342 " tc CharBoxWidth 2 div % half of the actual character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1343 " sub 0 translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1344 " % Avoid x scaling for I \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1345 " \/xmulfactor 1 def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1346 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1347 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1348 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1349 " % ---- Finally, draw the character\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1350 " drawable { \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1351 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1352 " xmulfactor ymulfactor scale\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1353 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1354 " % Move lower left corner of character to start point\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1355 " tc CharBox pop pop % llx lly : Lower left corner\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1356 " exch neg exch neg\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1357 " moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1358 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1359 " outline { % outline characters:\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1360 " outlinewidth setlinewidth\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1361 " tc true charpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1362 " gsave 1 setgray fill grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1363 " clip stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1364 " } { % regular characters\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1365 " tc show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1366 " } ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1367 " } if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1368 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1369 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1370 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1371 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1372 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1373 "\/ShowBox { % x1 y1 x2 y2 filled ShowBox\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1374 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1375 " \/filled exch def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1376 " \/y2 exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1377 " \/x2 exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1378 " \/y1 exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1379 " \/x1 exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1380 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1381 " x1 y1 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1382 " x2 y1 lineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1383 " x2 y2 lineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1384 " x1 y2 lineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1385 " closepath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1386 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1387 " clip\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1388 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1389 " filled {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1390 " fill\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1391 " }{ \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1392 " 0 setgray stroke \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1393 " } ifelse\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1394 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1395 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1396 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1397 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1398 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1399 "\/MakeNumber { % number MakeNumber\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1400 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1401 " SetNumberFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1402 " stackWidth 0 translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1403 " 90 rotate % rotate so the number fits\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1404 " dup stringwidth pop % find the length of the number\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1405 " neg % prepare for move\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1406 " stackMargin sub % Move back a bit\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1407 " charWidth (0) CharBoxHeight % height of numbers\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1408 " sub 2 div %\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1409 " moveto % move back to provide space\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1410 " show\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1411 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1412 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1413 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1414 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1415 "\/Ibeam{ % heightInBits Ibeam\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1416 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1417 " % Make an Ibeam of twice the given height in bits\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1418 " \/height exch pointsPerBit mul def \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1419 " \/heightDRAW height IbeamFraction mul def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1420 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1421 " IbeamLineWidth setlinewidth\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1422 " IbeamGray setgray \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1423 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1424 " charWidth2 height neg translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1425 " ShowIbar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1426 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1427 " 0 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1428 " 0 heightDRAW rlineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1429 " stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1430 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1431 " 0 height moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1432 " 0 height rmoveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1433 " currentpoint translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1434 " ShowIbar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1435 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1436 " 0 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1437 " 0 heightDRAW neg rlineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1438 " currentpoint translate\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1439 " stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1440 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1441 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1442 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1443 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1444 "\/ShowIbar { % make a horizontal bar\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1445 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1446 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1447 " charWidth4 neg 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1448 " charWidth4 0 lineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1449 " stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1450 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1451 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1452 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1453 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1454 "\/ShowLeftEnd {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1455 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1456 " SetStringFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1457 " leftEndDeltaX leftEndDeltaY moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1458 " logoType (NA) eq {(5) show ShowPrime} if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1459 " logoType (AA) eq {(N) show} if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1460 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1461 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1462 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1463 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1464 "\/ShowRightEnd { \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1465 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1466 " SetStringFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1467 " rightEndDeltaX rightEndDeltaY moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1468 " logoType (NA) eq {(3) show ShowPrime} if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1469 " logoType (AA) eq {(C) show} if\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1470 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1471 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1472 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1473 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1474 "\/ShowPrime {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1475 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1476 " SetPrimeFont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1477 " (\\242) show \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1478 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1479 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1480 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1481 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1482 "\/SetColor{ % <char> SetColor\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1483 " dup colorDict exch known {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1484 " colorDict exch get aload pop setrgbcolor\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1485 " } {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1486 " pop\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1487 " defaultColor aload pop setrgbcolor\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1488 " } ifelse \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1489 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1490 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1491 "% define fonts\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1492 "\/SetTitleFont {\/Times-Bold findfont titleFontsize scalefont setfont} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1493 "\/SetLogoFont {\/Helvetica-Bold findfont charWidth scalefont setfont} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1494 "\/SetStringFont{\/Helvetica-Bold findfont fontsize scalefont setfont} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1495 "\/SetPrimeFont {\/Symbol findfont fontsize scalefont setfont} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1496 "\/SetSmallFont {\/Helvetica findfont smallFontsize scalefont setfont} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1497 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1498 "\/SetNumberFont {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1499 " \/Helvetica-Bold findfont \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1500 " numberFontsize\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1501 " scalefont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1502 " setfont\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1503 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1504 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1505 "%Take a single character and return the bounding box\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1506 "\/CharBox { % <char> CharBox <lx> <ly> <ux> <uy>\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1507 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1508 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1509 " 0 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1510 " % take the character off the stack and use it here:\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1511 " true charpath \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1512 " flattenpath \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1513 " pathbbox % compute bounding box of 1 pt. char => lx ly ux uy\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1514 " % the path is here, but toss it away ...\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1515 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1516 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1517 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1518 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1519 "% The height of a characters bounding box\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1520 "\/CharBoxHeight { % <char> CharBoxHeight <num>\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1521 " CharBox\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1522 " exch pop sub neg exch pop\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1523 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1524 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1525 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1526 "% The width of a characters bounding box\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1527 "\/CharBoxWidth { % <char> CharBoxHeight <num>\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1528 " CharBox\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1529 " pop exch pop sub neg \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1530 "} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1531 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1532 "% Set the colour scheme to be faded to indicate trimming\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1533 "\/MuteColour {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1534 " \/colorDict mutedColourDict def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1535 "} def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1536 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1537 "% Restore the colour scheme to the normal colours\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1538 "\/RestoreColour {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1539 " \/colorDict fullColourDict def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1540 "} def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1541 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1542 "% Draw the background for a trimmed section\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1543 "% takes the number of columns as a parameter\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1544 "\/DrawTrimBg { % <num> DrawTrimBox\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1545 " \/col exch def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1546 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1547 " \/boxwidth \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1548 " col stackWidth mul \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1549 " def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1550 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1551 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1552 " 0.97 setgray\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1553 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1554 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1555 " 0 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1556 " boxwidth 0 rlineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1557 " 0 yaxisHeight rlineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1558 " 0 yaxisHeight lineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1559 " closepath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1560 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1561 " fill\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1562 " grestore\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1563 "} def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1564 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1565 "\/DrawTrimEdge {\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1566 " gsave\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1567 " 0.2 setgray\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1568 " [2] 0 setdash\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1569 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1570 " newpath\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1571 " 0 0 moveto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1572 " 0 yaxisHeight lineto\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1573 " \n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1574 " stroke\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1575 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1576 "} def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1577 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1578 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1579 "% Deprecated names\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1580 "\/startstack {StartStack} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1581 "\/endstack {EndStack} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1582 "\/makenumber {MakeNumber} bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1583 "\/numchar { MakeSymbol } bind def\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1584 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1585 "%%EndProlog\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1586 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1587 "%%Page: 1 1\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1588 "StartLogo\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1589 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1590 _input("DATA") + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1591 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1592 "EndLogo\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1593 "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1594 "%%EOF\n"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1595 );
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1596 }</script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1597 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1598 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1599 // start Alphabet object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1600 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1601 var Alphabet = function(alphabet, background) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1602 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1603 var i, j, sym, aliases, complement, comp_e_sym, ambigs, generate_background;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1604 generate_background = (background == null);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1605 if (generate_background) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1606 background = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1607 for (i = 0; i < alphabet.ncore; i++) background[i] = 1.0 / alphabet.ncore;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1608 } else if (alphabet.ncore != background.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1609 throw new Error("The background length does not match the alphabet length.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1610 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1611 this.name = alphabet.name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1612 this.like = (alphabet.like != null ? alphabet.like.toUpperCase() : null);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1613 this.ncore = alphabet.ncore;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1614 this.symbols = alphabet.symbols;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1615 this.background = background;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1616 this.genbg = generate_background;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1617 this.encode = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1618 this.encode2core = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1619 this.complement = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1620 // check if all symbols are same case
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1621 var seen_uc = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1622 var seen_lc = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1623 var check_case = function (syms) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1624 var s, sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1625 if (typeof syms === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1626 for (s = 0; s < syms.length; s++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1627 sym = syms.charAt(s);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1628 if (sym >= 'a' && sym <= 'z') seen_lc = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1629 else if (sym >= 'A' && sym <= 'Z') seen_uc = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1630 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1631 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1632 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1633 for (i = 0; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1634 check_case(this.symbols[i].symbol);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1635 check_case(this.symbols[i].aliases);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1636 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1637 // now map symbols to indexes
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1638 var update_array = function(array, syms, index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1639 var s, sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1640 if (typeof syms === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1641 for (s = 0; s < syms.length; s++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1642 sym = syms.charAt(s);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1643 array[sym] = index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1644 // when only a single case is used, then encode as case insensitive
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1645 if (seen_uc != seen_lc) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1646 if (sym >= 'a' && sym <= 'z') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1647 array[sym.toUpperCase()] = index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1648 } else if (sym >= 'A' && sym <= 'Z') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1649 array[sym.toLowerCase()] = index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1650 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1651 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1652 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1653 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1654 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1655 // map core symbols to index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1656 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1657 update_array(this.encode2core, this.symbols[i].symbol, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1658 update_array(this.encode, this.symbols[i].symbol, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1659 update_array(this.encode2core, this.symbols[i].aliases, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1660 update_array(this.encode, this.symbols[i].aliases, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1661 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1662 // map ambigous symbols to index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1663 ambigs = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1664 for (i = this.ncore; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1665 update_array(this.encode, this.symbols[i].symbol, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1666 update_array(this.encode, this.symbols[i].aliases, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1667 ambigs[this.symbols[i].equals] = i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1668 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1669 // determine complements
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1670 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1671 complement = this.symbols[i].complement;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1672 if (typeof complement === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1673 this.complement[i] = this.encode2core[complement];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1674 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1675 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1676 next_symbol:
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1677 for (i = this.ncore; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1678 complement = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1679 for (j = 0; j < this.symbols[i].equals.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1680 comp_e_sym = this.complement[this.encode2core[this.symbols[i].equals.charAt(j)]];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1681 if (typeof comp_e_sym !== "number") continue next_symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1682 complement += this.symbols[comp_e_sym].symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1683 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1684 complement = complement.split("").sort().join("");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1685 if (typeof ambigs[complement] === "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1686 this.complement[i] = ambigs[complement];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1687 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1688 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1689 // determine case insensitivity
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1690 this.case_insensitive = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1691 if (seen_uc == seen_lc) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1692 // when there is a mixture of cases it probably won't
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1693 // be case insensitive but we still need to check
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1694 loop:
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1695 for (i = 0; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1696 sym = this.symbols[i].symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1697 if (sym >= 'A' && sym <= 'Z') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1698 if (this.encode[sym.toLowerCase()] != i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1699 this.case_insensitive = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1700 break loop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1701 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1702 } else if (sym >= 'a' && sym <= 'z') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1703 if (this.encode[sym.toUpperCase()] != i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1704 this.case_insensitive = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1705 break loop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1706 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1707 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1708 aliases = this.symbols[i].aliases;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1709 if (aliases != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1710 for (j = 0; j < aliases.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1711 sym = aliases.charAt(j);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1712 if (sym >= 'A' && sym <= 'Z') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1713 if (this.encode[sym.toLowerCase()] != i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1714 this.case_insensitive = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1715 break loop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1716 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1717 } else if (sym >= 'a' && sym <= 'z') {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1718 if (this.encode[sym.toUpperCase()] != i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1719 this.case_insensitive = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1720 break loop;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1721 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1722 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1723 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1724 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1725 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1726 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1727 // normalise aliases to remove the prime symbol and eliminate
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1728 // the alternate cases when the alphabet is case insensitive
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1729 var seen, out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1730 for (i = 0; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1731 sym = this.symbols[i].symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1732 aliases = this.symbols[i].aliases;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1733 if (typeof aliases != "string") aliases = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1734 seen = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1735 out = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1736 if (this.case_insensitive) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1737 sym = sym.toUpperCase();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1738 aliases = aliases.toUpperCase();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1739 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1740 seen[sym] = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1741 for (j = 0; j < aliases.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1742 if (!seen[aliases.charAt(j)]) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1743 seen[aliases.charAt(j)] = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1744 out.push(aliases.charAt(j));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1745 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1746 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1747 this.symbols[i].aliases = out.sort().join("");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1748 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1749 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1750 // return the name of the alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1751 Alphabet.prototype.get_alphabet_name = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1752 return this.name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1753 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1754 // return if the alphabet can be complemented
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1755 Alphabet.prototype.has_complement = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1756 return (typeof this.symbols[0].complement === "string");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1757 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1758 // return true if an uppercase letter has the same meaning as the lowercase form
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1759 Alphabet.prototype.is_case_insensitive = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1760 return this.case_insensitive;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1761 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1762 // return the information content of an alphabet letter
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1763 Alphabet.prototype.get_ic = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1764 return Math.log(this.ncore) / Math.LN2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1765 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1766 // return the count of the core alphabet symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1767 Alphabet.prototype.get_size_core = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1768 return this.ncore;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1769 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1770 // return the count of all alphabet symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1771 Alphabet.prototype.get_size_full = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1772 return this.symbols.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1773 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1774 // return the symbol for the given alphabet index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1775 Alphabet.prototype.get_symbol = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1776 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1777 if (alph_index < 0 || alph_index >= this.symbols.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1778 throw new Error("Alphabet index out of bounds");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1779 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1780 return this.symbols[alph_index].symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1781 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1782 // return the aliases for the given alphabet index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1783 Alphabet.prototype.get_aliases = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1784 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1785 if (alph_index < 0 || alph_index >= this.symbols.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1786 throw new Error("Alphabet index out of bounds");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1787 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1788 var sym_obj = this.symbols[alph_index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1789 return (sym_obj.aliases != null ? sym_obj.aliases : "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1790 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1791 // return the name for the given alphabet index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1792 Alphabet.prototype.get_name = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1793 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1794 var sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1795 if (alph_index < 0 || alph_index >= this.symbols.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1796 throw new Error("Alphabet index out of bounds");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1797 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1798 sym = this.symbols[alph_index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1799 return (typeof sym.name === "string" ? sym.name : sym.symbol);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1800 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1801 // return the alphabet it is like or null
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1802 Alphabet.prototype.get_like = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1803 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1804 return this.like;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1805 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1806 // return the index of the complement for the given alphabet index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1807 Alphabet.prototype.get_complement = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1808 var comp_e_sym = this.complement[alph_index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1809 if (typeof comp_e_sym === "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1810 return comp_e_sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1811 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1812 return -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1813 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1814 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1815 // return a string containing the core symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1816 Alphabet.prototype.get_symbols = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1817 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1818 var i, core_symbols;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1819 core_symbols = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1820 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1821 core_symbols += this.symbols[i].symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1822 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1823 return core_symbols;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1824 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1825 // return if the background was not a uniform generated background
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1826 Alphabet.prototype.has_bg = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1827 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1828 return !this.genbg;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1829 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1830 // get the background frequency for the index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1831 Alphabet.prototype.get_bg_freq = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1832 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1833 var freq, i, symbols;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1834 if (alph_index >= 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1835 if (alph_index < this.ncore) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1836 return this.background[alph_index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1837 } else if (alph_index < this.symbols.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1838 freq = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1839 symbols = this.symbols[alph_index].equals;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1840 for (i = 0; i < symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1841 freq += this.background[this.encode2core[symbols.charAt(i)]];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1842 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1843 return freq;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1844 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1845 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1846 throw new Error("The alphabet index is out of range.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1847 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1848 // get the colour of the index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1849 Alphabet.prototype.get_colour = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1850 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1851 if (alph_index < 0 || alph_index >= this.symbols.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1852 throw new Error("BAD_ALPHABET_INDEX");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1853 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1854 if (typeof this.symbols[alph_index].colour != "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1855 return "black";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1856 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1857 return "#" + this.symbols[alph_index].colour;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1858 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1859 // get the rgb componets of the colour at the index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1860 Alphabet.prototype.get_rgb = function(alph_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1861 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1862 if (alph_index < 0 || alph_index >= this.symbols.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1863 throw new Error("BAD_ALPHABET_INDEX");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1864 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1865 if (typeof this.symbols[alph_index].colour != "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1866 return {"red": 0, "green": 0, "blue": 0};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1867 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1868 var colour = this.symbols[alph_index].colour;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1869 var red = parseInt(colour.substr(0, 2), 16) / 255;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1870 var green = parseInt(colour.substr(2, 2), 16) / 255;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1871 var blue = parseInt(colour.substr(4, 2), 16) / 255;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1872 return {"red": red, "green": green, "blue": blue};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1873 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1874 // convert a symbol into the index
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1875 Alphabet.prototype.get_index = function(letter) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1876 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1877 var alph_index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1878 alph_index = this.encode[letter];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1879 if (typeof alph_index === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1880 return -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1881 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1882 return alph_index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1883 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1884 // convert a symbol into the list of core indexes that it equals
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1885 Alphabet.prototype.get_indexes = function(letter) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1886 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1887 var alph_index, comprise_str, i, comprise_list;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1888 alph_index = this.encode[letter];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1889 if (typeof alph_index === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1890 throw new Error("Unknown letter");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1891 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1892 comprise_str = this.symbols[alph_index].equals;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1893 comprise_list = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1894 if (typeof comprise_str == "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1895 for (i = 0; i < comprise_str.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1896 comprise_list.push(this.encode2core[comprise_str.charAt(i)]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1897 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1898 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1899 comprise_list.push(alph_index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1900 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1901 return comprise_list;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1902 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1903 // check if a symbol is the primary way of representing the symbol in the alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1904 Alphabet.prototype.is_prime_symbol = function(letter) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1905 var alph_index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1906 alph_index = this.encode[letter];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1907 if (alph_index == null) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1908 if (this.is_case_insensitive()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1909 return (this.symbols[alph_index].symbol.toUpperCase() == letter.toUpperCase());
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1910 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1911 return (this.symbols[alph_index].symbol == letter);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1912 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1913 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1914 // compare 2 alphabets
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1915 Alphabet.prototype.equals = function(other) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1916 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1917 var i, sym1, sym2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1918 // first check that it's actually an alphabet object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1919 if (!(typeof other === "object" && other != null && other instanceof Alphabet)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1920 return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1921 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1922 // second shortcircuit if it's the same object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1923 if (this === other) return true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1924 // compare
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1925 if (this.name !== other.name) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1926 if (this.ncore !== other.ncore) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1927 if (this.symbols.length !== other.symbols.length) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1928 for (i = 0; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1929 sym1 = this.symbols[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1930 sym2 = other.symbols[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1931 if (sym1.symbol !== sym2.symbol) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1932 if (sym1.aliases !== sym2.aliases) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1933 if (sym1.name !== sym2.name) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1934 if (typeof sym1.colour !== typeof sym2.colour ||
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1935 (typeof sym1.colour === "string" && typeof sym2.colour === "string" &&
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1936 parseInt(sym1.colour, 16) != parseInt(sym2.colour, 16))) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1937 return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1938 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1939 if (sym1.complement !== sym2.complement) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1940 if (sym1.equals !== sym2.equals) return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1941 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1942 return true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1943 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1944 Alphabet.prototype.check_core_subset = function(super_alph) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1945 var complement_same = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1946 var seen_set = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1947 var sub_i, sub_symbol, super_i, super_symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1948 for (sub_i = 0; sub_i < this.ncore; sub_i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1949 sub_symbol = this.symbols[sub_i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1950 super_i = super_alph.encode[sub_symbol.symbol];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1951 if (super_i == null) return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1952 super_symbol = super_alph.symbols[super_i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1953 if (seen_set[super_i]) return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1954 seen_set[super_i] = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1955 // check complement
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1956 if (sub_symbol.complement != null && super_symbol.complement != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1957 if (super_alph.encode[sub_symbol.complement] != super_alph.encode[super_symbol.complement]) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1958 complement_same = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1959 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1960 } else if (sub_symbol.complement != null || super_symbol.complement != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1961 complement_same = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1962 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1963 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1964 return (complement_same ? 1 : -1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1965 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1966 // convert a sequence to its reverse complement
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1967 Alphabet.prototype.invcomp_seq = function(seq) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1968 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1969 var syms, i, e_sym, comp_e_sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1970 if (!this.has_complement()) throw new Error("Alphabet must be complementable");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1971 syms = seq.split("");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1972 for (i = 0; i < syms.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1973 e_sym = this.encode[syms[i]];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1974 if (typeof e_sym === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1975 e_sym = this.ncore; // wildcard
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1976 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1977 comp_e_sym = this.complement[e_sym];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1978 if (typeof comp_e_sym === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1979 comp_e_sym = e_sym; // not complementable
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1980 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1981 syms[i] = this.symbols[comp_e_sym].symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1982 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1983 return syms.reverse().join("");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1984 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1985 // convert the alphabet to the text version
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1986 Alphabet.prototype.as_text = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1987 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1988 function name_as_text(name) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1989 var i, c, out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1990 out = "\"";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1991 for (i = 0; i < name.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1992 c = name.charAt(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1993 if (c == "\"") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1994 out += "\\\"";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1995 } else if (c == "/") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1996 out += "\\/";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1997 } else if (c == "\\") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1998 out += "\\\\";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
1999 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2000 out += c;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2001 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2002 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2003 out += "\"";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2004 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2005 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2006 function symbol_as_text(sym) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2007 var out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2008 out = sym.symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2009 if (typeof sym.name === "string" && sym.name != sym.symbol) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2010 out += " " + name_as_text(sym.name);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2011 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2012 if (typeof sym.colour === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2013 out += " " + sym.colour;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2014 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2015 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2016 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2017 var out, i, j, c, sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2018 out = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2019 // output core symbols with 2 way complements
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2020 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2021 c = this.complement[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2022 if (typeof c === "number" && i < c && this.complement[c] === i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2023 out += symbol_as_text(this.symbols[i]) + " ~ " + symbol_as_text(this.symbols[c]) + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2024 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2025 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2026 // output core symbols with no complement
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2027 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2028 if (typeof this.complement[i] === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2029 out += symbol_as_text(this.symbols[i]) + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2030 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2031 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2032 // output ambiguous symbols that have comprising characters
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2033 for (i = this.ncore; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2034 if (this.symbols[i].equals.length == 0) break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2035 out += symbol_as_text(this.symbols[i]) + " = " + this.symbols[i].equals + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2036 if (typeof this.symbols[i].aliases === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2037 for (j = 0; j < this.symbols[i].aliases.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2038 if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2039 out += this.symbols[i].aliases.charAt(j) + " = " + this.symbols[i].equals + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2040 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2041 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2042 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2043 // output aliases of core symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2044 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2045 if (typeof this.symbols[i].aliases === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2046 for (j = 0; j < this.symbols[i].aliases.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2047 if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2048 out += this.symbols[i].aliases.charAt(j) + " = " + this.symbols[i].symbol + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2049 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2050 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2051 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2052 // output gap symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2053 i = this.symbols.length - 1;
b386032d758d 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].equals.length == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2055 out += symbol_as_text(this.symbols[i]) + " =\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2056 if (typeof this.symbols[i].aliases === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2057 for (j = 0; j < this.symbols[i].aliases.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2058 if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2059 out += this.symbols[i].aliases.charAt(j) + " =\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2060 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2061 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2062 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2063 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2064 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2065 // output the alphabet as it appears in minimal MEME format
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2066 Alphabet.prototype.as_meme = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2067 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2068 function name_as_text(name) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2069 var i, c, out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2070 out = "\"";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2071 for (i = 0; i < name.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2072 c = name.charAt(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2073 if (c == "\"") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2074 out += "\\\"";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2075 } else if (c == "/") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2076 out += "\\/";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2077 } else if (c == "\\") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2078 out += "\\\\";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2079 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2080 out += c;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2081 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2082 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2083 out += "\"";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2084 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2085 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2086 if (this.equals(AlphStd.DNA)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2087 return "ALPHABET= ACGT\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2088 } else if (this.equals(AlphStd.PROTEIN)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2089 return "ALPHABET= ACDEFGHIKLMNPQRSTVWY\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2090 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2091 return "ALPHABET" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2092 (this.name != null ? " " + name_as_text(this.name) : "") +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2093 (this.like != null ? " " + this.like + "-LIKE" : "") + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2094 this.as_text() + "END ALPHABET\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2095 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2096 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2097
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2098 // Returns a table showing all the letters in the alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2099 Alphabet.prototype.as_table = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2100 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2101 var i, j, row, th, td, aliases, equals, sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2102 var table = document.createElement("table");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2103 // create the core symbol header
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2104 row = table.insertRow(table.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2105 th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2106 th.appendChild(document.createTextNode("Symbol(s)"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2107 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2108 th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2109 th.appendChild(document.createTextNode("Name"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2110 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2111 th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2112 if (this.has_complement()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2113 th.appendChild(document.createTextNode("Complement"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2114 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2115 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2116 // list the core symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2117 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2118 row = table.insertRow(table.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2119 td = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2120 if (this.symbols[i].colour != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2121 td.style.color = '#' + this.symbols[i].colour;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2122 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2123 td.appendChild(document.createTextNode(this.symbols[i].symbol));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2124 aliases = this.get_aliases(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2125 if (aliases.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2126 td.appendChild(document.createTextNode(' ' + aliases.split('').join(' ')));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2127 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2128 row.appendChild(td);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2129 td = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2130 if (this.symbols[i].name != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2131 td.appendChild(document.createTextNode(this.symbols[i].name));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2132 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2133 row.appendChild(td);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2134 td = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2135 if (this.symbols[i].complement != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2136 td.style.color = this.get_colour(this.get_index(this.symbols[i].complement));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2137 td.appendChild(document.createTextNode(this.symbols[i].complement));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2138 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2139 row.appendChild(td);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2140 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2141 // create the ambiguous symbol header
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2142 row = table.insertRow(table.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2143 th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2144 th.appendChild(document.createTextNode("Symbol(s)"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2145 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2146 th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2147 th.appendChild(document.createTextNode("Name"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2148 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2149 th = document.createElement("th");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2150 th.appendChild(document.createTextNode("Matches"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2151 row.appendChild(th);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2152 // list the ambiguous symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2153 for (i = this.ncore; i < this.symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2154 row = table.insertRow(table.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2155 td = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2156 if (this.symbols[i].colour != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2157 td.style.color = '#' + this.symbols[i].colour;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2158 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2159 td.appendChild(document.createTextNode(this.symbols[i].symbol));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2160 aliases = this.get_aliases(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2161 if (aliases.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2162 td.appendChild(document.createTextNode(' ' + aliases.split('').join(' ')));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2163 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2164 row.appendChild(td);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2165 td = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2166 if (this.symbols[i].name != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2167 td.appendChild(document.createTextNode(this.symbols[i].name));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2168 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2169 row.appendChild(td);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2170 td = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2171 equals = this.symbols[i].equals.split('');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2172 for (j = 0; j < equals.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2173 if (j != 0) td.appendChild(document.createTextNode(' '));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2174 sym = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2175 sym.style.color = this.get_colour(this.get_index(equals[j]));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2176 sym.appendChild(document.createTextNode(equals[j]));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2177 td.appendChild(sym);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2178 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2179 row.appendChild(td);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2180 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2181 return table;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2182 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2183
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2184 // returns a dictionary of the colours for EPS
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2185 Alphabet.prototype._as_eps_dict = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2186 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2187 var i, sym, rgb;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2188 var out = "/fullColourDict <<\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2189 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2190 sym = this.get_symbol(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2191 sym = sym.replace(/\\/g, "\\\\");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2192 sym = sym.replace(/\(/g, "\\(");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2193 sym = sym.replace(/\)/g, "\\)");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2194 rgb = this.get_rgb(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2195 out += " (" + sym + ") [" + rgb.red.toFixed(4) + " " + rgb.green.toFixed(4) + " " + rgb.blue.toFixed(4) + "]\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2196 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2197 out += ">> def\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2198 out += "/mutedColourDict <<\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2199 for (i = 0; i < this.ncore; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2200 sym = this.get_symbol(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2201 sym = sym.replace(/\\/g, "\\\\");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2202 sym = sym.replace(/\(/g, "\\(");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2203 sym = sym.replace(/\)/g, "\\)");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2204 rgb = Alphabet.lighten_colour(this.get_rgb(i));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2205 out += " (" + sym + ") [" + rgb.red.toFixed(4) + " " + rgb.green.toFixed(4) + " " + rgb.blue.toFixed(4) + "]\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2206 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2207 out += ">> def\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2208 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2209 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2210
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2211 // return the alphabet name or a list of primary symbols
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2212 Alphabet.prototype.toString = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2213 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2214 if (this.name != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2215 return this.name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2216 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2217 return this.get_symbols();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2218 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2219 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2220
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2221 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2222 // Helper functions
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2223 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2224
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2225 // Convert a colour specified in RGB colourspace values into LAB colourspace
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2226 Alphabet.rgb2lab = function(rgb) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2227 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2228 var xyzHelper, labHelper;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2229 // XYZ helper
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2230 xyzHelper = function(value) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2231 if (value > 0.0445) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2232 value = (value + 0.055) / 1.055;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2233 value = Math.pow(value, 2.4);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2234 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2235 value /= 12.92;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2236 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2237 value *= 100;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2238 return value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2239 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2240 // lab helper
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2241 labHelper = function(value) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2242 if (value > 0.008856) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2243 value = Math.pow(value, 1.0 / 3.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2244 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2245 value = (7.787 * value) + (16.0 / 116.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2246 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2247 return value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2248 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2249 // convert into XYZ colourspace
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2250 var c1, c2, c3;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2251 if (typeof rgb == "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2252 c1 = xyzHelper(((rgb >> 16) & 0xFF) / 255.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2253 c2 = xyzHelper(((rgb >> 8) & 0xFF) / 255.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2254 c3 = xyzHelper((rgb & 0xFF) / 255.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2255 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2256 c1 = xyzHelper(rgb.red);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2257 c2 = xyzHelper(rgb.green);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2258 c3 = xyzHelper(rgb.blue);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2259 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2260 var x = (c1 * 0.4124) + (c2 * 0.3576) + (c3 * 0.1805);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2261 var y = (c1 * 0.2126) + (c2 * 0.7152) + (c3 * 0.0722);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2262 var z = (c1 * 0.0193) + (c2 * 0.1192) + (c3 * 0.9505);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2263 // convert into Lab colourspace
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2264 c1 = labHelper(x / 95.047);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2265 c2 = labHelper(y / 100.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2266 c3 = labHelper(z / 108.883);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2267 var l = (116.0 * c2) - 16;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2268 var a = 500.0 * (c1 - c2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2269 var b = 200.0 * (c2 - c3);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2270 return {"l": l, "a": a, "b": b};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2271 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2272
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2273 // Convert a colour specified in HSV colourspace into RGB colourspace
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2274 Alphabet.hsv2rgb = function(hue, sat, value, output_object) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2275 // achromatic (grey)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2276 var r = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2277 var g = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2278 var b = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2279 if (sat != 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2280 var h = hue / 60.0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2281 var i = Math.floor(h);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2282 var f = h - i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2283 var p = value * (1.0 - sat);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2284 var q = value * (1.0 - (sat * f));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2285 var t = value * (1.0 - (sat * (1.0 - f)));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2286 if (i == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2287 r = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2288 g = t;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2289 b = p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2290 } else if (i == 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2291 r = q;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2292 g = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2293 b = p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2294 } else if (i == 2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2295 r = p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2296 g = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2297 b = t;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2298 } else if (i == 3) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2299 r = p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2300 g = q;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2301 b = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2302 } else if (i == 4) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2303 r = t;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2304 g = p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2305 b = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2306 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2307 r = value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2308 g = p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2309 b = q;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2310 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2311 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2312 if (output_object) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2313 return {"red": r, "green": g, "blue": b};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2314 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2315 return (Math.floor(r * 255) << 15) | (Math.floor(g * 255) << 8) | (Math.floor(b * 255));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2316 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2317 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2318
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2319 // Calculate a distance score between two colours in LAB colourspace
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2320 Alphabet.lab_dist = function(lab1, lab2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2321 var c1 = Math.sqrt((lab1.l * lab1.l) + (lab1.a * lab1.a));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2322 var c2 = Math.sqrt((lab2.l * lab2.l) + (lab2.a * lab2.a));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2323 var dc = c1 - c2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2324 var dl = lab1.l - lab2.l;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2325 var da = lab1.a - lab2.a;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2326 var db = lab1.b - lab2.b;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2327 // we don't want NaN due to rounding errors so fudge things a bit...
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2328 var dh = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2329 var dh_squared = (da * da) + (db * db) - (dc * dc);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2330 if (dh_squared > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2331 dh = Math.sqrt(dh_squared);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2332 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2333 var first = dl;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2334 var second = dc / (1.0 + (0.045 * c1));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2335 var third = dh / (1.0 + (0.015 * c1));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2336 return Math.sqrt((first * first) + (second * second) + (third * third));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2337 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2338
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2339 // convert an RGB value into a HSL value
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2340 Alphabet.rgb2hsl = function(rgb) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2341 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2342 var min, max, delta, h, s, l, r, g, b;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2343 if (typeof rgb == "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2344 r = ((rgb >> 16) & 0xFF) / 255.0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2345 g = ((rgb >> 8) & 0xFF) / 255.0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2346 b = (rgb & 0xFF) / 255.0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2347 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2348 r = rgb.red;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2349 g = rgb.green;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2350 b = rgb.blue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2351 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2352 min = Math.min(r, g, b);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2353 max = Math.max(r, g, b);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2354 delta = max - min;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2355 l = min + (delta / 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2356 if (max == min) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2357 h = 0; // achromatic (grayscale)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2358 s = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2359 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2360 if (l > 0.5) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2361 s = delta / (2 - max - min);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2362 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2363 s = delta / (max + min);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2364 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2365 if (max == r) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2366 h = (g - b) / delta;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2367 if (g < b) h += 6;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2368 } else if (max == g) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2369 h = ((b - r) / delta) + 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2370 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2371 h = ((r - g) / delta) + 4;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2372 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2373 h /= 6;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2374 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2375 return {"h": h, "s": s, "l": l};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2376 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2377
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2378 // convert a HSL value into an RGB value
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2379 Alphabet.hsl2rgb = function(hsl, output_object) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2380 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2381 function _hue(p, q, t) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2382 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2383 if (t < 0) t += 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2384 else if (t > 1) t -= 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2385 if (t < (1.0 / 6.0)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2386 return p + ((q - p) * 6.0 * t);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2387 } else if (t < 0.5) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2388 return q;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2389 } else if (t < (2.0 / 3.0)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2390 return p + ((q - p) * ((2.0 / 3.0) - t) * 6.0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2391 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2392 return p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2393 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2394 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2395 var r, g, b, p, q;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2396 if (hsl.s == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2397 // achromatic (grayscale)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2398 r = hsl.l;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2399 g = hsl.l;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2400 b = hsl.l;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2401 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2402 if (hsl.l < 0.5) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2403 q = hsl.l * (1 + hsl.s);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2404 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2405 q = hsl.l + hsl.s - (hsl.l * hsl.s);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2406 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2407 p = (2 * hsl.l) - q;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2408 r = _hue(p, q, hsl.h + (1.0 / 3.0));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2409 g = _hue(p, q, hsl.h);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2410 b = _hue(p, q, hsl.h - (1.0 / 3.0));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2411 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2412 if (output_object) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2413 return {"red": r, "green": g, "blue": b};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2414 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2415 return (Math.floor(r * 255) << 15) | (Math.floor(g * 255) << 8) | (Math.floor(b * 255));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2416 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2417 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2418
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2419 Alphabet.lighten_colour = function(rgb) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2420 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2421 var hsl = Alphabet.rgb2hsl(rgb);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2422 hsl.l += (1.0 - hsl.l) * 2 / 3;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2423 return Alphabet.hsl2rgb(hsl, typeof rgb != "number");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2424 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2425
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2426 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2427 // end Alphabet object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2428 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2429
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2430 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2431 // start StandardAlphabet object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2432 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2433
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2434 // an extension of the alphabet object to support some additional fields
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2435 // only present in standard alphabets.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2436 var StandardAlphabet = function(enum_code, enum_name, alphabet_data) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2437 Alphabet.apply(this, [alphabet_data]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2438 this.enum_code = enum_code;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2439 this.enum_name = enum_name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2440 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2441 StandardAlphabet.prototype = Alphabet.prototype;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2442 StandardAlphabet.prototype.constructor = StandardAlphabet;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2443
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2444 // A unique code for this standard alphabet.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2445 // This code will be a power of 2 to enable creation of bitsets for
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2446 // a selection of standard alphabets.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2447 StandardAlphabet.prototype.get_code = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2448 return this.enum_code;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2449 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2450
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2451 // A unique name for this standard alphabet.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2452 // this name will be all upper case and the same as the property that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2453 // refers to this alphabet in the AlphStd collection.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2454 StandardAlphabet.prototype.get_enum = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2455 return this.enum_name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2456 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2457
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2458 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2459 // end StandardAlphabet object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2460 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2461
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2462 // A collection of standard alphabets.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2463 var AlphStd = {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2464 RNA: new StandardAlphabet(1, "RNA", {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2465 "name": "RNA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2466 "like": "RNA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2467 "ncore": 4,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2468 "symbols": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2469 {"symbol": "A", "name": "Adenine", "colour": "CC0000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2470 {"symbol": "C", "name": "Cytosine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2471 {"symbol": "G", "name": "Guanine", "colour": "FFB300"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2472 {"symbol": "U", "name": "Uracil", "colour": "008000",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2473 "aliases": "T"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2474 {"symbol": "N", "name": "Any base", "equals": "ACGU", "aliases": "X."},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2475 {"symbol": "V", "name": "Not U", "equals": "ACG"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2476 {"symbol": "H", "name": "Not G", "equals": "ACU"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2477 {"symbol": "D", "name": "Not C", "equals": "AGU"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2478 {"symbol": "B", "name": "Not A", "equals": "CGU"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2479 {"symbol": "M", "name": "Amino", "equals": "AC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2480 {"symbol": "R", "name": "Purine", "equals": "AG"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2481 {"symbol": "W", "name": "Weak", "equals": "AU"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2482 {"symbol": "S", "name": "Strong", "equals": "CG"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2483 {"symbol": "Y", "name": "Pyrimidine", "equals": "CU"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2484 {"symbol": "K", "name": "Keto", "equals": "GU"}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2485 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2486 }),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2487 DNA: new StandardAlphabet(2, "DNA", {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2488 "name": "DNA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2489 "like": "DNA",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2490 "ncore": 4,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2491 "symbols": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2492 {"symbol": "A", "name": "Adenine", "colour": "CC0000", "complement": "T"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2493 {"symbol": "C", "name": "Cytosine", "colour": "0000CC", "complement": "G"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2494 {"symbol": "G", "name": "Guanine", "colour": "FFB300", "complement": "C"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2495 {"symbol": "T", "name": "Thymine", "colour": "008000", "complement": "A",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2496 "aliases": "U"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2497 {"symbol": "N", "name": "Any base", "equals": "ACGT", "aliases": "X."},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2498 {"symbol": "V", "name": "Not T", "equals": "ACG"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2499 {"symbol": "H", "name": "Not G", "equals": "ACT"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2500 {"symbol": "D", "name": "Not C", "equals": "AGT"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2501 {"symbol": "B", "name": "Not A", "equals": "CGT"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2502 {"symbol": "M", "name": "Amino", "equals": "AC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2503 {"symbol": "R", "name": "Purine", "equals": "AG"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2504 {"symbol": "W", "name": "Weak", "equals": "AT"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2505 {"symbol": "S", "name": "Strong", "equals": "CG"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2506 {"symbol": "Y", "name": "Pyrimidine", "equals": "CT"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2507 {"symbol": "K", "name": "Keto", "equals": "GT"}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2508 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2509 }),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2510 PROTEIN: new StandardAlphabet(4, "PROTEIN", {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2511 "name": "Protein",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2512 "like": "PROTEIN",
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2513 "ncore": 20,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2514 "symbols": [
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2515 {"symbol": "A", "name": "Alanine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2516 {"symbol": "C", "name": "Cysteine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2517 {"symbol": "D", "name": "Aspartic acid", "colour": "FF00FF"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2518 {"symbol": "E", "name": "Glutamic acid", "colour": "FF00FF"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2519 {"symbol": "F", "name": "Phenylalanine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2520 {"symbol": "G", "name": "Glycine", "colour": "FFB300"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2521 {"symbol": "H", "name": "Histidine", "colour": "FFCCCC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2522 {"symbol": "I", "name": "Isoleucine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2523 {"symbol": "K", "name": "Lysine", "colour": "CC0000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2524 {"symbol": "L", "name": "Leucine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2525 {"symbol": "M", "name": "Methionine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2526 {"symbol": "N", "name": "Asparagine", "colour": "008000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2527 {"symbol": "P", "name": "Proline", "colour": "FFFF00"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2528 {"symbol": "Q", "name": "Glutamine", "colour": "008000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2529 {"symbol": "R", "name": "Arginine", "colour": "CC0000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2530 {"symbol": "S", "name": "Serine", "colour": "008000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2531 {"symbol": "T", "name": "Threonine", "colour": "008000"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2532 {"symbol": "V", "name": "Valine", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2533 {"symbol": "W", "name": "Tryptophan", "colour": "0000CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2534 {"symbol": "Y", "name": "Tyrosine", "colour": "33E6CC"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2535 {"symbol": "X", "name": "Any amino acid", "equals": "ACDEFGHIKLMNPQRSTVWY", "aliases": "*."},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2536 {"symbol": "B", "name": "Asparagine or Aspartic acid", "equals": "DN"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2537 {"symbol": "Z", "name": "Glutamine or Glutamic acid", "equals": "EQ"},
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2538 {"symbol": "J", "name": "Leucine or Isoleucine", "equals": "IL"}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2539 ]
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2540 })
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2541 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2542
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2543 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2544 // start Symbol object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2545 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2546 var Symbol = function(alph_index, scale, alphabet) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2547 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2548 //variable prototype
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2549 this.symbol = alphabet.get_symbol(alph_index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2550 this.scale = scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2551 this.colour = alphabet.get_colour(alph_index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2552 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2553
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2554 Symbol.prototype.get_symbol = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2555 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2556 return this.symbol;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2557 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2558
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2559 Symbol.prototype.get_scale = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2560 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2561 return this.scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2562 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2563
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2564 Symbol.prototype.get_colour = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2565 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2566 return this.colour;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2567 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2568
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2569 Symbol.prototype.toString = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2570 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2571 return this.symbol + " " + (Math.round(this.scale*1000)/10) + "%";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2572 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2573
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2574 function compare_symbol(sym1, sym2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2575 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2576 if (sym1.get_scale() < sym2.get_scale()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2577 return -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2578 } else if (sym1.get_scale() > sym2.get_scale()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2579 return 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2580 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2581 return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2582 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2583 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2584 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2585 // end Symbol object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2586 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2587
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2588 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2589 // start Pspm object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2590 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2591 var Pspm = function(matrix, name, ltrim, rtrim, nsites, evalue, pssm, alt) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2592 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2593 var row, col, data, row_sum, delta, evalue_re;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2594 if (typeof name !== "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2595 name = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2596 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2597 this.name = name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2598 //construct
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2599 if (matrix instanceof Pspm) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2600 // copy constructor
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2601 this.alph_length = matrix.alph_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2602 this.motif_length = matrix.motif_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2603 this.name = matrix.name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2604 this.alt = matrix.alt;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2605 this.nsites = matrix.nsites;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2606 this.evalue = matrix.evalue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2607 this.ltrim = matrix.ltrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2608 this.rtrim = matrix.rtrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2609 this.pspm = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2610 for (row = 0; row < matrix.motif_length; row++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2611 this.pspm[row] = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2612 for (col = 0; col < matrix.alph_length; col++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2613 this.pspm[row][col] = matrix.pspm[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2614 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2615 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2616 if (matrix.pssm != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2617 this.pssm = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2618 for (row = 0; row < matrix.motif_length; row++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2619 this.pspm[row] = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2620 for (col = 0; col < matrix.alph_length; col++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2621 this.pssm[row][col] = matrix.pssm[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2622 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2623 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2624 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2625 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2626 // check parameters
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2627 if (ltrim == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2628 ltrim = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2629 } else if (typeof ltrim !== "number" || ltrim % 1 !== 0 || ltrim < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2630 throw new Error("ltrim must be a non-negative integer, got: " + ltrim);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2631 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2632 if (rtrim == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2633 rtrim = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2634 } else if (typeof rtrim !== "number" || rtrim % 1 !== 0 || rtrim < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2635 throw new Error("rtrim must be a non-negative integer, got: " + rtrim);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2636 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2637 if (nsites != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2638 if (typeof nsites !== "number" || nsites < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2639 throw new Error("nsites must be a positive number, got: " + nsites);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2640 } else if (nsites == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2641 nsites = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2642 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2643 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2644 if (evalue != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2645 if (typeof evalue === "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2646 if (evalue < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2647 throw new Error("evalue must be a non-negative number, got: " + evalue);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2648 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2649 } else if (typeof evalue === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2650 evalue_re = /^((?:[+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|inf)$/;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2651 if (!evalue_re.test(evalue)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2652 throw new Error("evalue must be a non-negative number, got: " + evalue);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2653 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2654 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2655 throw new Error("evalue must be a non-negative number, got: " + evalue);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2656 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2657 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2658 // set properties
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2659 this.name = name;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2660 this.alt = alt;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2661 this.nsites = nsites;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2662 this.evalue = evalue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2663 this.ltrim = ltrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2664 this.rtrim = rtrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2665 if (typeof matrix === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2666 // string constructor
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2667 data = parse_pspm_string(matrix);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2668 this.alph_length = data["alph_length"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2669 this.motif_length = data["motif_length"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2670 this.pspm = data["pspm"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2671 if (this.evalue == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2672 if (data["evalue"] != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2673 this.evalue = data["evalue"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2674 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2675 this.evalue = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2676 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2677 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2678 if (this.nsites == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2679 if (typeof data["nsites"] === "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2680 this.nsites = data["nsites"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2681 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2682 this.nsites = 20;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2683 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2684 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2685 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2686 // assume pspm is a nested array
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2687 this.motif_length = matrix.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2688 this.alph_length = (matrix.length > 0 ? matrix[0].length : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2689 if (this.nsites == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2690 this.nsites = 20;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2691 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2692 if (this.evalue == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2693 this.evalue = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2694 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2695 this.pspm = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2696 // copy pspm and check
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2697 for (row = 0; row < this.motif_length; row++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2698 if (this.alph_length != matrix[row].length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2699 throw new Error("COLUMN_MISMATCH");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2700 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2701 this.pspm[row] = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2702 row_sum = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2703 for (col = 0; col < this.alph_length; col++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2704 this.pspm[row][col] = matrix[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2705 row_sum += this.pspm[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2706 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2707 delta = 0.1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2708 if (isNaN(row_sum) || (row_sum > 1 && (row_sum - 1) > delta) ||
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2709 (row_sum < 1 && (1 - row_sum) > delta)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2710 throw new Error("INVALID_SUM");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2711 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2712 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2713 // copy pssm
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2714 if (pssm != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2715 this.pssm = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2716 for (row = 0; row < this.motif_length; row++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2717 this.pssm[row] = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2718 for (col = 0; col < this.alph_length; col++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2719 this.pssm[row][col] = pssm[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2720 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2721 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2722 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2723 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2724 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2725 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2726
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2727 Pspm.prototype.copy = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2728 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2729 return new Pspm(this);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2730 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2731
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2732 Pspm.prototype.reverse = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2733 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2734 var x, y, temp, temp_trim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2735 //reverse
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2736 x = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2737 y = this.motif_length-1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2738 while (x < y) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2739 temp = this.pspm[x];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2740 this.pspm[x] = this.pspm[y];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2741 this.pspm[y] = temp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2742 x++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2743 y--;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2744 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2745 // reverse pssm (if defined)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2746 if (typeof this.pssm !== "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2747 //reverse
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2748 x = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2749 y = this.motif_length-1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2750 while (x < y) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2751 temp = this.pssm[x];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2752 this.pspm[x] = this.pssm[y];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2753 this.pssm[y] = temp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2754 x++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2755 y--;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2756 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2757 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2758 //swap triming
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2759 temp_trim = this.ltrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2760 this.ltrim = this.rtrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2761 this.rtrim = temp_trim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2762 return this; //allow function chaining...
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2763 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2764
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2765 Pspm.prototype.reverse_complement = function(alphabet) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2766 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2767 var x, y, temp, i, row, c, temp_trim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2768 if (this.alph_length != alphabet.get_size_core()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2769 throw new Error("The alphabet size does not match the size of the pspm.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2770 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2771 if (!alphabet.has_complement()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2772 throw new Error("The specified alphabet can not be complemented.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2773 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2774 // reverse motif
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2775 this.reverse();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2776 //complement
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2777 for (x = 0; x < this.motif_length; x++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2778 row = this.pspm[x];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2779 for (i = 0; i < row.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2780 c = alphabet.get_complement(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2781 if (c < i) continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2782 temp = row[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2783 row[i] = row[c];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2784 row[c] = temp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2785 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2786 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2787 // complement pssm (if defined)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2788 if (typeof this.pssm !== "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2789 //complement
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2790 for (x = 0; x < this.motif_length; x++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2791 row = this.pssm[x];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2792 for (i = 0; i < row.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2793 c = alphabet.get_complement(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2794 if (c < i) continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2795 temp = row[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2796 row[i] = row[c];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2797 row[c] = temp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2798 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2799 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2800 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2801 return this; //allow function chaining...
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2802 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2803
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2804 Pspm.prototype.get_stack = function(position, alphabet, ssc) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2805 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2806 var row, stack_ic, alphabet_ic, stack, i, sym;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2807 if (this.alph_length != alphabet.get_size_core()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2808 throw new Error("The alphabet size does not match the size of the pspm.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2809 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2810 row = this.pspm[position];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2811 stack_ic = this.get_stack_ic(position, alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2812 if (ssc) stack_ic -= this.get_error(alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2813 alphabet_ic = alphabet.get_ic();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2814 stack = [];
b386032d758d 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.alph_length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2816 sym = new Symbol(i, row[i]*stack_ic/alphabet_ic, alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2817 if (sym.get_scale() <= 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2818 continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2819 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2820 stack.push(sym);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2821 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2822 stack.sort(compare_symbol);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2823 return stack;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2824 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2825
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2826 Pspm.prototype.get_stack_ic = function(position, alphabet) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2827 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2828 var row, H, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2829 if (this.alph_length != alphabet.get_size_core()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2830 throw new Error("The alphabet size does not match the size fo the pspm.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2831 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2832 row = this.pspm[position];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2833 H = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2834 for (i = 0; i < this.alph_length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2835 if (row[i] === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2836 continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2837 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2838 H -= (row[i] * (Math.log(row[i]) / Math.LN2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2839 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2840 return alphabet.get_ic() - H;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2841 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2842
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2843 Pspm.prototype.get_error = function(alphabet) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2844 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2845 if (this.nsites === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2846 return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2847 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2848 return (alphabet.get_size_core()-1) / (2 * Math.LN2 * this.nsites);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2849 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2850
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2851 Pspm.prototype.get_motif_length = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2852 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2853 return this.motif_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2854 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2855
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2856 Pspm.prototype.get_alph_length = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2857 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2858 return this.alph_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2859 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2860
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2861 Pspm.prototype.get_left_trim = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2862 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2863 return this.ltrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2864 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2865
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2866 Pspm.prototype.get_right_trim = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2867 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2868 return this.rtrim;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2869 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2870
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2871 Pspm.prototype.as_best_match = function(alphabet) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2872 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2873 var match, odds, best_odds, best_index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2874 var i, j;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2875 match = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2876 for (i = 0; i < this.motif_length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2877 best_index = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2878 best_odds = this.pspm[i][0] / alphabet.get_bg_freq(0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2879 for (j = 1; j < this.alph_length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2880 odds = this.pspm[i][j] / alphabet.get_bg_freq(j);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2881 if (odds > best_odds) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2882 best_odds = odds;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2883 best_index = j;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2884 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2885 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2886 match += alphabet.get_symbol(best_index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2887 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2888 return match;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2889 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2890
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2891 Pspm.prototype.as_count_matrix = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2892 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2893 var count, count_text, text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2894 var i, j;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2895 text = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2896 for (i = 0; i < this.motif_length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2897 if (i !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2898 text += "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2899 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2900 for (j = 0; j < this.alph_length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2901 if (j !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2902 text += " ";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2903 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2904 count = Math.round(this.nsites * this.pspm[i][j]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2905 count_text = "" + count;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2906 // pad up to length of 4
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2907 if (count_text.length < 4) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2908 text += (new Array(5 - count_text.length)).join(" ") + count_text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2909 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2910 text += count_text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2911 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2912 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2913 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2914 return text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2915 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2916
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2917 Pspm.prototype.as_probability_matrix = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2918 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2919 var text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2920 var i, j;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2921 text = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2922 for (i = 0; i < this.motif_length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2923 if (i !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2924 text += "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2925 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2926 for (j = 0; j < this.alph_length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2927 if (j !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2928 text += " ";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2929 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2930 text += this.pspm[i][j].toFixed(6);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2931 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2932 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2933 return text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2934 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2935
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2936 Pspm.prototype.as_score_matrix = function(alphabet, pseudo) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2937 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2938 var me, score, out, row, col, score_text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2939 me = this;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2940 if (typeof this.pssm === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2941 if (!(typeof alphabet === "object" && alphabet != null && alphabet instanceof Alphabet)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2942 throw new Error("The alphabet is required to generate the pssm.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2943 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2944 if (typeof pseudo === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2945 pseudo = 0.01;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2946 } else if (typeof pseudo !== "number" || pseudo < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2947 throw new Error("Expected positive number for pseudocount");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2948 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2949 score = function(row, col) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2950 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2951 var p, bg, p2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2952 p = me.pspm[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2953 bg = alphabet.get_bg_freq(col);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2954 p2 = (p * me.nsites + bg * pseudo) / (me.nsites + pseudo);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2955 return (p2 > 0 ? Math.round((Math.log(p2 / bg) / Math.LN2) * 100) : -10000);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2956 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2957 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2958 score = function(row, col) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2959 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2960 return me.pssm[row][col];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2961 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2962 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2963 out = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2964 for (row = 0; row < this.motif_length; row++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2965 for (col = 0; col < this.alph_length; col++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2966 if (col !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2967 out += " ";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2968 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2969 score_text = "" + score(row, col);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2970 // pad out to 6 characters
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2971 if (score_text.length < 6) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2972 out += (new Array(7 - score_text.length)).join(" ") + score_text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2973 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2974 out += score_text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2975 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2976 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2977 out += "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2978 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2979 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2980 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2981
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2982 Pspm.prototype.as_pspm = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2983 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2984 return "letter-probability matrix: alength= " + this.alph_length +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2985 " w= " + this.motif_length + " nsites= " + this.nsites +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2986 " E= " + (typeof this.evalue === "number" ?
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2987 this.evalue.toExponential() : this.evalue) + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2988 this.as_probability_matrix();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2989 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2990
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2991 Pspm.prototype.as_pssm = function(alphabet, pseudo) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2992 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2993 return "log-odds matrix: alength= " + this.alph_length +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2994 " w= " + this.motif_length +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2995 " E= " + (typeof this.evalue == "number" ?
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2996 this.evalue.toExponential() : this.evalue) + "\n" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2997 this.as_score_matrix(alphabet, pseudo);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2998 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
2999
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3000 Pspm.prototype.as_meme = function(options) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3001 var with_header, with_pspm, with_pssm, version, alphabet, bg_source, pseudocount, strands;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3002 var out, alen, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3003 // get the options
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3004 if (typeof options !== "object" || options === null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3005 options = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3006 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3007 with_header = (typeof options["with_header"] === "boolean" ? options["with_header"] : false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3008 with_pspm = (typeof options["with_pspm"] === "boolean" ? options["with_pspm"] : false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3009 with_pssm = (typeof options["with_pssm"] === "boolean" ? options["with_pssm"] : false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3010 if (!with_pspm && !with_pssm) with_pspm = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3011 if (with_header) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3012 if (typeof options["version"] === "string" && /^\d+(?:\.\d+){0,2}$/.test(options["version"])) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3013 version = options["version"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3014 } else if (typeof options["version"] === "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3015 version = options["version"].toFixed(0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3016 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3017 version = "4";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3018 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3019 if (typeof options["strands"] === "number" && options["strands"] === 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3020 strands = 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3021 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3022 strands = 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3023 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3024 if (typeof options["bg_source"] === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3025 bg_source = options["bg_source"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3026 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3027 bg_source = "unknown source";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3028 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3029 if (typeof options["alphabet"] === "object" && options["alphabet"] != null
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3030 && options["alphabet"] instanceof Alphabet) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3031 alphabet = options["alphabet"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3032 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3033 throw new Error("The alphabet is required to generate the header.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3034 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3035 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3036 // now create the output
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3037 out = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3038 if (with_header) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3039 out = "MEME version " + version + "\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3040 out += alphabet.as_meme() + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3041 if (alphabet.has_complement()) { // assume DNA has both strands unless otherwise specified
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3042 out += "strands: " + (strands === 1 ? "+" : "+ -") + "\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3043 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3044 out += "Background letter frequencies (from " + bg_source + "):\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3045 alen = alphabet.get_size_core();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3046 for (i = 0; i < alen; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3047 if (i !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3048 if (i % 9 === 0) { // maximum of nine entries per line
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3049 out += "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3050 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3051 out += " ";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3052 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3053 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3054 out += alphabet.get_symbol(i) + " " + alphabet.get_bg_freq(i).toFixed(3);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3055 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3056 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3057 out += "\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3058 out += "MOTIF " + this.name + (this.alt == null ? "" : " " + this.alt);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3059 if (with_pssm) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3060 out += "\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3061 out += this.as_pssm(options["alphabet"], options["pseudocount"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3062 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3063 if (with_pspm) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3064 out += "\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3065 out += this.as_pspm();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3066 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3067 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3068 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3069
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3070 Pspm.prototype.toString = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3071 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3072 var str, i, row;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3073 str = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3074 for (i = 0; i < this.pspm.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3075 row = this.pspm[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3076 str += row.join("\t") + "\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3077 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3078 return str;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3079 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3080
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3081 function parse_pspm_properties(str) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3082 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3083 var parts, i, eqpos, before, after, properties, prop, num, num_re;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3084 num_re = /^((?:[+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|inf)$/;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3085 parts = trim(str).split(/\s+/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3086 // split up words containing =
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3087 for (i = 0; i < parts.length;) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3088 eqpos = parts[i].indexOf("=");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3089 if (eqpos != -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3090 before = parts[i].substr(0, eqpos);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3091 after = parts[i].substr(eqpos+1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3092 if (before.length > 0 && after.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3093 parts.splice(i, 1, before, "=", after);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3094 i += 3;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3095 } else if (before.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3096 parts.splice(i, 1, before, "=");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3097 i += 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3098 } else if (after.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3099 parts.splice(i, 1, "=", after);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3100 i += 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3101 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3102 parts.splice(i, 1, "=");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3103 i++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3104 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3105 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3106 i++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3107 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3108 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3109 properties = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3110 for (i = 0; i < parts.length; i += 3) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3111 if (parts.length - i < 3) {
b386032d758d 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 PSPM property was incomplete. "+
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3113 "Remaing parts are: " + parts.slice(i).join(" "));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3114 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3115 if (parts[i+1] !== "=") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3116 throw new Error("Expected '=' in PSPM property between key and " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3117 "value but got " + parts[i+1]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3118 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3119 prop = parts[i].toLowerCase();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3120 num = parts[i+2];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3121 if (!num_re.test(num)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3122 throw new Error("Expected numeric value for PSPM property '" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3123 prop + "' but got '" + num + "'");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3124 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3125 properties[prop] = num;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3126 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3127 return properties;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3128 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3129
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3130 function parse_pspm_string(pspm_string) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3131 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3132 var header_re, lines, first_line, line_num, col_num, alph_length,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3133 motif_length, nsites, evalue, pspm, i, line, match, props, parts,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3134 j, prob;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3135 header_re = /^letter-probability\s+matrix:(.*)$/i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3136 lines = pspm_string.split(/\n/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3137 first_line = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3138 line_num = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3139 col_num = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3140 alph_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3141 motif_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3142 nsites;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3143 evalue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3144 pspm = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3145 for (i = 0; i < lines.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3146 line = trim(lines[i]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3147 if (line.length === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3148 continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3149 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3150 // check the first line for a header though allow matrices without it
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3151 if (first_line) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3152 first_line = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3153 match = header_re.exec(line);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3154 if (match !== null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3155 props = parse_pspm_properties(match[1]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3156 if (props.hasOwnProperty("alength")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3157 alph_length = parseFloat(props["alength"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3158 if (alph_length != 4 && alph_length != 20) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3159 throw new Error("PSPM property alength should be 4 or 20" +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3160 " but got " + alph_length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3161 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3162 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3163 if (props.hasOwnProperty("w")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3164 motif_length = parseFloat(props["w"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3165 if (motif_length % 1 !== 0 || motif_length < 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3166 throw new Error("PSPM property w should be an integer larger " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3167 "than zero but got " + motif_length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3168 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3169 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3170 if (props.hasOwnProperty("nsites")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3171 nsites = parseFloat(props["nsites"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3172 if (nsites <= 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3173 throw new Error("PSPM property nsites should be larger than " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3174 "zero but got " + nsites);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3175 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3176 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3177 if (props.hasOwnProperty("e")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3178 evalue = props["e"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3179 if (evalue < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3180 throw new Error("PSPM property evalue should be " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3181 "non-negative but got " + evalue);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3182 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3183 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3184 continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3185 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3186 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3187 pspm[line_num] = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3188 col_num = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3189 parts = line.split(/\s+/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3190 for (j = 0; j < parts.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3191 prob = parseFloat(parts[j]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3192 if (prob != parts[j] || prob < 0 || prob > 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3193 throw new Error("Expected probability but got '" + parts[j] + "'");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3194 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3195 pspm[line_num][col_num] = prob;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3196 col_num++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3197 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3198 line_num++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3199 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3200 if (typeof motif_length === "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3201 if (pspm.length != motif_length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3202 throw new Error("Expected PSPM to have a motif length of " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3203 motif_length + " but it was actually " + pspm.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3204 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3205 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3206 motif_length = pspm.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3207 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3208 if (typeof alph_length !== "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3209 alph_length = pspm[0].length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3210 if (alph_length != 4 && alph_length != 20) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3211 throw new Error("Expected length of first row in the PSPM to be " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3212 "either 4 or 20 but got " + alph_length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3213 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3214 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3215 for (i = 0; i < pspm.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3216 if (pspm[i].length != alph_length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3217 throw new Error("Expected PSPM row " + i + " to have a length of " +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3218 alph_length + " but the length was " + pspm[i].length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3219 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3220 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3221 return {"pspm": pspm, "motif_length": motif_length,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3222 "alph_length": alph_length, "nsites": nsites, "evalue": evalue};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3223 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3224 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3225 // end Pspm object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3226 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3227
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3228 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3229 // start Logo object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3230 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3231
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3232 var Logo = function(alphabet, options) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3233 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3234 this.alphabet = alphabet;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3235 this.fine_text = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3236 this.x_axis = 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3237 this.y_axis = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3238 this.xlate_nsyms = 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3239 this.xlate_start = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3240 this.xlate_end = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3241 this.pspm_list = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3242 this.pspm_column = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3243 this.rows = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3244 this.columns = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3245 if (typeof options === "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3246 // the old method signature had fine_text here so we support that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3247 this.fine_text = options;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3248 } else if (typeof options === "object" && options != null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3249 this.fine_text = (typeof options.fine_text === "string" ? options.fine_text : "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3250 this.x_axis = (typeof options.x_axis === "boolean" ? (options.x_axis ? 1 : 0) : 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3251 if (options.x_axis_hidden != null && options.x_axis_hidden) this.x_axis = -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3252 this.y_axis = (typeof options.y_axis === "boolean" ? options.y_axis : true);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3253 this.xlate_nsyms = (typeof options.xlate_nsyms === "number" ? options.xlate_nsyms : this.xlate_nsyms);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3254 this.xlate_start = (typeof options.xlate_start === "number" ? options.xlate_start : this.xlate_start);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3255 this.xlate_end = (typeof options.xlate_end === "number" ? options.xlate_end : this.xlate_end);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3256 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3257 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3258
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3259 Logo.prototype.add_pspm = function(pspm, column) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3260 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3261 var col;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3262 if (typeof column === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3263 column = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3264 } else if (column < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3265 throw new Error("Column index out of bounds.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3266 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3267 this.pspm_list[this.rows] = pspm;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3268 this.pspm_column[this.rows] = column;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3269 this.rows++;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3270 col = column + pspm.get_motif_length();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3271 if (col > this.columns) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3272 this.columns = col;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3273 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3274 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3275
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3276 Logo.prototype.get_columns = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3277 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3278 return this.columns;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3279 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3280
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3281 Logo.prototype.get_xlate_nsyms = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3282 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3283 return this.xlate_nsyms;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3284 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3285
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3286 Logo.prototype.get_xlate_start = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3287 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3288 return (this.xlate_start != null ? this.xlate_start : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3289 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3290
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3291 Logo.prototype.get_xlate_end = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3292 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3293 return (this.xlate_end != null ? this.xlate_end : this.columns * this.xlate_nsyms);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3294 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3295
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3296 Logo.prototype.get_xlate_columns = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3297 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3298 return this.get_xlate_end() - this.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3299 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3300
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3301 Logo.prototype.get_rows = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3302 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3303 return this.rows;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3304 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3305
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3306 Logo.prototype.get_pspm = function(row_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3307 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3308 if (row_index < 0 || row_index >= this.rows) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3309 throw new Error("INDEX_OUT_OF_BOUNDS");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3310 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3311 return this.pspm_list[row_index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3312 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3313
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3314 Logo.prototype.get_offset = function(row_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3315 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3316 if (row_index < 0 || row_index >= this.rows) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3317 throw new Error("INDEX_OUT_OF_BOUNDS");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3318 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3319 return this.pspm_column[row_index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3320 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3321
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3322 Logo.prototype._as_eps_data = function(ssc, errbars) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3323 var i, j, pos, stack_pos, pspm, stack, sym, out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3324 out = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3325 for (i = 0; i < this.rows; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3326 out += "\nStartLine\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3327 // Indent
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3328 for (j = 0; j < this.pspm_column[i]; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3329 out += "() startstack\nendstack\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3330 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3331 pspm = this.pspm_list[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3332 if (pspm.get_left_trim() > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3333 out += "MuteColour\nDrawTrimEdge\n" + pspm.get_left_trim() + " DrawTrimBg\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3334 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3335 for (pos = 0; pos < pspm.get_motif_length(); pos++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3336 if (pos != 0 && pos == pspm.get_left_trim()) { // enable full colour
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3337 out += "DrawTrimEdge\nRestoreColour\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3338 } else if (pos == (pspm.get_motif_length() - pspm.get_right_trim())) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3339 out += "MuteColour\n" + pspm.get_right_trim() + " DrawTrimBg\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3340 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3341 out += "(" + (pos + 1) + ") startstack\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3342 stack = pspm.get_stack(pos, this.alphabet, ssc);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3343 for (stack_pos = 0; stack_pos < stack.length; stack_pos++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3344 sym = stack[stack_pos];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3345 out += " " + (sym.get_scale() * this.alphabet.get_ic()) + " (" + sym.get_symbol() + ") numchar\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3346 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3347 if (errbars) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3348 out += " " + pspm.get_error(this.alphabet) + " Ibeam\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3349 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3350 out += "endstack\n\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3351 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3352 if (pspm.get_right_trim() > 0 || pspm.get_left_trim() == pspm.get_motif_length()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3353 out += "RestoreColour\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3354 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3355 out += "EndLine\n";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3356 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3357 return out;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3358 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3359
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3360 Logo.prototype.as_eps = function(options) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3361 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3362 if (this.xlate_nsyms != 1) throw new Error("Unsupported setting xlate_nsyms for EPS");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3363 if (this.xlate_start != null) throw new Error("Unsupported setting xlate_start for EPS");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3364 if (this.xlate_end != null) throw new Error("Unsupported setting xlate_end for EPS");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3365
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3366 var LOGOHEIGHT = 7.5; // default height of line in cm
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3367 var cm2pts, height, width, now, ssc, errbars;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3368 if (typeof options === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3369 options = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3370 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3371 cm2pts = 72 / 2.54;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3372 if (typeof options.logo_height == "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3373 height = options.logo_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3374 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3375 height = LOGOHEIGHT * this.rows;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3376 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3377 if (typeof options.logo_width == "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3378 width = options.logo_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3379 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3380 width = this.columns + 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3381 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3382 now = new Date();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3383 ssc = (typeof options.ssc == "boolean" ? options.ssc : false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3384 errbars = (typeof options.show_error_bar == "boolean" ? options.show_error_bar : ssc);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3385 var values = {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3386 "LOGOHEIGHT": height,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3387 "LOGOWIDTH": width,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3388 "BOUNDINGHEIGHT": Math.round(height * cm2pts),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3389 "BOUNDINGWIDTH": Math.round(width * cm2pts),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3390 "LOGOLINEHEIGHT": (height / this.rows),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3391 "CHARSPERLINE": this.columns,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3392 "BARBITS": this.alphabet.get_ic(),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3393 "LOGOTYPE": (this.alphabet.has_complement() ? "NA" : "AA"),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3394 "CREATIONDATE": now.getDate() + "." + (now.getMonth() + 1) + "." + now.getFullYear() + " " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds(),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3395 "ERRORBARFRACTION": (typeof options.error_bar_fraction == "number" ? options.error_bar_fraction : 1.0),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3396 "TICBITS": (typeof options.ticbits == "number" ? options.ticbits : 1.0),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3397 "TITLE": (typeof options.title == "string" ? options.title : ""),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3398 "FINEPRINT": (typeof options.fineprint == "string" ? options.fineprint : this.fine_text),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3399 "XAXISLABEL": (typeof options.xaxislabel == "string" ? options.xaxislabel : ""),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3400 "YAXISLABEL": (typeof options.yaxislabel == "string" ? options.yaxislabel : "bits"),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3401 "SSC": ssc,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3402 "YAXIS": (typeof options.show_y_axis == "boolean" ? options.show_y_axis : this.y_axis),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3403 "SHOWENDS": (typeof options.show_ends == "boolean" ? options.show_ends : false),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3404 "ERRBAR": errbars,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3405 "OUTLINE": (typeof options.show_outline == "boolean" ? options.show_outline : false),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3406 "NUMBERING": (typeof options.show_numbering == "boolean" ? options.show_numbering : this.x_axis != 0),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3407 "SHOWINGBOX": (typeof options.show_box == "boolean" ? options.show_box : false),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3408 "CREATOR": (typeof options.creator == "string" ? options.creator : "motif_logo.js"),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3409 "FONTSIZE": (typeof options.label_font_size == "number" ? options.label_font_size : 12),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3410 "TITLEFONTSIZE": (typeof options.title_font_size == "number" ? options.title_font_size : 12),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3411 "SMALLFONTSIZE": (typeof options.small_font_size == "number" ? options.small_font_size : 6),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3412 "TOPMARGIN" : (typeof options.top_margin == "number" ? options.top_margin : 0.9),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3413 "BOTTOMMARGIN": (typeof options.bottom_margin == "number" ? options.bottom_margin : 0.9),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3414 "COLORDICT": this.alphabet._as_eps_dict(),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3415 "DATA": this._as_eps_data(ssc, errbars)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3416 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3417 // now this requires that the script containing the template has been imported!
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3418 return motif_logo_template(values);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3419 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3420
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3421 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3422 // end Logo object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3423 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3424
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3425 // calculate the exact size (in pixels) of an object drawn on the
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3426 // canvas assuming that the background of the canvas is transparent.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3427 function canvas_bounds(ctx, cwidth, cheight) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3428 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3429 var data, r, c, top_line, bottom_line, left_line, right_line,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3430 txt_width, txt_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3431
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3432 // extract the image data
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3433 data = ctx.getImageData(0, 0, cwidth, cheight).data;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3434
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3435 // set initial values
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3436 top_line = -1; bottom_line = -1; left_line = -1; right_line = -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3437 txt_width = 0; txt_height = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3438
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3439 // Find the top-most line with a non-transparent pixel
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3440 for (r = 0; r < cheight; r++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3441 for (c = 0; c < cwidth; c++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3442 if (data[r * cwidth * 4 + c * 4 + 3]) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3443 top_line = r;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3444 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3445 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3446 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3447 if (top_line != -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3448 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3449 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3450 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3451
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3452 // Only bother looking if we found at least one set pixel...
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3453 if (top_line != -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3454
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3455 //find the last line with a non-transparent pixel
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3456 for (r = cheight-1; r >= top_line; r--) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3457 for(c = 0; c < cwidth; c++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3458 if(data[r * cwidth * 4 + c * 4 + 3]) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3459 bottom_line = r;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3460 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3461 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3462 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3463 if (bottom_line != -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3464 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3465 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3466 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3467 // calculate height
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3468 txt_height = bottom_line - top_line + 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3469
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3470 // Find the left-most line with a non-transparent pixel
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3471 for (c = 0; c < cwidth; c++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3472 for (r = top_line; r <= bottom_line; r++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3473 if (data[r * cwidth * 4 + c * 4 + 3]) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3474 left_line = c;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3475 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3476 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3477 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3478 if (left_line != -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3479 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3480 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3481 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3482
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3483 //find the right most line with a non-transparent pixel
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3484 for (c = cwidth-1; c >= left_line; c--) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3485 for(r = top_line; r <= bottom_line; r++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3486 if(data[r * cwidth * 4 + c * 4 + 3]) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3487 right_line = c;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3488 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3489 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3490 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3491 if (right_line != -1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3492 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3493 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3494 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3495 txt_width = right_line - left_line + 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3496 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3497
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3498 //return the bounds
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3499 return {bound_top: top_line, bound_bottom: bottom_line,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3500 bound_left: left_line, bound_right: right_line, width: txt_width,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3501 height: txt_height};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3502 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3503
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3504 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3505 // start RasterizedAlphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3506 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3507
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3508 // Rasterize Alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3509 // 1) Measure width of text at default font for all symbols in alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3510 // 2) sort in width ascending
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3511 // 3) Drop the top and bottom 10% (designed to ignore outliers like 'W' and 'I')
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3512 // 4) Calculate the average as the maximum scaling factor (designed to stop I becoming a rectangular blob).
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3513 // 5) Assume scale of zero would result in width of zero, interpolate scale required to make perfect width font
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3514 // 6) Draw text onto temp canvas at calculated scale
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3515 // 7) Find bounds of drawn text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3516 // 8) Paint on to another canvas at the desired height (but only scaling width to fit if larger).
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3517 var RasterizedAlphabet = function(alphabet, logo_scale, font, width) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3518 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3519 var default_size, safety_pad, canvas, ctx, middle, baseline, widths, sizes,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3520 i, sym, size, tenpercent, avg_width, scale,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3521 target_width, target_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3522 //variable prototypes
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3523 this.alphabet = alphabet;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3524 this.scale = logo_scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3525 this.sym_cache = {};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3526 this.stack_num_cache = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3527 this.scale_num_cache = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3528 // size of canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3529 default_size = 60; // size of measuring canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3530 safety_pad = 20; // pixels to pad around so we don't miss the edges
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3531 // create a canvas to do our measuring
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3532 canvas = document.createElement("canvas");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3533 if (!canvas.getContext) throw new Error("No canvas support");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3534 canvas.width = default_size + 2 * safety_pad;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3535 canvas.height = default_size + 2 * safety_pad;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3536 middle = Math.round(canvas.width / 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3537 baseline = Math.round(canvas.height - safety_pad);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3538 ctx = canvas.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3539 if (!supports_text(ctx)) throw new Error("Canvas does not support text");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3540 ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3541 ctx.textAlign = "center";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3542 ctx.translate(middle, baseline);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3543 // list of widths
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3544 widths = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3545 sizes = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3546 //now measure each letter in the alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3547 for (i = 0; i < alphabet.get_size_core(); ++i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3548 // reset the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3549 ctx.clearRect(0, 0, canvas.width, canvas.height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3550 ctx.fillStyle = alphabet.get_colour(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3551 // draw the test text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3552 ctx.fillText(alphabet.get_symbol(i), 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3553 //measure
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3554 size = canvas_bounds(ctx, canvas.width, canvas.height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3555 if (size.width === 0) throw new Error("Invisible symbol!");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3556 widths.push(size.width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3557 sizes[i] = size;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3558 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3559 //sort the widths
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3560 widths.sort(function(a,b) {return a - b;});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3561 //drop 10% of the items off each end
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3562 tenpercent = Math.floor(widths.length / 10);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3563 for (i = 0; i < tenpercent; ++i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3564 widths.pop();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3565 widths.shift();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3566 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3567 //calculate average width
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3568 avg_width = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3569 for (i = 0; i < widths.length; ++i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3570 avg_width += widths[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3571 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3572 avg_width /= widths.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3573 // calculate the target width
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3574 target_width = width * this.scale * 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3575 // calculate scales
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3576 for (i = 0; i < alphabet.get_size_core(); ++i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3577 sym = alphabet.get_symbol(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3578 size = sizes[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3579 // calculate scale
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3580 scale = target_width / Math.max(avg_width, size.width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3581 // estimate scaled height
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3582 target_height = size.height * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3583 // create an appropriately sized canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3584 canvas = document.createElement("canvas");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3585 canvas.width = target_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3586 canvas.height = target_height + safety_pad * 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3587 // calculate the middle
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3588 middle = Math.round(canvas.width / 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3589 // calculate the baseline
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3590 baseline = Math.round(canvas.height - safety_pad);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3591 // get the context and prepare to draw the rasterized text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3592 ctx = canvas.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3593 ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3594 ctx.fillStyle = alphabet.get_colour(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3595 ctx.textAlign = "center";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3596 ctx.translate(middle, baseline);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3597 ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3598 ctx.scale(scale, scale);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3599 // draw the text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3600 ctx.fillText(sym, 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3601 ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3602 this.sym_cache[sym] = {"image": canvas, "size": canvas_bounds(ctx, canvas.width, canvas.height)};
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3603 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3604 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3605
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3606 RasterizedAlphabet.prototype.get_alphabet = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3607 return this.alphabet;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3608 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3609
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3610 RasterizedAlphabet.prototype.get_scale = function() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3611 return this.scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3612 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3613
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3614 RasterizedAlphabet.prototype.draw_stack_sym = function(ctx, letter, dx, dy, dWidth, dHeight) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3615 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3616 var entry, image, size;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3617 entry = this.sym_cache[letter];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3618 image = entry.image;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3619 size = entry.size;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3620 ctx.drawImage(image, 0, size.bound_top -1, image.width, size.height+1, dx, dy, dWidth, dHeight);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3621 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3622
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3623 RasterizedAlphabet.prototype.draw_stack_num = function(ctx, font, stack_width, index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3624 var image, image_ctx, text_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3625 if (index >= this.stack_num_cache.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3626 image = document.createElement("canvas");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3627 // measure the text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3628 image_ctx = image.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3629 image_ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3630 image_ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3631 text_length = image_ctx.measureText("" + (index + 1)).width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3632 image_ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3633 // resize the canvas to fit
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3634 image.width = Math.ceil(stack_width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3635 image.height = Math.ceil(text_length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3636 // draw the text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3637 image_ctx = image.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3638 image_ctx.translate(Math.round(stack_width / 2), 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3639 image_ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3640 image_ctx.textBaseline = "middle";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3641 image_ctx.textAlign = "right";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3642 image_ctx.rotate(-(Math.PI / 2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3643 image_ctx.fillText("" + (index + 1), 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3644 this.stack_num_cache[index] = image;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3645 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3646 image = this.stack_num_cache[index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3647 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3648 ctx.drawImage(image, 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3649 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3650
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3651 RasterizedAlphabet.prototype.draw_scale_num = function(ctx, font, num) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3652 var image, image_ctx, text_size, m_length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3653 if (num >= this.scale_num_cache.length) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3654 image = document.createElement("canvas");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3655 // measure the text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3656 image_ctx = image.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3657 image_ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3658 text_size = image_ctx.measureText("" + num);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3659 if (text_size.actualBoundingBoxAscent && text_size.actualBoundingBoxDesent) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3660 // resize the canvas to fit
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3661 image.width = Math.ceil(text_size.width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3662 image.height = Math.ceil(text_size.actualBoundingBoxAscent + text_size.actualBoundingBoxDesent);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3663 // draw the text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3664 image_ctx = image.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3665 image_ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3666 image_ctx.textAlign = "right";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3667 image_ctx.fillText("" + num, image.width, text_size.actualBoundingBoxAscent);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3668 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3669 // measure width of 'm' to approximate height, we double it later anyway
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3670 m_length = image_ctx.measureText("m").width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3671 // resize the canvas to fit
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3672 image.width = Math.ceil(text_size.width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3673 image.height = Math.ceil(2 * m_length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3674 // draw the text
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3675 image_ctx = image.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3676 image_ctx.font = font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3677 image_ctx.textAlign = "right";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3678 image_ctx.textBaseline = "middle";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3679 image_ctx.fillText("" + num, image.width, m_length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3680 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3681 this.scale_num_cache[num] = image;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3682 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3683 image = this.scale_num_cache[num];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3684 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3685 ctx.drawImage(image, -image.width, -Math.round(image.height / 2))
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3686 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3687
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3688 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3689 // end RasterizedAlphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3690 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3691
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3692 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3693 // start LogoMetrics object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3694 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3695
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3696 var LogoMetrics = function(ctx, logo_columns, logo_rows, has_names, has_finetext, x_axis, y_axis) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3697 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3698 var i, row_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3699 //variable prototypes
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3700 this.pad_top = (has_names ? 5 : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3701 this.pad_left = (y_axis ? 10 : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3702 this.pad_right = (has_finetext ? 15 : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3703 this.pad_bottom = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3704 this.pad_middle = 20;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3705 this.name_height = 14;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3706 this.name_font = "bold " + this.name_height + "px Times, sans-serif";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3707 this.name_spacer = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3708 this.y_axis = y_axis;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3709 this.y_label = "bits";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3710 this.y_label_height = 12;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3711 this.y_label_font = "bold " + this.y_label_height + "px Helvetica, sans-serif";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3712 this.y_label_spacer = 3;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3713 this.y_num_height = 12;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3714 this.y_num_width = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3715 this.y_num_font = "bold " + this.y_num_height + "px Helvetica, sans-serif";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3716 this.y_tic_width = 5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3717 this.stack_pad_left = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3718 this.stack_font = "bold 25px Helvetica, sans-serif";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3719 this.stack_height = 90;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3720 this.stack_width = 26;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3721 this.stacks_pad_right = 5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3722 this.x_axis = x_axis;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3723 this.x_num_above = 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3724 this.x_num_height = 12;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3725 this.x_num_width = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3726 this.x_num_font = "bold " + this.x_num_height + "px Helvetica, sans-serif";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3727 this.fine_txt_height = 6;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3728 this.fine_txt_above = 2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3729 this.fine_txt_font = "normal " + this.fine_txt_height + "px Helvetica, sans-serif";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3730 this.letter_metrics = new Array();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3731 this.summed_width = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3732 this.summed_height = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3733 //calculate the width of the y axis numbers
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3734 ctx.font = this.y_num_font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3735 for (i = 0; i <= 2; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3736 this.y_num_width = Math.max(this.y_num_width, ctx.measureText("" + i).width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3737 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3738 //calculate the width of the x axis numbers (but they are rotated so it becomes height)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3739 if (x_axis == 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3740 ctx.font = this.x_num_font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3741 for (i = 1; i <= logo_columns; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3742 this.x_num_width = Math.max(this.x_num_width, ctx.measureText("" + i).width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3743 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3744 } else if (x_axis == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3745 this.x_num_height = 4;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3746 this.x_num_width = 4;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3747 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3748 this.x_num_height = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3749 this.x_num_width = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3750 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3751
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3752 //calculate how much vertical space we want to draw this
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3753 //first we add the padding at the top and bottom since that's always there
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3754 this.summed_height += this.pad_top + this.pad_bottom;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3755 //all except the last row have the same amount of space allocated to them
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3756 if (logo_rows > 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3757 row_height = this.stack_height + this.pad_middle;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3758 if (has_names) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3759 row_height += this.name_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3760 //the label is allowed to overlap into the spacer
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3761 row_height += Math.max(this.y_num_height/2, this.name_spacer);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3762 //the label is allowed to overlap the space used by the other label
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3763 row_height += Math.max(this.y_num_height/2, this.x_num_height + this.x_num_above);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3764 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3765 row_height += this.y_num_height/2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3766 //the label is allowed to overlap the space used by the other label
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3767 row_height += Math.max(this.y_num_height/2, this.x_num_height + this.x_num_above);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3768 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3769 this.summed_height += row_height * (logo_rows - 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3770 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3771 //the last row has the name and fine text below it but no padding
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3772 this.summed_height += this.stack_height + (this.y_axis ? this.y_num_height/2 : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3773
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3774 var fine_txt_total = (has_finetext ? this.fine_txt_height + this.fine_txt_above : 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3775 if (has_names) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3776 this.summed_height += fine_txt_total + this.name_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3777 this.summed_height += Math.max((this.y_axis ? this.y_num_height/2 : 0),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3778 this.x_num_height + this.x_num_above + this.name_spacer);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3779 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3780 this.summed_height += Math.max((this.y_axis ? this.y_num_height/2 : 0),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3781 this.x_num_height + this.x_num_above + fine_txt_total);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3782 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3783
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3784 //calculate how much horizontal space we want to draw this
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3785 //first add the padding at the left and right since that's always there
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3786 this.summed_width += this.pad_left + this.pad_right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3787 if (this.y_axis) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3788 //add on the space for the y-axis label
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3789 this.summed_width += this.y_label_height + this.y_label_spacer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3790 //add on the space for the y-axis
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3791 this.summed_width += this.y_num_width + this.y_tic_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3792 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3793 //add on the space for the stacks
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3794 this.summed_width += (this.stack_pad_left + this.stack_width) * logo_columns;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3795 //add on the padding after the stacks (an offset from the fine text)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3796 this.summed_width += this.stacks_pad_right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3797
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3798 };
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3799
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3800 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3801 // end LogoMetrics object
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3802 //======================================================================
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3803
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3804 //found this trick at http://talideon.com/weblog/2005/02/detecting-broken-images-js.cfm
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3805 function image_ok(img) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3806 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3807 // During the onload event, IE correctly identifies any images that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3808 // weren't downloaded as not complete. Others should too. Gecko-based
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3809 // browsers act like NS4 in that they report this incorrectly.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3810 if (!img.complete) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3811 return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3812 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3813 // However, they do have two very useful properties: naturalWidth and
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3814 // naturalHeight. These give the true size of the image. If it failed
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3815 // to load, either of these should be zero.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3816 if (typeof img.naturalWidth !== "undefined" && img.naturalWidth === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3817 return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3818 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3819 // No other way of checking: assume it's ok.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3820 return true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3821 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3822
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3823 function supports_text(ctx) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3824 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3825 if (!ctx.fillText) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3826 return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3827 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3828 if (!ctx.measureText) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3829 return false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3830 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3831 return true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3832 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3833
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3834 //draws the scale, returns the width
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3835 function draw_scale(ctx, metrics, alphabet_ic, raster) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3836 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3837 var tic_height, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3838 tic_height = metrics.stack_height / alphabet_ic;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3839 ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3840 ctx.translate(metrics.y_label_height, metrics.y_num_height/2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3841 //draw the axis label
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3842 ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3843 ctx.font = metrics.y_label_font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3844 ctx.translate(0, metrics.stack_height/2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3845 ctx.rotate(-(Math.PI / 2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3846 ctx.textAlign = "center";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3847 ctx.fillText("bits", 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3848 ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3849
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3850 ctx.translate(metrics.y_label_spacer + metrics.y_num_width, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3851
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3852 //draw the axis tics
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3853 ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3854 ctx.translate(0, metrics.stack_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3855 for (i = 0; i <= alphabet_ic; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3856 //draw the number
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3857 ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3858 ctx.translate(-1, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3859 raster.draw_scale_num(ctx, metrics.y_num_font, i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3860 ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3861 //draw the tic
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3862 ctx.fillRect(0, -1, metrics.y_tic_width, 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3863 //prepare for next tic
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3864 ctx.translate(0, -tic_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3865 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3866 ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3867
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3868 ctx.fillRect(metrics.y_tic_width - 2, 0, 2, metrics.stack_height)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3869
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3870 ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3871 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3872
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3873 function draw_stack_num(ctx, metrics, row_index, raster) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3874 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3875 ctx.save();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3876 ctx.translate(0, Math.round(metrics.stack_height + metrics.x_num_above));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3877 if (metrics.x_axis == 1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3878 raster.draw_stack_num(ctx, metrics.x_num_font, metrics.stack_width, row_index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3879 } else if (metrics.x_axis == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3880 // draw dots instead of the numbers (good for small logos)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3881 ctx.beginPath();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3882 var radius = Math.round(metrics.x_num_height / 2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3883 ctx.arc(Math.round(metrics.stack_width / 2), radius, radius, 0, 2 * Math.PI, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3884 ctx.fill();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3885 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3886 ctx.restore();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3887 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3888
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3889 function draw_stack(ctx, metrics, symbols, raster) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3890 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3891 var preferred_pad, sym_min, i, sym, sym_height, pad;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3892 preferred_pad = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3893 sym_min = 5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3894
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3895 ctx.save();//1
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3896 ctx.translate(0, metrics.stack_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3897 for (i = 0; i < symbols.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3898 sym = symbols[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3899 sym_height = metrics.stack_height * sym.get_scale();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3900
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3901 pad = preferred_pad;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3902 if (sym_height - pad < sym_min) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3903 pad = Math.min(pad, Math.max(0, sym_height - sym_min));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3904 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3905 sym_height -= pad;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3906
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3907 //translate to the correct position
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3908 ctx.translate(0, -(pad/2 + sym_height));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3909
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3910 //draw
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3911 raster.draw_stack_sym(ctx, sym.get_symbol(), 0, 0, metrics.stack_width, sym_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3912 //translate past the padding
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3913 ctx.translate(0, -(pad/2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3914 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3915 ctx.restore();//1
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3916 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3917
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3918 function draw_dashed_line(ctx, pattern, start, x1, y1, x2, y2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3919 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3920 var x, y, len, i, dx, dy, tlen, theta, mulx, muly, lx, ly;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3921 dx = x2 - x1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3922 dy = y2 - y1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3923 tlen = Math.pow(dx*dx + dy*dy, 0.5);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3924 theta = Math.atan2(dy,dx);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3925 mulx = Math.cos(theta);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3926 muly = Math.sin(theta);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3927 lx = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3928 ly = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3929 for (i = 0; i < pattern; ++i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3930 lx.push(pattern[i] * mulx);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3931 ly.push(pattern[i] * muly);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3932 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3933 i = start;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3934 x = x1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3935 y = y1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3936 len = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3937 ctx.beginPath();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3938 while (len + pattern[i] < tlen) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3939 ctx.moveTo(x, y);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3940 x += lx[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3941 y += ly[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3942 ctx.lineTo(x, y);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3943 len += pattern[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3944 i = (i + 1) % pattern.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3945 x += lx[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3946 y += ly[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3947 len += pattern[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3948 i = (i + 1) % pattern.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3949 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3950 if (len < tlen) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3951 ctx.moveTo(x, y);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3952 x += mulx * (tlen - len);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3953 y += muly * (tlen - len);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3954 ctx.lineTo(x, y);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3955 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3956 ctx.stroke();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3957 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3958
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3959 function draw_trim_background(ctx, metrics, left_start, left_end, left_divider, right_start, right_end, right_divider) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3960 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3961 var left_size = left_end - left_start;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3962 var right_size = right_end - right_start;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3963 var line_x;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3964
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3965 ctx.save();//s8
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3966 ctx.fillStyle = "rgb(240, 240, 240)";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3967 if (left_size > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3968 ctx.fillRect(left_start * metrics.stack_width, 0, left_size * metrics.stack_width, metrics.stack_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3969 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3970 if (right_size > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3971 ctx.fillRect(right_start * metrics.stack_width, 0, right_size * metrics.stack_width, metrics.stack_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3972 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3973 ctx.fillStyle = "rgb(51, 51, 51)";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3974 if (left_size > 0 && left_divider) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3975 line_x = (left_end * metrics.stack_width) - 0.5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3976 draw_dashed_line(ctx, [3], 0, line_x, 0, line_x, metrics.stack_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3977 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3978 if (right_size > 0 && right_divider) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3979 line_x = (right_start * metrics.stack_width) + 0.5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3980 draw_dashed_line(ctx, [3], 0, line_x, 0, line_x, metrics.stack_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3981 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3982 ctx.restore();//s8
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3983 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3984
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3985 function size_logo_on_canvas(logo, canvas, show_names, scale) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3986 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3987 var draw_name, draw_finetext, metrics;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3988 draw_name = (typeof show_names === "boolean" ? show_names : (logo.get_rows() > 1));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3989 draw_finetext = (logo.fine_text.length > 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3990 if (canvas.width !== 0 && canvas.height !== 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3991 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3992 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3993 metrics = new LogoMetrics(canvas.getContext('2d'),
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3994 logo.get_xlate_columns(), logo.get_rows(), draw_name, draw_finetext, logo.x_axis, logo.y_axis);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3995 if (typeof scale == "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3996 //resize the canvas to fit the scaled logo
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3997 canvas.width = metrics.summed_width * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3998 canvas.height = metrics.summed_height * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
3999 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4000 if (canvas.width === 0 && canvas.height === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4001 canvas.width = metrics.summed_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4002 canvas.height = metrics.summed_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4003 } else if (canvas.width === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4004 canvas.width = metrics.summed_width * (canvas.height / metrics.summed_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4005 } else if (canvas.height === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4006 canvas.height = metrics.summed_height * (canvas.width / metrics.summed_width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4007 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4008 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4009 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4010
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4011 function draw_logo_on_canvas(logo, canvas, show_names, scale) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4012 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4013 var i, draw_name, draw_finetext, ctx, metrics, raster, pspm_i, pspm,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4014 offset, col_index, motif_position, ssc;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4015 ssc = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4016 draw_name = (typeof show_names === "boolean" ? show_names : (logo.get_rows() > 1));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4017 draw_finetext = (logo.fine_text.length > 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4018 ctx = canvas.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4019 //assume that the user wants the canvas scaled equally so calculate what the best width for this image should be
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4020 metrics = new LogoMetrics(ctx, logo.get_xlate_columns(), logo.get_rows(), draw_name, draw_finetext, logo.x_axis, logo.y_axis);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4021 if (typeof scale == "number") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4022 //resize the canvas to fit the scaled logo
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4023 canvas.width = metrics.summed_width * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4024 canvas.height = metrics.summed_height * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4025 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4026 if (canvas.width === 0 && canvas.height === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4027 scale = 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4028 canvas.width = metrics.summed_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4029 canvas.height = metrics.summed_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4030 } else if (canvas.width === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4031 scale = canvas.height / metrics.summed_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4032 canvas.width = metrics.summed_width * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4033 } else if (canvas.height === 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4034 scale = canvas.width / metrics.summed_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4035 canvas.height = metrics.summed_height * scale;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4036 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4037 scale = Math.min(canvas.width / metrics.summed_width, canvas.height / metrics.summed_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4038 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4039 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4040 // cache the raster based on the assumption that we will be drawing a lot
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4041 // of logos the same size and alphabet
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4042 if (typeof draw_logo_on_canvas.raster_cache === "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4043 draw_logo_on_canvas.raster_cache = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4044 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4045 for (i = 0; i < draw_logo_on_canvas.raster_cache.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4046 raster = draw_logo_on_canvas.raster_cache[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4047 if (raster.get_alphabet().equals(logo.alphabet) &&
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4048 Math.abs(raster.get_scale() - scale) < 0.1) break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4049 raster = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4050 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4051 if (raster == null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4052 raster = new RasterizedAlphabet(logo.alphabet, scale, metrics.stack_font, metrics.stack_width);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4053 draw_logo_on_canvas.raster_cache.push(raster);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4054 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4055 ctx = canvas.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4056 ctx.save();//s1
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4057 ctx.scale(scale, scale);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4058 ctx.save();//s2
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4059 ctx.save();//s7
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4060 //create margin
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4061 ctx.translate(Math.round(metrics.pad_left), Math.round(metrics.pad_top));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4062 for (pspm_i = 0; pspm_i < logo.get_rows(); ++pspm_i) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4063 pspm = logo.get_pspm(pspm_i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4064 offset = logo.get_offset(pspm_i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4065 //optionally draw name if this isn't the last row or is the only row
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4066 if (draw_name && (logo.get_rows() == 1 || pspm_i != (logo.get_rows()-1))) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4067 ctx.save();//s4
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4068 ctx.translate(Math.round(metrics.summed_width/2), Math.round(metrics.name_height));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4069 ctx.font = metrics.name_font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4070 ctx.textAlign = "center";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4071 ctx.fillText(pspm.name, 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4072 ctx.restore();//s4
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4073 ctx.translate(0, Math.round(metrics.name_height +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4074 Math.min(0, metrics.name_spacer - metrics.y_num_height/2)));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4075 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4076 //draw scale
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4077 if (logo.y_axis) draw_scale(ctx, metrics, logo.alphabet.get_ic(), raster);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4078 ctx.save();//s5
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4079 //translate across past the scale
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4080 if (logo.y_axis) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4081 ctx.translate(Math.round(metrics.y_label_height + metrics.y_label_spacer +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4082 metrics.y_num_width + metrics.y_tic_width), Math.round(metrics.y_num_height / 2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4083 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4084 //draw the trimming background
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4085 if (pspm.get_left_trim() > 0 || pspm.get_right_trim() > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4086 var left_start = offset * logo.get_xlate_nsyms();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4087 var left_end = (offset + pspm.get_left_trim()) * logo.get_xlate_nsyms();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4088 var left_divider = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4089 if (left_end < logo.get_xlate_start() || left_start > logo.get_xlate_end()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4090 // no overlap
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4091 left_start = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4092 left_end = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4093 left_divider = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4094 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4095 if (left_start < logo.get_xlate_start()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4096 left_start = logo.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4097 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4098 if (left_end > logo.get_xlate_end()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4099 left_end = logo.get_xlate_end();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4100 left_divider = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4101 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4102 left_start -= logo.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4103 left_end -= logo.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4104 if (left_end < left_start) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4105 left_start = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4106 left_end = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4107 left_divider = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4108 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4109 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4110 var right_end = (offset + pspm.get_motif_length()) * logo.get_xlate_nsyms();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4111 //var right_start = right_end - (pspm.get_left_trim() * logo.get_xlate_nsyms());
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4112 var right_start = right_end - (pspm.get_right_trim() * logo.get_xlate_nsyms());
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4113 var right_divider = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4114 if (right_end < logo.get_xlate_start() || right_start > logo.get_xlate_end()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4115 // no overlap
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4116 right_start = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4117 right_end = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4118 right_divider = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4119 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4120 if (right_start < logo.get_xlate_start()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4121 right_start = logo.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4122 right_divider = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4123 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4124 if (right_end > logo.get_xlate_end()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4125 right_end = logo.get_xlate_end();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4126 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4127 right_start -= logo.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4128 right_end -= logo.get_xlate_start();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4129 if (right_end < right_start) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4130 right_start = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4131 right_end = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4132 right_divider = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4133 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4134 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4135 draw_trim_background(ctx, metrics, left_start, left_end, left_divider, right_start, right_end, right_divider);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4136 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4137 //draw letters
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4138 var xlate_col;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4139 for (xlate_col = logo.get_xlate_start(); xlate_col < logo.get_xlate_end(); xlate_col++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4140 ctx.translate(metrics.stack_pad_left,0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4141 col_index = Math.floor(xlate_col / logo.get_xlate_nsyms());
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4142 if (xlate_col % logo.get_xlate_nsyms() == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4143 if (col_index >= offset && col_index < (offset + pspm.get_motif_length())) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4144 motif_position = col_index - offset;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4145 draw_stack_num(ctx, metrics, motif_position, raster);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4146 draw_stack(ctx, metrics, pspm.get_stack(motif_position, logo.alphabet, ssc), raster);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4147 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4148 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4149 if (col_index >= offset && col_index < (offset + pspm.get_motif_length())) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4150 ctx.save();// s5.1
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4151 ctx.translate(0, Math.round(metrics.stack_height));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4152 // TODO draw a dot or dash or something to indicate continuity of the motif
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4153 ctx.restore(); //s5.1
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4154 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4155 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4156 ctx.translate(Math.round(metrics.stack_width), 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4157 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4158 ctx.restore();//s5
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4159 ////optionally draw name if this is the last row but isn't the only row
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4160 if (draw_name && (logo.get_rows() != 1 && pspm_i == (logo.get_rows()-1))) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4161 //translate vertically past the stack and axis's
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4162 ctx.translate(0, metrics.y_num_height/2 + metrics.stack_height +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4163 Math.max(metrics.y_num_height/2, metrics.x_num_above + metrics.x_num_width + metrics.name_spacer));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4164
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4165 ctx.save();//s6
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4166 ctx.translate(metrics.summed_width/2, metrics.name_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4167 ctx.font = metrics.name_font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4168 ctx.textAlign = "center";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4169 ctx.fillText(pspm.name, 0, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4170 ctx.restore();//s6
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4171 ctx.translate(0, metrics.name_height);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4172 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4173 //translate vertically past the stack and axis's
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4174 ctx.translate(0, metrics.y_num_height/2 + metrics.stack_height +
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4175 Math.max(metrics.y_num_height/2, metrics.x_num_above + metrics.x_num_width));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4176 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4177 //if not the last row then add middle padding
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4178 if (pspm_i != (logo.get_rows() -1)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4179 ctx.translate(0, metrics.pad_middle);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4180 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4181 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4182 ctx.restore();//s7
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4183 if (logo.fine_text.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4184 ctx.translate(metrics.summed_width - metrics.pad_right, metrics.summed_height - metrics.pad_bottom);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4185 ctx.font = metrics.fine_txt_font;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4186 ctx.textAlign = "right";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4187 ctx.fillText(logo.fine_text, 0,0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4188 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4189 ctx.restore();//s2
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4190 ctx.restore();//s1
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4191 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4192
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4193 function create_canvas(c_width, c_height, c_id, c_title, c_display) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4194 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4195 var canvas = document.createElement("canvas");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4196 //check for canvas support before attempting anything
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4197 if (!canvas.getContext) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4198 return null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4199 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4200 var ctx = canvas.getContext('2d');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4201 //check for html5 text drawing support
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4202 if (!supports_text(ctx)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4203 return null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4204 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4205 //size the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4206 canvas.width = c_width;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4207 canvas.height = c_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4208 canvas.id = c_id;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4209 canvas.title = c_title;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4210 canvas.style.display = c_display;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4211 return canvas;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4212 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4213
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4214 function logo_1(alphabet, fine_text, pspm) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4215 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4216 var logo = new Logo(alphabet, fine_text);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4217 logo.add_pspm(pspm);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4218 return logo;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4219 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4220
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4221 function logo_2(alphabet, fine_text, target, query, query_offset) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4222 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4223 var logo = new Logo(alphabet, fine_text);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4224 if (query_offset < 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4225 logo.add_pspm(target, -query_offset);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4226 logo.add_pspm(query);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4227 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4228 logo.add_pspm(target);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4229 logo.add_pspm(query, query_offset);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4230 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4231 return logo;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4232 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4233
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4234 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4235 * Specifies an alternate source for an image.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4236 * If the image with the image_id specified has
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4237 * not loaded then a generated logo will be used
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4238 * to replace it.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4239 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4240 * Note that the image must either have dimensions
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4241 * or a scale must be set.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4242 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4243 function alternate_logo(logo, image_id, scale) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4244 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4245 var image = document.getElementById(image_id);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4246 if (!image) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4247 alert("Can't find specified image id (" + image_id + ")");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4248 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4249 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4250 //if the image has loaded then there is no reason to use the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4251 if (image_ok(image)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4252 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4253 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4254 //the image has failed to load so replace it with a canvas if we can.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4255 var canvas = create_canvas(image.width, image.height, image_id, image.title, image.style.display);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4256 if (canvas === null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4257 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4258 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4259 //draw the logo on the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4260 draw_logo_on_canvas(logo, canvas, null, scale);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4261 //replace the image with the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4262 image.parentNode.replaceChild(canvas, image);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4263 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4264
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4265 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4266 * Specifes that the element with the specified id
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4267 * should be replaced with a generated logo.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4268 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4269 function replace_logo(logo, replace_id, scale, title_txt, display_style) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4270 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4271 var element = document.getElementById(replace_id);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4272 if (!replace_id) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4273 alert("Can't find specified id (" + replace_id + ")");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4274 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4275 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4276 //found the element!
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4277 var canvas = create_canvas(50, 120, replace_id, title_txt, display_style);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4278 if (canvas === null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4279 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4280 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4281 //draw the logo on the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4282 draw_logo_on_canvas(logo, canvas, null, scale);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4283 //replace the element with the canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4284 element.parentNode.replaceChild(canvas, element);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4285 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4286
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4287 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4288 * Fast string trimming implementation found at
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4289 * http://blog.stevenlevithan.com/archives/faster-trim-javascript
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4290 *
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4291 * Note that regex is good at removing leading space but
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4292 * bad at removing trailing space as it has to first go through
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4293 * the whole string.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4294 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4295 function trim (str) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4296 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4297 var ws, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4298 str = str.replace(/^\s\s*/, '');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4299 ws = /\s/; i = str.length;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4300 while (ws.test(str.charAt(--i)));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4301 return str.slice(0, i + 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4302 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4303 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4304 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4305 var current_motif = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4306 var dreme_alphabet = new Alphabet(data.alphabet, data.control_db.freqs);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4307
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4308 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4309 * Create a pspm for the given motif data
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4310 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4311 function motif_pspm(m) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4312 return new Pspm(m.pwm, m.id, 0, 0, m.nsites, m.evalue);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4313 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4314
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4315 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4316 * Create a count matrix from the given motif data
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4317 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4318 function motif_count_matrix(motif) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4319 return motif_pspm(motif).as_count_matrix();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4320 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4321
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4322 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4323 * Create a probablity matrix from the given motif data
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4324 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4325 function motif_prob_matrix(motif) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4326 return motif_pspm(motif).as_probability_matrix();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4327 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4328
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4329 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4330 * Create a minimal meme format motif from the given motif data
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4331 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4332 function motif_minimal_meme(motif) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4333 return motif_pspm(motif).as_meme({
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4334 "with_header": true,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4335 "with_pspm": true,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4336 "with_pssm": false,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4337 "version": data["version"],
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4338 "alphabet": dreme_alphabet,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4339 "strands": (data.options.revcomp ? 2 : 1)
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4340 });
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4341 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4342
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4343 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4344 * Fill in a template variable
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4345 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4346 function set_tvar(template, tvar, value) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4347 var node;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4348 node = find_child(template, tvar);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4349 if (node === null) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4350 throw new Error("Template does not contain variable " + tvar);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4351 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4352 node.innerHTML = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4353 if (typeof value !== "object") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4354 node.appendChild(document.createTextNode(value));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4355 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4356 node.appendChild(value);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4357 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4358 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4359
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4360 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4361 * Make a canvas with the motif logo drawn on it.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4362 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4363 function make_logo(motif, height, rc) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4364 var pspm = new Pspm(motif["pwm"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4365 if (rc) pspm = pspm.copy().reverse_complement(dreme_alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4366 var logo = new Logo(dreme_alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4367 logo.add_pspm(pspm, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4368 var canvas = document.createElement('canvas');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4369 canvas.height = height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4370 canvas.width = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4371 draw_logo_on_canvas(logo, canvas, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4372 return canvas;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4373 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4374
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4375 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4376 * Create a button designed to contain a single symbol
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4377 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4378 function make_sym_btn(symbol, title, action) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4379 var box, sbox;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4380 box = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4381 box.tabIndex = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4382 box.className = "sym_btn";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4383 sbox = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4384 if (typeof symbol == "string") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4385 sbox.appendChild(document.createTextNode(symbol));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4386 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4387 sbox.appendChild(symbol);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4388 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4389 box.appendChild(sbox);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4390 box.title = title;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4391 box.addEventListener('click', action, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4392 box.addEventListener('keydown', action, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4393 return box;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4394 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4395
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4396 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4397 * Create a pair of text spans with different classes.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4398 * This is useful when using CSS to only display one of them.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4399 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4400 function text_pair(txt1, cls1, txt2, cls2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4401 var container, part1, part2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4402 container = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4403 part1 = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4404 part1.appendChild(document.createTextNode(txt1));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4405 part1.className = cls1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4406 container.appendChild(part1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4407 part2 = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4408 part2.appendChild(document.createTextNode(txt2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4409 part2.className = cls2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4410 container.appendChild(part2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4411 return container;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4412 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4413
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4414 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4415 * Make a colourised sequence.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4416 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4417 function make_seq(seq) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4418 var i, j, letter, lbox, sbox;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4419 sbox = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4420 for (i = 0; i < seq.length; i = j) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4421 letter = seq.charAt(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4422 for (j = i+1; j < seq.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4423 if (seq.charAt(j) !== letter) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4424 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4425 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4426 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4427 lbox = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4428 lbox.style.color = dreme_alphabet.get_colour(dreme_alphabet.get_index(letter));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4429 lbox.appendChild(document.createTextNode(seq.substring(i, j)));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4430 sbox.appendChild(lbox);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4431 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4432 return sbox;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4433 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4434
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4435 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4436 * Create a description element taking into account the newlines in the source text.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4437 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4438 function make_description(text) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4439 var i, j, lines, p;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4440 var container = document.createElement("div");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4441 var paragraphs = text.split(/\n\n+/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4442 for (i = 0; i < paragraphs.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4443 lines = paragraphs[i].split(/\n/);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4444 p = document.createElement("p");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4445 p.appendChild(document.createTextNode(lines[0]));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4446 for (j = 1; j < lines.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4447 p.appendChild(document.createElement("br"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4448 p.appendChild(document.createTextNode(lines[j]));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4449 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4450 container.appendChild(p);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4451 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4452 return container;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4453 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4454
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4455 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4456 * Make the table header for the discovered motifs.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4457 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4458 function make_motif_header() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4459 var row = document.createElement("tr");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4460 add_text_header_cell(row, "", "", "motif_ordinal");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4461 add_text_header_cell(row, "Motif", "pop_motifs_word", "motif_word");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4462 add_text_header_cell(row, "Logo", "pop_motifs_logo", "motif_logo");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4463 if (data.options.revcomp) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4464 add_text_header_cell(row, "RC Logo", "pop_motifs_rc_logo", "motif_logo");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4465 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4466 add_text_header_cell(row, "E-value", "pop_motifs_evalue", "motif_evalue");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4467 add_text_header_cell(row, "Unerased E-value", "pop_motifs_uevalue", "motif_evalue");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4468 add_text_header_cell(row, "More", "pop_more", "motif_more");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4469 add_text_header_cell(row, "Submit/Download", "pop_submit_dl", "motif_submit");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4470 row.className = "more";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4471 return row;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4472 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4473
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4474 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4475 * Make a compact motif summary row for the discovered motifs.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4476 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4477 function make_motif_row(tbody, ordinal, motif) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4478 var row = document.createElement("tr");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4479 add_text_cell(row, "" + ordinal + ".", "motif_ordinal");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4480 add_text_cell(row, motif["id"], "motif_word");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4481 add_cell(row, make_logo(motif, 50, false), "motif_logo");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4482 if (data.options.revcomp) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4483 add_cell(row, make_logo(motif, 50, true), "motif_logo");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4484 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4485 add_text_cell(row, motif["evalue"], "motif_evalue");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4486 add_text_cell(row, motif["unerased_evalue"], "motif_evalue");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4487 add_cell(row, make_sym_btn(text_pair("\u21A7", "less", "\u21A5", "more"), "Show more information.", function(e) { toggle_class(tbody, "collapsed"); }, "\u21A5", ""), "motif_more");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4488 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");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4489 return row;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4490 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4491
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4492 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4493 * Make a sortable table of enriched matching rows.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4494 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4495 function make_motif_words(motif) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4496 var row, i, match;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4497 var table = document.createElement("table");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4498 var thead = document.createElement("thead");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4499 row = document.createElement("tr");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4500 add_text_header_cell(row, "Word", "pop_match_word", "match_word", function(e) {sort_table(this, compare_words);});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4501 add_text_header_cell(row, "Positives", "pop_match_pos", "match_count", function(e) {sort_table(this, compare_counts);});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4502 add_text_header_cell(row, "Negatives", "pop_match_neg", "match_count", function(e) {sort_table(this, compare_counts);});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4503 add_text_header_cell(row, "P-value", "pop_match_pval", "match_evalue", function(e) {sort_table(this, compare_evalues);});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4504 add_text_header_cell(row, "E-value", "pop_match_eval", "match_evalue", function(e) {sort_table(this, compare_evalues);});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4505 thead.appendChild(row);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4506 table.appendChild(thead);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4507 var tbody = document.createElement("tbody");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4508 for (i = 0; i < motif.matches.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4509 match = motif.matches[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4510 row = document.createElement("tr");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4511 add_cell(row, make_seq(match.seq), "match_word");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4512 add_text_cell(row, match.p + " / " + data.sequence_db.count, "match_count");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4513 add_text_cell(row, match.n + " / " + data.control_db.count, "match_count");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4514 add_text_cell(row, match.pvalue, "match_evalue");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4515 add_text_cell(row, match.evalue, "match_evalue");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4516 tbody.appendChild(row);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4517 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4518 table.appendChild(tbody);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4519 return table;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4520 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4521
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4522 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4523 * Make an expanded view of a discovered motif.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4524 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4525 function make_motif_exp(tbody, ordinal, motif) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4526 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4527 var box, pspm, logo_box;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4528 box = $("tmpl_motif_expanded").cloneNode(true);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4529 toggle_class(box, "template", false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4530 box.id = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4531 find_child(box, "tvar_logo").appendChild(make_logo(motif, 150, false));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4532 if (data.options.revcomp) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4533 find_child(box, "tvar_rclogo").appendChild(make_logo(motif, 150, true));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4534 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4535 set_tvar(box, "tvar_p", motif["p"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4536 set_tvar(box, "tvar_p_total", data.sequence_db.count);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4537 set_tvar(box, "tvar_n", motif["n"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4538 set_tvar(box, "tvar_n_total", data.control_db.count);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4539 set_tvar(box, "tvar_pvalue", motif["pvalue"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4540 set_tvar(box, "tvar_evalue", motif["evalue"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4541 set_tvar(box, "tvar_uevalue", motif["unerased_evalue"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4542 set_tvar(box, "tvar_words", make_motif_words(motif));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4543 var cell = document.createElement("td");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4544 cell.colSpan = 8;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4545 cell.appendChild(box);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4546 var row = document.createElement("tr");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4547 row.className = "more";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4548 row.appendChild(cell);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4549 return row;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4550 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4551
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4552 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4553 * Convert a string containing a scientific number into the log of that number
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4554 * without having an intermediate representation of the number.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4555 * This is intended to avoid underflow problems with the tiny evalues that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4556 * MEME and DREME can create.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4557 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4558 function sci2log(scinum) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4559 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4560 var ev_re, match, sig, exp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4561 ev_re = /^(.*)e(.*)$/;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4562 if (match = ev_re.exec(scinum)) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4563 sig = parseFloat(match[1]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4564 exp = parseInt(match[2]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4565 return Math.log(sig) + (exp * Math.log(10));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4566 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4567 return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4568 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4569
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4570 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4571 * Create a table of discovered motifs. A fresh table body is used for each
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4572 * motif to make hiding/showing rows with css easier.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4573 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4574 function make_motifs() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4575 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4576 var i, row, tbody, motif, ordinal;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4577 // make the motifs table
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4578 var container = $("motifs");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4579 container.innerHTML = ""; // clear content
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4580 var table = document.createElement("table");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4581 // add a header that is always shown
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4582 var thead = document.createElement("thead");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4583 thead.appendChild(make_motif_header());
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4584 table.appendChild(thead);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4585 for (i = 0; i < data.motifs.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4586 ordinal = i + 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4587 motif = data.motifs[i];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4588 tbody = document.createElement("tbody");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4589 tbody.className = "collapsed";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4590 tbody.appendChild(make_motif_row(tbody, ordinal, motif));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4591 tbody.appendChild(make_motif_exp(tbody, ordinal, motif));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4592 // create a following header for every row except the last one
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4593 if ((i + 1) < data.motifs.length) tbody.appendChild(make_motif_header());
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4594 table.appendChild(tbody);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4595 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4596 container.appendChild(table);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4597 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4598
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4599 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4600 * Create a table showing all the alphabet symbols, their names and frequencies.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4601 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4602 function make_alpha_bg(alph, freqs) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4603 function colour_symbol(index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4604 var span = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4605 span.appendChild(document.createTextNode(alph.get_symbol(index)));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4606 span.style.color = alph.get_colour(index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4607 span.className = "alpha_symbol";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4608 return span;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4609 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4610 var table, thead, tbody, row, th, span, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4611 // create table
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4612 table = document.createElement("table");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4613 table.className = "inputs";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4614 // create header
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4615 thead = document.createElement("thead");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4616 table.appendChild(thead);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4617 row = thead.insertRow(thead.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4618 if (alph.has_complement()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4619 add_text_header_cell(row, "Name", "pop_alph_name");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4620 add_text_header_cell(row, "Bg.", "pop_alph_control");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4621 add_text_header_cell(row, "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4622 add_text_header_cell(row, "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4623 add_text_header_cell(row, "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4624 add_text_header_cell(row, "Bg.", "pop_alph_control");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4625 add_text_header_cell(row, "Name", "pop_alph_name");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4626 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4627 add_text_header_cell(row, "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4628 add_text_header_cell(row, "Name", "pop_alph_name");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4629 add_text_header_cell(row, "Bg.", "pop_alph_control");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4630 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4631 // add alphabet entries
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4632 tbody = document.createElement("tbody");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4633 table.appendChild(tbody);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4634 if (alph.has_complement()) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4635 for (i = 0; i < alph.get_size_core(); i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4636 var c = alph.get_complement(i);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4637 if (i > c) continue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4638 row = tbody.insertRow(tbody.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4639 add_text_cell(row, alph.get_name(i));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4640 add_text_cell(row, "" + freqs[i].toFixed(3));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4641 add_cell(row, colour_symbol(i));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4642 add_text_cell(row, "~");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4643 add_cell(row, colour_symbol(c));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4644 add_text_cell(row, "" + freqs[c].toFixed(3));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4645 add_text_cell(row, alph.get_name(c));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4646 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4647 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4648 for (i = 0; i < alph.get_size_core(); i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4649 row = tbody.insertRow(tbody.rows.length);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4650 add_cell(row, colour_symbol(i));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4651 add_text_cell(row, alph.get_name(i));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4652 add_text_cell(row, "" + freqs[i].toFixed(3));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4653 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4654 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4655 return table;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4656 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4657
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4658 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4659 * Updates the format download text in the popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4660 * This is called when either the format or current motif changes.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4661 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4662 function update_outpop_format(index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4663 var motif = data.motifs[index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4664 var fn = [motif_count_matrix, motif_prob_matrix, motif_minimal_meme];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4665 var suffix = ["_counts.txt", "_freqs.txt", ".meme"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4666 var format = parseInt($("text_format").value);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4667 var text = fn[format](motif);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4668 prepare_download(text, "text/plain", motif.id + suffix[format], $("outpop_text_dl"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4669 $("outpop_text").value = text;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4670 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4671
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4672 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4673 * Updates the motif logos and format download text in the popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4674 * This is called whenever the current motif changes.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4675 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4676 function update_outpop_motif(index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4677 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4678 var motifs, motif, pspm, logo, canvas, num;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4679 motifs = data["motifs"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4680 if (index < 0 || index >= motifs.length) {return;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4681 current_motif = index;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4682 motif = motifs[index];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4683 pspm = new Pspm(motif["pwm"]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4684 logo = new Logo(dreme_alphabet, "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4685 logo.add_pspm(pspm, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4686 canvas = $("outpop_logo");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4687 canvas.width = canvas.width; // clear canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4688 draw_logo_on_canvas(logo, canvas, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4689 canvas = $("outpop_logo_rc");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4690 canvas.width = canvas.width; // clear rc canvas
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4691 if (data.options.revcomp) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4692 pspm.reverse_complement(dreme_alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4693 logo = new Logo(dreme_alphabet, "");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4694 logo.add_pspm(pspm, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4695 draw_logo_on_canvas(logo, canvas, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4696 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4697 num = $("outpop_num");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4698 num.innerHTML = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4699 num.appendChild(document.createTextNode("" + (index + 1)));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4700 update_outpop_format(index);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4701 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4702
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4703
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4704 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4705 * Initialise and display the download popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4706 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4707 function action_show_outpop(e, ordinal) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4708 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4709 function init() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4710 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4711 var close_btn, next_btn, prev_btn, cancel_btn, do_btn;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4712 var tab1, tab2, tab3;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4713 var pnl1, pnl2, pnl3;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4714 var format_list;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4715 var tbl_submit, inputs, i, default_prog;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4716 close_btn = $("outpop_close");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4717 close_btn.addEventListener("click", action_hide_outpop, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4718 close_btn.addEventListener("keydown", action_hide_outpop, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4719 next_btn = $("outpop_next");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4720 next_btn.addEventListener("click", action_outpop_next, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4721 next_btn.addEventListener("keydown", action_outpop_next, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4722 prev_btn = $("outpop_prev");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4723 prev_btn.addEventListener("click", action_outpop_prev, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4724 prev_btn.addEventListener("keydown", action_outpop_prev, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4725 cancel_btn = $("outpop_cancel");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4726 cancel_btn.addEventListener("click", action_hide_outpop, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4727 do_btn = $("outpop_do");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4728 do_btn.addEventListener("click", action_outpop_submit, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4729 tab1 = $("outpop_tab_1");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4730 tab1.tabIndex = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4731 tab1.addEventListener("click", action_outpop_tab, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4732 tab1.addEventListener("keydown", action_outpop_tab, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4733 tab2 = $("outpop_tab_2");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4734 tab2.tabIndex = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4735 tab2.addEventListener("click", action_outpop_tab, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4736 tab2.addEventListener("keydown", action_outpop_tab, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4737 tab3 = $("outpop_tab_3");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4738 tab3.tabIndex = 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4739 tab3.addEventListener("click", action_outpop_tab, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4740 tab3.addEventListener("keydown", action_outpop_tab, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4741 pnl1 = $("outpop_pnl_1");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4742 pnl2 = $("outpop_pnl_2");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4743 pnl3 = $("outpop_pnl_3");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4744 toggle_class(tab1, "activeTab", true);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4745 toggle_class(tab2, "activeTab", false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4746 toggle_class(tab3, "activeTab", false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4747 pnl1.style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4748 pnl2.style.display = "none";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4749 pnl3.style.display = "none";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4750 format_list = $("text_format");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4751 format_list.addEventListener("change", action_outpop_format, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4752 // setup program selection
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4753 tbl_submit = $("programs");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4754 // when not dna, hide the inputs for programs that require dna motifs
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4755 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
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4756 // add a click listener for the radio buttons
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4757 inputs = tbl_submit.querySelectorAll("input[type='radio']");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4758 for (i = 0; i < inputs.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4759 inputs[i].addEventListener("click", action_outpop_program, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4760 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4761 // ensure that a default program option is selected for DNA and Protein
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4762 default_prog = document.getElementById(dreme_alphabet.has_complement() ? "submit_tomtom" : "submit_fimo");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4763 default_prog.checked = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4764 action_outpop_program.call(default_prog);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4765 // disable reverse-complement when not DNA
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4766 $("logo_rc_option").disabled = !dreme_alphabet.has_complement();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4767 // set errorbars on when ssc is on
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4768 $("logo_ssc").addEventListener("change", action_outpop_ssc, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4769 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4770 // store the focused element
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4771 action_hide_outpop.last_active = document.activeElement;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4772 if (!e) e = window.event;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4773 if (e.type === "keydown") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4774 if (e.keyCode !== 13 && e.keyCode !== 32) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4775 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4776 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4777 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4778 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4779 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4780 // hide the help popup
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4781 help_popup();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4782 // on first load initilize the popup
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4783 if (!action_show_outpop.ready) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4784 init();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4785 action_show_outpop.ready = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4786 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4787 update_outpop_motif(ordinal - 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4788 // display the download popup
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4789 $("grey_out_page").style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4790 $("download").style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4791 $("outpop_close").focus();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4792 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4793
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4794 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4795 * Hide the download popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4796 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4797 function action_hide_outpop(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4798 if (!e) e = window.event;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4799 if (e.type === "keydown") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4800 if (e.keyCode !== 13 && e.keyCode !== 32) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4801 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4802 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4803 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4804 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4805 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4806 $("download").style.display = "none";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4807 $("grey_out_page").style.display = "none";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4808 if (typeof action_hide_outpop.last_active !== "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4809 action_hide_outpop.last_active.focus();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4810 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4811 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4812
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4813 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4814 * Show the next motif in the download popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4815 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4816 function action_outpop_next(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4817 if (!e) e = window.event;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4818 if (e.type === "keydown") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4819 if (e.keyCode !== 13 && e.keyCode !== 32) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4820 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4821 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4822 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4823 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4824 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4825 update_outpop_motif(current_motif + 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4826 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4827
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4828 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4829 * Show the previous motif in the download popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4830 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4831 function action_outpop_prev(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4832 if (!e) e = window.event;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4833 if (e.type === "keydown") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4834 if (e.keyCode !== 13 && e.keyCode !== 32) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4835 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4836 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4837 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4838 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4839 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4840 update_outpop_motif(current_motif - 1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4841 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4842
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4843 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4844 * Highlight the selected row in the program list.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4845 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4846 function action_outpop_program() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4847 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4848 var table, tr, rows, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4849 tr = find_parent_tag(this, "TR");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4850 table = find_parent_tag(tr, "TABLE");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4851 rows = table.querySelectorAll("tr");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4852 for (i = 0; i < rows.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4853 toggle_class(rows[i], "selected", rows[i] === tr);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4854 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4855 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4856
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4857 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4858 * Enable error bars when small sample correction is enabled.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4859 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4860 function action_outpop_ssc() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4861 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4862 $("logo_err").value = $("logo_ssc").value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4863 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4864
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4865 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4866 * Submit the motif to the selected program.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4867 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4868 function action_outpop_submit(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4869 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4870 var form, input, program, motifs;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4871 // find out which program is selected
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4872 var radios, i;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4873 radios = document.getElementsByName("program");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4874 program = "fimo"; // default to fimo, since it works with all alphabet types
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4875 for (i = 0; i < radios.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4876 if (radios[i].checked) program = radios[i].value;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4877 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4878
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4879 motifs = motif_minimal_meme(data.motifs[current_motif]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4880 form = document.createElement("form");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4881 form.setAttribute("method", "post");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4882 form.setAttribute("action", site_url + "/tools/" + program);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4883
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4884 input = document.createElement("input");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4885 input.setAttribute("type", "hidden");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4886 input.setAttribute("name", "motifs_embed");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4887 input.setAttribute("value", motifs);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4888 form.appendChild(input);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4889
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4890 document.body.appendChild(form);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4891 form.submit();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4892 document.body.removeChild(form);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4893 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4894
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4895 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4896 * Download the format text.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4897 * Wire the link containing the data URI text to a download button so it looks
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4898 * the same as the server submit stuff.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4899 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4900 function action_outpop_download_motif(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4901 $("outpop_text_dl").click();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4902 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4903
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4904 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4905 * Download the motif logo.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4906 * The EPS format can be calculated locally in Javascript
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4907 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4908 function action_outpop_download_logo(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4909 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4910 var pspm, logo, eps;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4911 var logo_rc, logo_ssc, logo_width, logo_height;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4912 var motif = data.motifs[current_motif];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4913 if ($("logo_format").value == "0") { // EPS
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4914 logo_rc = ($("logo_rc").value == "1");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4915 logo_ssc = ($("logo_ssc").value == "1");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4916 logo_width = parseFloat($("logo_width").value);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4917 if (isNaN(logo_width) || !isFinite(logo_width) || logo_width <= 0) logo_width = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4918 logo_height = parseFloat($("logo_height").value);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4919 if (isNaN(logo_height) || !isFinite(logo_height) || logo_height <= 0) logo_height = null;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4920 // create a PSPM from the motif
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4921 pspm = motif_pspm(motif);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4922 if (logo_rc) pspm.reverse_complement(dreme_alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4923 logo = new Logo(dreme_alphabet);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4924 logo.add_pspm(pspm, 0);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4925 eps = logo.as_eps({"ssc": logo_ssc, "logo_width": logo_width, "logo_height": logo_height});
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4926 prepare_download(eps, "application/postscript", motif.id + ".eps");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4927 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4928 $("logo_motifs").value = motif_minimal_meme(motif);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4929 $("logo_form").submit();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4930 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4931 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4932
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4933 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4934 * Change the selected tab in the download popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4935 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4936 function action_outpop_tab(e) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4937 "use strict";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4938 var tab1, tab2, tab3, pnl1, pnl2, pnl3, do_btn;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4939 if (!e) e = window.event;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4940 if (e.type === "keydown") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4941 if (e.keyCode !== 13 && e.keyCode !== 32) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4942 return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4943 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4944 // stop a submit or something like that
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4945 e.preventDefault();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4946 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4947 tab1 = $("outpop_tab_1");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4948 tab2 = $("outpop_tab_2");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4949 tab3 = $("outpop_tab_3");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4950 pnl1 = $("outpop_pnl_1");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4951 pnl2 = $("outpop_pnl_2");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4952 pnl3 = $("outpop_pnl_3");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4953 do_btn = $("outpop_do");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4954
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4955 toggle_class(tab1, "activeTab", (this === tab1));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4956 toggle_class(tab2, "activeTab", (this === tab2));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4957 toggle_class(tab3, "activeTab", (this === tab3));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4958 pnl1.style.display = ((this === tab1) ? "block" : "none");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4959 pnl2.style.display = ((this === tab2) ? "block" : "none");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4960 pnl3.style.display = ((this === tab3) ? "block" : "none");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4961 do_btn.value = ((this === tab1) ? "Submit" : "Download");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4962 do_btn.removeEventListener("click", action_outpop_submit, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4963 do_btn.removeEventListener("click", action_outpop_download_logo, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4964 do_btn.removeEventListener("click", action_outpop_download_motif, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4965 if (this === tab1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4966 do_btn.addEventListener("click", action_outpop_submit, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4967 } else if (this === tab2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4968 do_btn.addEventListener("click", action_outpop_download_motif, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4969 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4970 do_btn.addEventListener("click", action_outpop_download_logo, false);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4971 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4972 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4973
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4974 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4975 * Update the text in the download format popup.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4976 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4977 function action_outpop_format() {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4978 update_outpop_format(current_motif);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4979 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4980
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4981 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4982 * Find all text nodes in the given container.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4983 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4984 function text_nodes(container) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4985 var textNodes = [];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4986 var stack = [container];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4987 // depth first search to maintain ordering when flattened
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4988 while (stack.length > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4989 var node = stack.pop();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4990 if (node.nodeType == Node.TEXT_NODE) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4991 textNodes.push(node);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4992 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4993 for (var i = node.childNodes.length-1; i >= 0; i--) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4994 stack.push(node.childNodes[i]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4995 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4996 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4997 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4998 return textNodes;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
4999 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5000
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5001 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5002 * Get the text out of a specific text node.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5003 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5004 function node_text(node) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5005 if (node === undefined) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5006 return '';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5007 } else if (node.textContent) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5008 return node.textContent;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5009 } else if (node.innerText) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5010 return node.innerText;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5011 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5012 return '';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5013 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5014 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5015
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5016 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5017 * Get the text contained within the element.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5018 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5019 function elem_text(elem, separator) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5020 if (separator === undefined) separator = '';
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5021 return text_nodes(elem).map(node_text).join(separator);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5022 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5023
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5024 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5025 * Sort all rows in the first table body based on the column of the given element and the comparison function.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5026 * The sort is not very fast and is intended for small tables only.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5027 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5028 function sort_table(colEle, compare_function) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5029 //find the parent of colEle that is either a td or th
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5030 var i, j;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5031 var cell = colEle;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5032 while (true) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5033 if (cell == null) return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5034 if (cell.nodeType == Node.ELEMENT_NODE &&
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5035 (cell.tagName.toLowerCase() == "td" || cell.tagName.toLowerCase() == "th")) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5036 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5037 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5038 cell = cell.parentNode;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5039 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5040 //find the parent of cell that is a tr
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5041 var row = cell;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5042 while (true) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5043 if (row == null) return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5044 if (row.nodeType == Node.ELEMENT_NODE && row.tagName.toLowerCase() == "tr") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5045 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5046 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5047 row = row.parentNode;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5048 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5049 //find the parent of row that is a table
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5050 var table = row;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5051 while (true) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5052 if (table == null) return;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5053 if (table.nodeType == Node.ELEMENT_NODE && table.tagName.toLowerCase() == "table") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5054 break;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5055 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5056 table = table.parentNode;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5057 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5058 var column_index = cell.cellIndex;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5059 // do a bubble sort, because the tables are so small it doesn't matter
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5060 var change;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5061 var trs = table.tBodies[0].getElementsByTagName('tr');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5062 var already_sorted = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5063 var reverse = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5064 while (true) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5065 do {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5066 change = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5067 for (i = 0; i < trs.length -1; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5068 var v1 = elem_text(trs[i].cells[column_index]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5069 var v2 = elem_text(trs[i+1].cells[column_index]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5070 if (reverse) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5071 var tmp = v1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5072 v1 = v2;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5073 v2 = tmp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5074 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5075 if (compare_function(v1, v2) > 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5076 exchange(trs[i], trs[i+1], table);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5077 change = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5078 already_sorted = false;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5079 trs = table.tBodies[0].getElementsByTagName('tr');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5080 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5081 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5082 } while (change);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5083 if (reverse) break;// we've sorted twice so exit
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5084 if (!already_sorted) break;// sort did something so exit
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5085 // when it's sorted one way already then sort the opposite way
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5086 reverse = true;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5087 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5088 // put arrows on the headers
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5089 var headers = table.tHead.getElementsByTagName('tr');
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5090 for (i = 0; i < headers.length; i++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5091 for (j = 0; j < headers[i].cells.length; j++) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5092 var cell = headers[i].cells[j];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5093 var arrows = cell.getElementsByClassName("sort_arrow");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5094 var arrow;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5095 if (arrows.length == 0) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5096 arrow = document.createElement("span");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5097 arrow.className = "sort_arrow";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5098 cell.insertBefore(arrow, cell.firstChild);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5099 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5100 arrow = arrows[0];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5101 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5102 arrow.innerHTML = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5103 if (j == column_index) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5104 arrow.appendChild(document.createTextNode(reverse ? "\u25B2" : "\u25BC"));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5105 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5106 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5107 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5108 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5109
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5110 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5111 * Swap two rows in a table.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5112 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5113 function exchange(oRowI, oRowJ, oTable) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5114 var i = oRowI.rowIndex;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5115 var j = oRowJ.rowIndex;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5116 if (i == j+1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5117 oTable.tBodies[0].insertBefore(oRowI, oRowJ);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5118 } if (j == i+1) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5119 oTable.tBodies[0].insertBefore(oRowJ, oRowI);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5120 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5121 var tmpNode = oTable.tBodies[0].replaceChild(oRowI, oRowJ);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5122 if(typeof(oRowI) != "undefined") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5123 oTable.tBodies[0].insertBefore(tmpNode, oRowI);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5124 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5125 oTable.appendChild(tmpNode);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5126 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5127 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5128 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5129
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5130 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5131 * Compare two E-values which may be very small.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5132 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5133 function compare_evalues(v1, v2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5134 var e1 = sci2log(v1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5135 var e2 = sci2log(v2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5136 if (e1 < e2) return -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5137 else if (e1 > e2) return 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5138 return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5139 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5140
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5141 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5142 * Compare two counts.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5143 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5144 function compare_counts(v1, v2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5145 var re = /(\d+)\s*\/\s*\d+/;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5146 var m1 = re.exec(v1);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5147 var m2 = re.exec(v2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5148 if (m1 == null && m2 == null) return 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5149 if (m1 == null) return -1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5150 if (m2 == null) return 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5151 return parseInt(m2[1]) - parseInt(m1[1]);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5152 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5153
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5154 /*
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5155 * Compare two sequence words.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5156 */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5157 function compare_words(v1, v2) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5158 return v1.localeCompare(v2);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5159 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5160
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5161
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5162 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5163 <style>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5164 /* The following is the content of meme.css */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5165 body { background-color:white; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5166
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5167 div.help {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5168 display: inline-block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5169 margin: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5170 padding: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5171 width: 12px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5172 height: 13px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5173 cursor: pointer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5174 background-image: url(data:image/gif;base64,R0lGODlhDAANAIABANR0AP///yH5BAEAAAEALAAAAAAMAA0AAAIdhI8Xy22MIFgv1DttrrJ7mlGNNo4c+aFg6SQuUAAAOw==);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5175 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5176
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5177 div.help:hover {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5178 background-image: url(data:image/gif;base64,R0lGODlhDAANAKEAANR0AP///9R0ANR0ACH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEAAAIALAAAAAAMAA0AAAIdDGynCe3PgoxONntvwqz2/z2K2ImjR0KhmSIZUgAAOw==);
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5179 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5180
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5181 p.spaced { line-height: 1.8em;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5182
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5183 span.citation { font-family: "Book Antiqua", "Palatino Linotype", serif; color: #004a4d;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5184
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5185 p.pad { padding-left: 30px; padding-top: 5px; padding-bottom: 10px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5186
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5187 td.jump { font-size: 13px; color: #ffffff; background-color: #00666a;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5188 font-family: Georgia, "Times New Roman", Times, serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5189
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5190 a.jump { margin: 15px 0 0; font-style: normal; font-variant: small-caps;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5191 font-weight: bolder; font-family: Georgia, "Times New Roman", Times, serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5192
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5193 h2.mainh {font-size: 1.5em; font-style: normal; margin: 15px 0 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5194 font-variant: small-caps; font-family: Georgia, "Times New Roman", Times, serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5195
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5196 h2.line {border-bottom: 1px solid #CCCCCC; font-size: 1.5em; font-style: normal;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5197 margin: 15px 0 0; padding-bottom: 3px; font-variant: small-caps;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5198 font-family: Georgia, "Times New Roman", Times, serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5199
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5200 h4 {border-bottom: 1px solid #CCCCCC; font-size: 1.2em; font-style: normal;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5201 margin: 10px 0 0; padding-bottom: 3px; font-family: Georgia, "Times New Roman", Times, serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5202
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5203 h5 {margin: 0px}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5204
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5205 a.help { font-size: 9px; font-style: normal; text-transform: uppercase;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5206 font-family: Georgia, "Times New Roman", Times, serif;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5207
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5208 div.pad { padding-left: 30px; padding-top: 5px; padding-bottom: 10px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5209
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5210 div.pad1 { margin: 10px 5px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5211
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5212 div.pad2 { margin: 25px 5px 5px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5213 h2.pad2 { padding: 25px 5px 5px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5214
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5215 div.pad3 { padding: 5px 0px 10px 30px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5216
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5217 div.box { border: 2px solid #CCCCCC; padding:10px; overflow: hidden;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5218
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5219 div.bar { border-left: 7px solid #00666a; padding:5px; margin-top:25px; }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5220
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5221 div.subsection {margin:25px 0px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5222
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5223 img {border:0px none;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5224
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5225 th.majorth {text-align:left;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5226 th.minorth {font-weight:normal; text-align:left; width:8em; padding: 3px 0px;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5227 th.actionth {font-weight:normal; text-align:left;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5228
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5229 .explain h5 {font-size:1em; margin-left: 1em;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5230
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5231 div.doc {margin-left: 2em; margin-bottom: 3em;}
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5232
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5233 th.trainingset {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5234 border-bottom: thin dashed black;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5235 font-weight:normal;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5236 padding:0px 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5237 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5238 div.pop_content {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5239 position:absolute;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5240 z-index:50;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5241 width:300px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5242 padding: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5243 background: #E4ECEC;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5244 font-size: 12px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5245 font-family: Arial;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5246 border-style: double;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5247 border-width: 3px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5248 border-color: #AA2244;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5249 display:none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5250 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5251
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5252 div.pop_content > *:first-child {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5253 margin-top: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5254 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5255
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5256 div.pop_content h1, div.pop_content h2, div.pop_content h3, div.pop_content h4,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5257 div.pop_content h5, div.pop_content h6, div.pop_content p {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5258 margin: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5259 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5260
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5261 div.pop_content p + h1, div.pop_content p + h2, div.pop_content p + h3,
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5262 div.pop_content p + h4, div.pop_content p + h5, div.pop_content p + h6 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5263 margin-top: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5264 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5265
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5266 div.pop_content p + p {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5267 margin-top: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5268 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5269
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5270 div.pop_content > *:last-child {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5271 margin-bottom: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5272 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5273
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5274 div.pop_content div.pop_close {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5275 /* old definition */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5276 float:right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5277 bottom: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5278 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5279
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5280 div.pop_content span.pop_close, div.pop_content span.pop_back {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5281 display: inline-block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5282 border: 2px outset #661429;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5283 background-color: #CCC;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5284 padding-left: 1px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5285 padding-right: 1px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5286 padding-top: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5287 padding-bottom: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5288 cursor: pointer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5289 color: #AA2244; /*#661429;*/
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5290 font-weight: bold;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5291 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5292
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5293 div.pop_content span.pop_close:active, div.pop_content span.pop_back:active {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5294 border-style: inset;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5295 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5296
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5297 div.pop_content span.pop_close {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5298 float:right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5299 /*border: 2px outset #AA002B;*/
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5300 /*color: #AA2244;*/
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5301 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5302
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5303 div.pop_content:not(.nested) .nested_only {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5304 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5305 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5306
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5307 div.pop_back_sec {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5308 margin-bottom: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5309 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5310
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5311 div.pop_close_sec {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5312 margin-top: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5313 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5314
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5315 table.hide_advanced tr.advanced {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5316 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5317 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5318 span.show_more {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5319 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5320 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5321 table.hide_advanced span.show_more {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5322 display: inline;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5323 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5324 table.hide_advanced span.show_less {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5325 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5326 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5327
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5328
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5329 /*****************************************************************************
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5330 * Program logo styling
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5331 ****************************************************************************/
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5332 div.prog_logo {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5333 border-bottom: 0.25em solid #0f5f60;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5334 height: 4.5em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5335 width: 24em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5336 display:inline-block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5337 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5338 div.prog_logo img {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5339 float:left;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5340 width: 4em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5341 border-style: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5342 margin-right: 0.2em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5343 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5344 div.prog_logo h1, div.prog_logo h1:hover, div.prog_logo h1:active, div.prog_logo h1:visited {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5345 margin:0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5346 padding:0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5347 font-family: Arial, Helvetica, sans-serif;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5348 font-size: 3.2em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5349 line-height: 1em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5350 vertical-align: top;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5351 display: block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5352 color: #026666;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5353 letter-spacing: -0.06em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5354 text-shadow: 0.04em 0.06em 0.05em #666;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5355 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5356 div.prog_logo h2, div.prog_logo h2:hover, div.prog_logo h2:active, div.prog_logo h2:visited {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5357 display: block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5358 margin:0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5359 padding:0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5360 font-family: Helvetica, sans-serif;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5361 font-size: 0.9em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5362 line-height: 1em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5363 letter-spacing: -0.06em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5364 color: black;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5365 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5366
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5367 div.big.prog_logo {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5368 font-size: 18px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5369 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5370
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5371 </style>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5372 <style>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5373 /* dreme output specific css */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5374 div.header {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5375 position: relative;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5376 overflow: hidden;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5377 margin-top: 15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5378 margin-bottom: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5379 margin-right: 3px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5380 margin-left: 3px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5381 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5382 div.header > h2 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5383 font-size: 1.5em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5384 font-style: normal;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5385 margin: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5386 font-variant: small-caps;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5387 font-family: Georgia, "Times New Roman", Times, serif;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5388 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5389 div.header > span {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5390 position: absolute;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5391 right: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5392 bottom: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5393 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5394
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5395 div.template {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5396 position: absolute;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5397 z-index: 1;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5398 left: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5399 top: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5400 visibility: hidden;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5401 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5402
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5403 div.sym_btn {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5404 display:inline-block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5405 text-decoration: underline;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5406 cursor: pointer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5407 font-size: 20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5408 line-height:20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5409 text-align: center;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5410 width: 20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5411 height: 20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5412 color: blue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5413 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5414 div.sym_btn:hover {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5415 color: white;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5416 background-color: blue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5417 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5418
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5419 div.sym_btn.positioned {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5420 position: absolute;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5421 top: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5422 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5423
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5424 div.box + div.box {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5425 margin-top: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5426 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5427
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5428 th.motif_ordinal {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5429
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5430 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5431 td.motif_ordinal {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5432 text-align: right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5433 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5434 font-weight: bold;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5435 font-size: large;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5436 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5437 th.motif_word {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5438 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5439 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5440 td.motif_word {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5441 font-size:15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5442 font-family: 'Courier New', Courier, monospace;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5443 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5444 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5445 th.motif_logo {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5446 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5447 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5448 td.motif_logo {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5449 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5450 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5451 th.motif_evalue {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5452 text-align:right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5453 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5454 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5455 td.motif_evalue {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5456 text-align: right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5457 white-space: nowrap;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5458 padding-right: 20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5459 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5460 th.motif_more {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5461 padding: 0 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5462 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5463 td.motif_more {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5464 text-align: center;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5465 padding: 0 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5466 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5467 th.motif_submit {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5468 padding: 0 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5469 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5470 td.motif_submit {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5471 text-align: center;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5472 padding: 0 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5473 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5474 th.match_word {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5475 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5476 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5477 td.match_word {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5478 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5479 font-weight: bold;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5480 font-size: large;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5481 font-family: 'Courier New', Courier, monospace;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5482 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5483 th.match_evalue, th.match_count {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5484 text-align: right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5485 padding-right: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5486 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5487 td.match_evalue, td.match_count {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5488 text-align: right;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5489 white-space: nowrap;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5490 padding-right: 20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5491 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5492
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5493 div.tabArea {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5494 font-size: 80%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5495 font-weight: bold;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5496 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5497
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5498 .norc div.tabArea {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5499 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5500 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5501
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5502 span.tab, span.tab:visited {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5503 cursor: pointer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5504 color: #888;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5505 background-color: #ddd;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5506 border: 2px solid #ccc;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5507 padding: 2px 1em;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5508 text-decoration: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5509 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5510 span.tab.middle {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5511 border-left-width: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5512 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5513 div.tabArea.base span.tab {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5514 border-top-width: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5515 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5516 div.tabArea.top span.tab {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5517 border-bottom-width: 0px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5518 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5519
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5520 span.tab:hover {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5521 background-color: #bbb;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5522 border-color: #bbb;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5523 color: #666;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5524 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5525 span.tab.activeTab, span.tab.activeTab:hover, span.tab.activeTab:visited {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5526 background-color: white;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5527 color: black;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5528 cursor: default;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5529 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5530 div.tabMain {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5531 border: 2px solid #ccc;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5532 background-color: white;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5533 padding: 10px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5534 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5535 div.tabMain.base {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5536 margin-top: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5537 display: inline-block;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5538 max-width: 98%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5539 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5540
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5541 div.tabMain.top {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5542 margin-bottom: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5543 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5544
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5545 div.grey_background {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5546 position:fixed;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5547 z-index: 8;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5548 background-color: #000;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5549 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5550 opacity: 0.5;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5551 left: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5552 top: 0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5553 width: 100%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5554 height: 100%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5555 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5556
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5557 div.popup_wrapper {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5558 position:fixed;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5559 z-index:9;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5560 width:100%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5561 height:0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5562 top:50%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5563 left:0;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5564 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5565
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5566 div.popup {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5567 width: 600px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5568 z-index:9;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5569 margin-left: auto;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5570 margin-right: auto;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5571 padding: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5572 background-color: #FFF;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5573 border-style: double;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5574 border-width: 5px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5575 border-color: #00666a;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5576 position:relative;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5577 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5578 div.close {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5579 cursor: pointer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5580 border: 1px solid black;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5581 width:15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5582 height:15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5583 line-height:15px; /* this causes vertical centering */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5584 text-align:center;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5585 background-color:#FFF;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5586 color:#000;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5587 font-size:15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5588 font-family:monospace;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5589 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5590
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5591 div.close:hover {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5592 color:#FFF;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5593 background-color:#000;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5594 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5595
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5596 div.navnum {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5597 width:100%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5598 height:20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5599 line-height:20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5600 text-align:center;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5601 font-size:medium;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5602 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5603
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5604 div.navarrow {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5605 font-size: 30px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5606 text-decoration:none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5607 cursor: pointer;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5608 -moz-user-select: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5609 -webkit-user-select: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5610 -ms-user-select: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5611 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5612
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5613 div.navarrow > span.inactive {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5614 display: inline;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5615 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5616 div.navarrow > span.active {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5617 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5618 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5619
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5620 div.navarrow:hover > span.active {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5621 display: inline;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5622 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5623 div.navarrow:hover > span.inactive {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5624 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5625 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5626
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5627 table.programs {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5628 width: 100%;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5629 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5630
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5631 table.programs tr {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5632 background-color: #EFE;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5633 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5634
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5635 table.programs tr.selected {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5636 background-color: #262;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5637 color: #FFF;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5638 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5639
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5640 table.programs tr.dna_only {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5641 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5642 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5643
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5644 table.programs.alphabet_dna tr.dna_only {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5645 display: table-row;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5646 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5647
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5648 table.inputs {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5649 margin-top: 20px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5650 border-collapse:collapse;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5651 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5652 table.inputs * td, table.inputs * th {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5653 padding-left: 15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5654 padding-right: 15px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5655 padding-top: 1px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5656 padding-bottom: 1px;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5657 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5658
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5659 /* program settings */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5660 span.strand_none, span.strand_given, span.strand_both {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5661 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5662 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5663 td.none span.strand_none, td.given span.strand_given, td.both span.strand_both {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5664 display: inline;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5665 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5666
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5667 /* show the expanded motif only when the collapsed one is hidden */
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5668 tbody *.less, tbody.collapsed *.more {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5669 display: none;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5670 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5671
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5672 tbody.collapsed *.less {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5673 display: inline;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5674 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5675
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5676 </style>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5677 </head>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5678 <body data-scrollpad="true">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5679 <!-- -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5680 <div id="grey_out_page" class="grey_background" style="display:none;">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5681 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5682
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5683 <!-- Help popups -->
b386032d758d 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_">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5685 <p>Help poup.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5686 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5687 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5688
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5689 <div class="pop_content" id="pop_motifs_word">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5690 <p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5691 The name of the motif uses the IUPAC codes for nucleotides which has
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5692 a different letter to represent each of the 15 possible combinations.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5693 </p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5694 <p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5695 The name is itself a representation of the motif though the position
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5696 weight matrix is not directly equalivant as it is generated from the
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5697 sites found that matched the letters given in the name.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5698 </p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5699 <p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5700 <a id="doc_alphabets_url" href="#">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5701 Read more about the MEME suite's use of the IUPAC alphabets.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5702 </a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5703 <script>$("doc_alphabets_url").href = site_url + "/doc/alphabets.html";</script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5704 </p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5705 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5706 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5707 <div class="pop_content" id="pop_motifs_logo">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5708 <p>The logo of the motif.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5709 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5710 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5711 <div class="pop_content" id="pop_motifs_rc_logo">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5712 <p>The logo of the reverse complement motif.</p>
b386032d758d 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>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5714 </div>
b386032d758d 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_motifs_evalue">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5716 <p>The E-value is the enrichment p-value times the number of candidate
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5717 motifs tested.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5718 <p>The enrichment p-value is calculated using Fisher's Exact Test for
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5719 enrichment of the motif in the positive sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5720 <p>Note that the counts used in Fisher's Exact Test are made after
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5721 erasing sites that match previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5722 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5723 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5724 <div class="pop_content" id="pop_motifs_uevalue">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5725 <p>The E-value of the motif calculated without erasing the sites of
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5726 previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5727 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5728 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5729 <div class="pop_content" id="pop_more">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5730 <p>Show more information on the motif.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5731 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5732 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5733 <div class="pop_content" id="pop_submit_dl">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5734 <p>Submit your motif to another MEME Suite program or download your motif.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5735 <h5>Supported Programs</h5>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5736 <dl>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5737 <dt>Tomtom</dt>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5738 <dd>Tomtom is a tool for searching for similar known motifs.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5739 </dd>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5740 <dt>MAST</dt>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5741 <dd>MAST is a tool for searching biological sequence databases for
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5742 sequences that contain one or more of a group of known motifs.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5743 </dd>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5744 <dt>FIMO</dt>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5745 <dd>FIMO is a tool for searching biological sequence databases for
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5746 sequences that contain one or more known motifs.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5747 </dd>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5748 <dt>GOMO</dt>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5749 <dd>GOMO is a tool for identifying possible roles (Gene Ontology
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5750 terms) for DNA binding motifs.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5751 </dd>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5752 <dt>SpaMo</dt>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5753 <dd>SpaMo is a tool for inferring possible transcription factor
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5754 complexes by finding motifs with enriched spacings.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5755 </dd>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5756 </dl>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5757 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5758 </div>
b386032d758d 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_motif_positives">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5760 <p># positive sequences matching the motif / # positive sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5761 <p>Note these counts are made after erasing sites that match previously
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5762 found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5763 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5764 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5765 <div class="pop_content" id="pop_motif_negatives">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5766 <p># negative sequences matching the motif / # negative sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5767 <p>Note these counts are made after erasing sites that match previously
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5768 found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5769 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5770 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5771 <div class="pop_content" id="pop_motif_pvalue">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5772 <p>The p-value of Fisher's Exact Test for enrichment of the motif in
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5773 the positive sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5774 <p>Note that the counts used in Fisher's Exact Test are made after
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5775 erasing sites that match previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5776 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5777 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5778 <div class="pop_content" id="pop_motif_evalue">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5779 <p>The E-value is the motif p-value times the number of candidate motifs
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5780 tested.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5781 <p>Note that the p-value was calculated with counts made after
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5782 erasing sites that match previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5783 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5784 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5785 <div class="pop_content" id="pop_motif_uevalue">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5786 <p>The E-value of the motif calculated without erasing the sites of
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5787 previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5788 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5789 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5790 <div class="pop_content" id="pop_match_word">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5791 <p>All words matching the motif whose uncorrected p-value is less than
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5792 <span id="help_add_pv_thresh"></span>.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5793 <script>$("help_add_pv_thresh").innerHTML = data.options.add_pv_thresh;</script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5794 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5795 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5796 <div class="pop_content" id="pop_match_pos">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5797 <p># positive sequences with matches to the word / # positive sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5798 <p>Note these counts are made after erasing sites that match previously
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5799 found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5800 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5801 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5802 <div class="pop_content" id="pop_match_neg">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5803 <p># negative sequences with matches to the word / # negative sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5804 <p>Note these counts are made after erasing sites that match previously
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5805 found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5806 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5807 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5808 <div class="pop_content" id="pop_match_pval">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5809 <p>The p-value of Fisher's Exact Test for enrichment of the word in
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5810 the positive sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5811 <p>Note that the counts used in Fisher's Exact Test are made after
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5812 erasing sites that match previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5813 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5814 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5815 <div class="pop_content" id="pop_match_eval">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5816 <p>The word p-value times the number of candidates tested.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5817 <p>Note that the p-value was calculated with counts made after
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5818 erasing sites that match previously found motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5819 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5820 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5821
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5822 <div class="pop_content" id="pop_seq_source">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5823 <p>The sequence file used by DREME to find the motifs.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5824 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5825 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5826 <div class="pop_content" id="pop_seq_alph">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5827 <p>The alphabet of the sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5828 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5829 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5830 <div class="pop_content" id="pop_seq_count">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5831 <p>The count of the sequences.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5832 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5833 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5834
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5835 <div class="pop_content" id="pop_alph_name">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5836 <p>The name of the alphabet symbol.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5837 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5838 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5839
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5840 <div class="pop_content" id="pop_alph_control">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5841 <p>The frequency of the alphabet symbol in the control dataset.</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5842 <div class="pop_close">[<a href="javascript:help_popup()">close</a> ]</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5843 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5844
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5845 <!-- templates -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5846
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5847 <div class="template box expanded_motif" id="tmpl_motif_expanded">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5848 <div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5849 <span class="tvar_logo"></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5850 <span class="tvar_rclogo"></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5851 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5852 <h4>Details</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5853 <table class="details">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5854 <thead>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5855 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5856 <th class="match_count">Positives <div class="help" data-topic="pop_motif_positives"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5857 <th class="match_count">Negatives <div class="help" data-topic="pop_motif_negatives"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5858 <th class="match_evalue">P-value <div class="help" data-topic="pop_motif_pvalue"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5859 <th class="match_evalue">E-value <div class="help" data-topic="pop_motif_evalue"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5860 <th class="match_evalue">Unerased E-value <div class="help" data-topic="pop_motif_uevalue"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5861 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5862 </thead>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5863 <tbody>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5864 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5865 <td class="match_count">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5866 <span class="tvar_p"></span> / <span class="tvar_p_total"></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5867 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5868 <td class="match_count">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5869 <span class="tvar_n"></span> / <span class="tvar_n_total"></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5870 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5871 <td class="tvar_pvalue match_evalue"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5872 <td class="tvar_evalue match_evalue"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5873 <td class="tvar_uevalue match_evalue"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5874 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5875 </tbody>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5876 </table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5877 <h4>Enriched Matching Words</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5878 <div class="tvar_words"></div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5879 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5880
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5881
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5882 <div class="popup_wrapper">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5883 <div class="popup" style="display:none; top: -150px;" id="download">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5884 <div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5885 <div style="float:right; ">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5886 <div id="outpop_close" class="close" tabindex="0">x</div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5887 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5888 <h2 class="mainh" style="margin:0; padding:0;">Submit or Download</h2>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5889 <div style="clear:both"></div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5890 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5891 <div style="height:100px">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5892 <div style="float:right; width: 30px;">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5893 <div id="outpop_prev" class="navarrow" tabindex="0">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5894 <span class="inactive">&#8679;</span><span class="active">&#11014;</span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5895 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5896 <div id="outpop_num" class="navnum"></div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5897 <div id="outpop_next" class="navarrow" tabindex="0">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5898 <span class="inactive">&#8681;</span><span class="active">&#11015;</span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5899 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5900 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5901 <div id="logo_box" style="height: 100px; margin-right: 40px;">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5902 <canvas id="outpop_logo" height="100" width="250"></canvas>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5903 <canvas id="outpop_logo_rc" height="100" width="250"></canvas>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5904 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5905 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5906 <div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5907 <!-- tabs start -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5908 <div class="tabArea top">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5909 <span id="outpop_tab_1" class="tab">Submit Motif</span><span
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5910 id="outpop_tab_2" class="tab middle">Download Motif</span><span
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5911 id="outpop_tab_3" class="tab middle">Download Logo</span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5912 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5913 <div class="tabMain top">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5914 <!-- Submit to another program -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5915 <div id="outpop_pnl_1">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5916 <h4 class="compact">Submit to program</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5917 <table id="programs" class="programs">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5918 <tr class="dna_only">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5919 <td><input type="radio" name="program" value="tomtom" id="submit_tomtom"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5920 <td><label for="submit_tomtom">Tomtom</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5921 <td><label for="submit_tomtom">Find similar motifs in
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5922 published libraries or a library you supply.</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5923 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5924 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5925 <td><input type="radio" name="program" value="fimo" id="submit_fimo"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5926 <td><label for="submit_fimo">FIMO</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5927 <td><label for="submit_fimo">Find motif occurrences in
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5928 sequence data.</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5929 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5930 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5931 <td><input type="radio" name="program" value="mast" id="submit_mast"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5932 <td><label for="submit_mast">MAST</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5933 <td><label for="submit_mast">Rank sequences by affinity to
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5934 groups of motifs.</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5935 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5936 <tr class="dna_only">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5937 <td><input type="radio" name="program" value="gomo" id="submit_gomo"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5938 <td><label for="submit_gomo">GOMo</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5939 <td><label for="submit_gomo">Identify possible roles (Gene
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5940 Ontology terms) for motifs.</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5941 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5942 <tr class="dna_only">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5943 <td><input type="radio" name="program" value="spamo" id="submit_spamo"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5944 <td><label for="submit_spamo">SpaMo</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5945 <td><label for="submit_spamo">Find other motifs that are
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5946 enriched at specific close spacings which might imply the existance of a complex.</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5947 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5948 </table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5949 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5950 <!-- download text format -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5951 <div id="outpop_pnl_2">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5952 <div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5953 <label for="text_format">Format:</label>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5954 <select id="text_format">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5955 <option value="0">Count Matrix</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5956 <option value="1">Probability Matrix</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5957 <option value="2">Minimal MEME</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5958 </select>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5959 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5960 <textarea id="outpop_text" name="content"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5961 style="width:99%; white-space: pre; word-wrap: normal; overflow-x: scroll;"
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5962 rows="8" readonly="readonly" wrap="off"></textarea>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5963 <a id="outpop_text_dl" download="meme.txt" href=""></a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5964 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5965 <!-- download logo format -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5966 <div id="outpop_pnl_3">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5967 <form id="logo_form" method="post" action="">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5968 <script>$("logo_form").action = site_url + "/utilities/generate_logo";</script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5969 <input type="hidden" name="program" value="DREME"/>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5970 <input type="hidden" id="logo_motifs" name="motifs" value=""/>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5971 <table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5972 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5973 <td><label for="logo_format">Format:</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5974 <td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5975 <select id="logo_format" name="png">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5976 <option value="1">PNG (for web)</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5977 <option value="0">EPS (for publication)</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5978 </select>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5979 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5980 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5981 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5982 <td><label for="logo_rc">Orientation:</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5983 <td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5984 <select id="logo_rc" name="rc1">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5985 <option value="0">Normal</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5986 <option value="1" id="logo_rc_option">Reverse Complement</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5987 </select>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5988 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5989 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5990 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5991 <td><label for="logo_ssc">Small Sample Correction:</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5992 <td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5993 <input type="hidden" id="logo_err" name="errbars" value="0"/>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5994 <select id="logo_ssc" name="ssc">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5995 <option value="0">Off</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5996 <option value="1">On</option>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5997 </select>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5998 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
5999 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6000 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6001 <td><label for="logo_width">Width:</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6002 <td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6003 <input type="text" id="logo_width" size="4" placeholder="default" name="width"/>&nbsp;cm
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6004 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6005 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6006 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6007 <td><label for="logo_height">Height:</label></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6008 <td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6009 <input type="text" id="logo_height" size="4" placeholder="default" name="height"/>&nbsp;cm
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6010 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6011 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6012 </table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6013 </form>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6014 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6015 <!-- Buttons -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6016 <div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6017 <div style="float:left;">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6018 <input type="button" id="outpop_do" value="Submit" />
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6019 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6020 <div style="float:right;">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6021 <input id="outpop_cancel" type="button" value="Cancel" />
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6022 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6023 <div style="clear:both;"></div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6024 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6025 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6026 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6027 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6028 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6029
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6030
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6031
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6032 <!-- Page starts here -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6033 <div id="top" class="pad1">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6034 <div class="prog_logo big">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6035 <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"/>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6036 <h1>DREME</h1>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6037 <h2>Discriminative Regular Expression Motif Elicitation</h2>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6038 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6039 <p class="spaced">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6040 For further information on how to interpret these results or to get a
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6041 copy of the MEME software please access
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6042 <a href="http://meme.nbcr.net/">http://meme.nbcr.net</a>.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6043 </p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6044 <p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6045 If you use DREME in your research please cite the following paper:<br />
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6046 <span class="citation">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6047 Timothy L. Bailey, "DREME: Motif discovery in transcription factor ChIP-seq data", <i>Bioinformatics</i>, <b>27</b>(12):1653-1659, 2011.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6048 <a href="http://bioinformatics.oxfordjournals.org/content/27/12/1653">[full text]</a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6049 </span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6050 </p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6051 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6052 <!-- navigation -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6053 <div class="pad2">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6054 <a class="jump" href="#motifs_sec">Discovered Motifs</a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6055 &nbsp;&nbsp;|&nbsp;&nbsp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6056 <a class="jump" href="#inputs_sec">Inputs &amp; Settings</a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6057 &nbsp;&nbsp;|&nbsp;&nbsp;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6058 <a class="jump" href="#info_sec">Program information</a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6059 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6060 <!-- alert the user when their browser is not up to the task -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6061 <noscript><h1 style="color:red">Javascript is required to view these results!</h1></noscript>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6062 <h1 id="html5_warning" style="color:red; display:none;">Your browser does not support canvas!</h1>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6063 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6064 if (!window.HTMLCanvasElement) $("html5_warning").style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6065 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6066 <!-- description -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6067 <div id="description_section" style="display:none">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6068 <div id="description" class="header">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6069 <h2>Description</h2>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6070 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6071 <div id="description_text" class="box">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6072 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6073 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6074 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6075 if (data.description) {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6076 $("description_text").innerHTML = "";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6077 $("description_text").appendChild(make_description(data.description));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6078 $("description_section").style.display = "block";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6079 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6080 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6081 <!-- motifs -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6082 <div id="motifs_sec" class="header">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6083 <h2>Discovered Motifs</h2>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6084 <span><a href="#inputs_sec">Next</a>&nbsp;<a href="#">Top</a></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6085 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6086 <div id="motifs" class="box">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6087 <p>No motifs were discovered!</p>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6088 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6089 <script>make_motifs();</script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6090 <!-- inputs and settings -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6091 <div id="inputs_sec" class="header">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6092 <h2>Inputs &amp; Settings</h2>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6093 <span><a href="#motifs_sec">Previous</a>&nbsp;<a href="#info_sec">Next</a>&nbsp;<a href="#">Top</a></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6094 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6095 <div class="box">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6096 <h4>Sequences</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6097 <table id="seq_info" class="inputs">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6098 <tr><th>Source <div class="help" data-topic="pop_seq_source"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6099 <th>Alphabet <div class="help" data-topic="pop_seq_alph"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6100 <th>Sequence Count <div class="help" data-topic="pop_seq_count"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6101 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6102 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6103 <td id="ins_seq_source"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6104 <td id="ins_seq_alphabet"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6105 <td id="ins_seq_count"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6106 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6107 </table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6108 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6109 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6110 var db = data.sequence_db;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6111 $("ins_seq_source").innerHTML = db.file;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6112 $("ins_seq_alphabet").innerHTML = dreme_alphabet.get_alphabet_name();
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6113 $("ins_seq_count").innerHTML = db.count;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6114 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6115 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6116 <h4>Control Sequences</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6117 <table id="seq_info" class="inputs">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6118 <tr><th>Source <div class="help" data-topic="pop_seq_source"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6119 <th>Sequence Count <div class="help" data-topic="pop_seq_count"></div></th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6120 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6121 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6122 <td id="ins_cseq_source"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6123 <td id="ins_cseq_count"></td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6124 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6125 </table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6126 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6127 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6128 var db = data.control_db;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6129 if (db.from == "shuffled") {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6130 $("ins_cseq_source").innerHTML = "Shuffled Sequences";
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6131 } else {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6132 $("ins_cseq_source").innerHTML = db.file;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6133 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6134 $("ins_cseq_count").innerHTML = db.count;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6135 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6136 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6137 <h4>Background</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6138 <span id="alpha_bg"></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6139 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6140 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6141 $("alpha_bg").appendChild(make_alpha_bg(dreme_alphabet, data.control_db.freqs));
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6142 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6143 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6144 <h4>Other Settings</h4>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6145 <table id="tbl_settings" class="inputs hide_advanced">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6146 <tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6147 <th>Strand Handling</th>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6148 <td id="opt_strand">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6149 <span class="strand_none">This alphabet only has one strand</span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6150 <span class="strand_given">Only the given strand is processed</span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6151 <span class="strand_both">Both the given and reverse complement strands are processed</span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6152 </td>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6153 </tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6154 <tr><th># REs to Generalize</th><td id="opt_ngen"></td></tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6155 <tr><th>Shuffle Seed</th><td id="opt_seed"></td></tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6156 <tr><th>E-value Threshold</th><td id="opt_stop_evalue"></td></tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6157 <tr><th>Max Motif Count</th><td id="opt_stop_count"></td></tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6158 <tr><th>Max Run Time</th><td id="opt_stop_time"></td></tr>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6159 </table>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6160 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6161 {
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6162 $("opt_strand").className = (dreme_alphabet.has_complement() ? (data.options.revcomp ? "both" : "given") : "none");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6163 $("opt_ngen").innerHTML = data.options.ngen;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6164 $("opt_seed").innerHTML = data.options.seed;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6165 $("opt_stop_evalue").innerHTML = data.options.stop.evalue;
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6166 $("opt_stop_count").innerHTML = (typeof data.options.stop.count == "number" ? data.options.stop.count : "No maximum motif count.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6167 $("opt_stop_time").innerHTML = (typeof data.options.stop.time == "number" ? data.options.stop.time + " seconds." : "No maximum running time.");
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6168 }
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6169 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6170 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6171 <!-- list information on this program -->
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6172 <div id="info_sec" class="bar" style="position:relative">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6173 <div style="position: absolute; right: 0;"><a href="#inputs_sec">Previous</a> <a href="#">Top</a></div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6174 <div class="subsection">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6175 <h5 id="version">DREME version</h5>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6176 <span id="ins_version"></span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6177 (Release date: <span id="ins_release"></span>)<br>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6178 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6179 <script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6180 $("ins_version").innerHTML = data["version"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6181 $("ins_release").innerHTML = data["release"];
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6182 </script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6183 <div class="subsection">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6184 <h5 id="reference">Reference</h5>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6185 <span class="citation">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6186 Timothy L. Bailey, "DREME: Motif discovery in transcription factor ChIP-seq data", <i>Bioinformatics</i>, <b>27</b>(12):1653-1659, 2011.
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6187 <a href="http://bioinformatics.oxfordjournals.org/content/27/12/1653">[full text]</a>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6188 </span>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6189 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6190 <div class="subsection">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6191 <h5 id="command">Command line</h5>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6192 <textarea id="cmd" rows="3" style="width:100%;" readonly="readonly">
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6193 </textarea>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6194 <script>$("cmd").value = data["cmd"].join(" ");</script>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6195 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6196 </div>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6197
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6198 </body>
b386032d758d planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 42fa6e319cf1a97330818dc8c869871a32f0e7aa
iuc
parents:
diff changeset
6199 </html>