jflow-core.html 9.87 KB
Newer Older
1
2
3
4
5
6
7
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
    	<title>Jflow</title>

		<!-- Le styles -->
Jerome Mariette's avatar
Jerome Mariette committed
8
		<link href="css/bootstrap.css" rel="stylesheet">
9
10
11
12
13
14
		<style type="text/css">
		body {
			padding-top: 60px;
			padding-bottom: 40px;
		}
		</style>
Jerome Mariette's avatar
Jerome Mariette committed
15
		<link href="css/bootstrap-responsive.css" rel="stylesheet">
Jerome Mariette's avatar
Jerome Mariette committed
16
17
		<link href="../src/js/datepicker.css" rel="stylesheet">
		<link href="../src/js/jflow.css" rel="stylesheet">
18
19
    	<link rel="shortcut icon" href="../assets/ico/favicon.png">
    	   	
Jerome Mariette's avatar
Jerome Mariette committed
20
21
    	<link href="css/docs.css" rel="stylesheet">
    	<link href="js/google-code-prettify/prettify.css" rel="stylesheet">
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
	</head>

	<body>
    
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a class="brand" href="#">Jflow</a>
					<div class="nav-collapse collapse">
						<ul class="nav">
							<li><a href="./index.html">About</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
38
39
							<li class="active"><a href="./jflow-core.html">Core</a></li>
							<li><a href="./jflow-plugin.html">Plugin</a></li>
40
41
42
43
44
45
46
47
48
49
50
51
							<li><a href="./example.html">Examples</a></li>
							<li><a target="_blank" href="https://mulcyber.toulouse.inra.fr/plugins/mediawiki/wiki/jflow/index.php/Accueil">Sources</a></li>
							<li><a href="mailto:support.genopole@toulouse.inra.fr">Contact</a></li>
						</ul>
					</div><!--/.nav-collapse -->
				</div>
			</div>
		</div>

		<!-- Subhead ================================================== -->
		<header class="jumbotron subhead" id="overview">
  			<div class="container">
Jerome Mariette's avatar
Jerome Mariette committed
52
				<h1>Jflow documentation</h1>
53
				<p class="lead">
Jerome Mariette's avatar
Jerome Mariette committed
54
					dlsjdlksjlksjdsd
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
				</p>
  			</div>
		</header>

	<div class="container">
		<div class="row">
			<div class="span3 bs-docs-sidebar">
				<ul class="nav nav-list bs-docs-sidenav affix">
					<li class="active"><a href="#plugin-insertion"><i class="icon-chevron-right"></i> plugin insertion</a></li>
					<li><a href="#series"><i class="icon-chevron-right"></i> series</a></li>
					<li><a href="#fnClickCallback"><i class="icon-chevron-right"></i> fnClickCallback</a></li>
					<li><a href="#disableClick"><i class="icon-chevron-right"></i> disableClick</a></li>
					<li><a href="#useValues"><i class="icon-chevron-right"></i> useValues</a></li>
					<li><a href="#exporting"><i class="icon-chevron-right"></i> exporting</a></li>
		    	</ul>
		  	</div>
		  	
		  	<div class="span9">
		  		<section id="plugin-insertion">
					<div class="page-header">
				    	<h1>Plugin insertion</h1>
					</div>
				  	<p>In order to use jquery.venny, you need to import within your web page: </p>
				  	<ul>
				  		<li><a href="http://jquery.com/">jQuery v1.6.x or higher</a></li>
				  		<li><a href="js/jquery.venny.min.js">jquery.venny.min.js</a></li>
				  	</ul>
				  	<p>Take a peek at the code below, a single function call to initialise the venn diagram is all it takes:</p> 
				  	<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
        name: 'Actors',
        data: ["Marilyn Monroe", "Arnold Schwarzenegger", "Jack Nicholson", "Barbra Streisand", "Robert de Niro", "Dean Martin", "Harrison Ford"]
      }, {
        name: 'Singers',
        data: ["Freddy Mercury", "Barbra Streisand", "Dean Martin", "Ricky Martin", "Celine Dion", "Marilyn Monroe"]
      }]
  });
});
					</pre>
				</section>
				
		  		<section id="series">
					<div class="page-header">
				    	<h1>series: the data in json</h1>
					</div>
				  	<p>The serie can be a list of value, the plugin will then compute itself the intersections between lists.</p>
				  	<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
        name: 'Actors',
        data: ["Marilyn Monroe", "Arnold Schwarzenegger", "Jack Nicholson", "Barbra Streisand", "Robert de Niro", "Dean Martin", "Harrison Ford"]
      }, {
        name: 'Singers',
        data: ["Freddy Mercury", "Barbra Streisand", "Dean Martin", "Ricky Martin", "Celine Dion", "Marilyn Monroe"]
      }]
  });
});
					</pre>
					<p> The serie can also define the number of occurence for each intersections.</p>
					<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
      name: {A: 'List 1',
                  B: 'List 2',
                  C: 'List 3',
                  D: 'List 4'},
      data: {A: 340, B: 562, C: 620, D: 592,
                AB: 639, AC: 456, AD: 257, BC: 915,
                BD: 354, CD: 143, ABC: 552, ABD: 578,
                ACD: 298, BCD: 613, ABCD: 148}
     }]
  });
});
					</pre>
					<p>Finaly, the serie can define the list values with the number of occurence for each value.</p>
					<pre class="prettyprint">
$(document).ready(function(){
  $('#example').venny({
    series: [{
          name: 'sample1',
          data: ["Otu1", "Otu2", "Otu3", "Otu4", "Otu5"],
          values: [5, 15, 250, 20, 23]
       },{
          name: 'sample2',
          data: ["Otu1", "Otu5", "Otu6", "Otu7"],
          values: [234, 29, 239, 5]
       }]
  });
});
					</pre>
				</section>
				
				<section id="fnClickCallback">
					<div class="page-header">
				    	<h1>fnClickCallback</h1>
					</div>
				  	<p>The callback function to execute when the user click on a number. </p>
				  	<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
      name: {A: 'List 1',
                  B: 'List 2',
                  C: 'List 3',
                  D: 'List 4'},
      data: {A: 340, B: 562, C: 620, D: 592,
                AB: 639, AC: 456, AD: 257, BC: 915,
                BD: 354, CD: 143, ABC: 552, ABD: 578,
                ACD: 298, BCD: 613, ABCD: 148}
    }],
    fnClickCallback: function() {
      var value = "";
      if (this.listnames.length == 1) {
        value += "Elements only in ";
      } else {
        value += "Common elements in ";
      }
      for (name in this.listnames) {
         value += this.listnames[name] + " ";
      }
      value += ":\n";
      for (val in this.list) {
        value += this.list[val] + "\n";
      }
      alert(value);
    }
  });
});
					</pre>
				</section>
				
				<section id="disableClick">
					<div class="page-header">
				    	<h1>disableClick</h1>
					</div>
				  	<p>Default is false, if set to true, the click on the number si disabled.</p>
				  	<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
        name: 'Actors',
        data: ["Marilyn Monroe", "Arnold Schwarzenegger", "Jack Nicholson", "Barbra Streisand", "Robert de Niro", "Dean Martin", "Harrison Ford"]
      }, {
        name: 'Singers',
        data: ["Freddy Mercury", "Barbra Streisand", "Dean Martin", "Ricky Martin", "Celine Dion", "Marilyn Monroe"]
      }],
      disableClick: true
  });
});
					</pre>
				</section>
				
				<section id="useValues">
					<div class="page-header">
				    	<h1>useValues</h1>
					</div>
				  	<p>Default is false, if set to true, the values provided in a mixte serie will be considered as the number of occurence of the element.</p>
				  	<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
          name: 'sample1',
          data: ["Otu1", "Otu2", "Otu3", "Otu4", "Otu5", "Otu6", "Otu7"],
          values: [5, 15, 250, 20, 23, 58, 89]
       }],
      useValues: true
  });
});
					</pre>
				</section>
				
				<section id="exporting">
					<div class="page-header">
				    	<h1>exporting</h1>
					</div>
				  	<p>Default is true, an export module is added to the window, if set to false the export module is disabled.</p>
				  	<pre class="prettyprint linenums">
$(document).ready(function(){
  $('#example').venny({
    series: [{
          name: 'sample1',
          data: ["Otu1", "Otu2", "Otu3", "Otu4", "Otu5", "Otu6", "Otu7"],
          values: [5, 15, 250, 20, 23, 58, 89]
       }],
      exporting: false
  });
});
					</pre>
				</section>				
		  	</div>
		</div>

		<!-- Footer -->
    	<footer class="footer">
      		<div class="container">
        		<p>Copyright © 2013, INRA | Designed by GenoToul Bioinfo and Sigenae teams.</p>
        		<p>Code licensed under ....</p>
        		<ul class="footer-links">
          			<li><a href="http://bioinfo.genotoul.fr/" target="_blank">GenoToul Bioinfo platform</a></li>
          			<li class="muted">&middot;</li>
          			<li><a href="http://www.sigenae.org/" target="_blank">Sigenae platform</a></li>
          			<li class="muted">&middot;</li>
          			<li><a href="http://www.international.inra.fr/" target="_blank">INRA</a></li>
        		</ul>
      		</div>
    	</footer>

		<!-- Le javascript
		================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
		<script src='http://code.jquery.com/jquery.min.js' type='text/javascript'></script>
Jerome Mariette's avatar
Jerome Mariette committed
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
		<script src="js/bootstrap-transition.js"></script>
		<script src="js/bootstrap-alert.js"></script>
		<script src="js/bootstrap-modal.js"></script>
		<script src="js/bootstrap-dropdown.js"></script>
		<script src="js/bootstrap-scrollspy.js"></script>
		<script src="js/bootstrap-tab.js"></script>
		<script src="js/bootstrap-tooltip.js"></script>
		<script src="js/bootstrap-popover.js"></script>
		<script src="js/bootstrap-button.js"></script>
		<script src="js/bootstrap-collapse.js"></script>
		<script src="js/bootstrap-carousel.js"></script>
		<script src="js/bootstrap-typeahead.js"></script>
		<script src="js/bootstrap-affix.js"></script>
		<script src="js/holder/holder.js"></script>
    	<script src="js/google-code-prettify/prettify.js"></script>
	    <script src="js/application.js"></script>
287
288
289

	</body>
</html>