Debian Codegraph @

doc/mclpipeline.azm

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 \: setx{__searchpath__}{\__searchpath__\!{}{../../../zoem/mac}}
2 \import{mcx.zmm}
3
4 \begin{pud::man}{
5
6 {name}{mclpipeline}
7 {html_title}{The mclpipeline manual}
8 {author}{Stijn van Dongen}
9 {section}{1}
10 {synstyle}{long}
11 {defstyle}{long}
12
13 \man_share
14 }
15
16 \'${html}{\"pud::man::maketoc"}
17
18 \sec{name}{NAME}
19 \NAME{mclpipeline}{a generic pipeline for generating and scrutinizing mcl clusterings.}
20
21 \cpar{NOTE}{
22 \mcl has acquired the ability to manipulate label input directly. This
23 enables a very lightweight mechanism of generating clusterings by teaming up
24 mcl with a lightweight parser. You might want to use this mechanism.
25 Example invocations using the \mcxdeblast BLAST parser are documented in the
26 \sibref{mcl}{mcl manual}.}
27
28
29 \sec{synopsis}{SYNOPSIS}
30
31 \par{
32 \mclpipeline [options] <file-name>\|
33 }
34
35 \par{
36 where <file-name> is either the name of the data input file, or its base
37 name. In the latter case the \genopt{--xi-dat} option is required. In case
38 mclpipeline is indeed used to control all stages from the data input file
39 onwards, usage will often be like this:
40 }
41
42 \verbatix{\
43 mclpipeline [prepare options] --prepare-mcl <file-name>
44 mclpipeline [cluster options 1] --start-mcl <file-name>
45 mclpipeline [cluster options 2] --start-mcl <file-name>
46 .. etc
47 }
48
49 \par{
50 \mclpipeline can also be used to control shorter pipelines, i.e. in
51 case the input matrix was already created or in case pre-assembled parts
52 of the input matrix were already created. In this case, usage will
53 often be like this:
54 }
55
56 \verbatix{\
57 mclpipeline [cluster options 1] --start-mcl=<fname>
58 mclpipeline [cluster options 2] --start-mcl=<fname>
59 or
60 mclpipeline [assembly options] --start-assemble=<fname> --prepare-mcl
61 }
62
63 \cpar{NOTE}{
64 It is possible to make mclpipeline output a large arrary
65 of performance measures related to nodes and clusters
66 in hyperlinked output by supplying the \genopt{--fmt-fancy} option.
67 This can be useful if one wants to scrutinize a clustering in greater
68 detail and navigate within the clustering. The output then includes
69 listings of external nodes that are relevant/close to a given cluster,
70 and vice versa, listings of external clusters that are relevant/close
71 to a given node.}
72
73 \par{
74 Generating this more intricate output requires the presence of the \zoem macro
75 processor. Refer to the \secref{seealso} section and the
76 \sibref{clmformat}{clmformat manual} for more information on zoem. By default
77 zoem is not required, and the return result is a file where each line contains
78 a clustering consisting of tab-separated labels.}
79
80
81 \par{
82 If this program does not work as expected, please file a bug report with the
83 developer and/or subscribe to mcl-devel as indicated on
84 \httpref{http://micans.org/mcl/}. The problem will then be fixed.
85 }
86
87 \par{
88 The full list of pipeline options is given below. Start simple,
89 and if you need some behaviour, try to see if there is an option
90 that fits your needs.
91 If you use a wrapper pipeline such as \mysib{mclblastline}, you
92 can ignore the \genopt{--parser} and \genopt{--parser-tag} options
93 as they are provided by the wrapper.
94 }
95
96 \par{
97 \mclpipeline
98 \synreqkvp{--parser}{application}{data parser}
99 \synreqkvp{--parser-tag}{str}{parse option transporter}
100 }
101
102 \par{
103 \synoptopt{--whatif}{do not execute}\|
104 \synoptopt{--start-assemble}{skip parse stage}\|
105 \synoptopt{--start-mcl}{skip earlier stages}\|
106 \synoptopt{--start-format}{skip earlier stages}\|
107 \synoptopt{--prepare-mcl}{do preparatory stages}\|
108 \synoptopt{--help}{summary of options}\|
109 \synoptkvp{--xi}{suf}{strip suf from input file}\|
110 \synoptkvp{--xo-dat}{suf}{attach suf to parse output}\|
111 \synoptkvp{--xo-ass}{suf}{attach suf to assembly output}\|
112 \synoptkvp{--xi-mcl}{suf}{use with --start-mcl}\|
113 \synoptkvp{--xo-mcl}{suf}{replace mcl output suffix}\|
114 \synoptkvp{--xa-mcl}{str}{append to mcl output suffix}\|
115 \synoptkvp{--xe-mcl}{suf}{append to mcl output}\|
116 \synoptkvp{--xo-fmt}{suf}{attach suf to clmformat output}\|
117 \synoptkvp{--ass-repeat}{str}{assembly repeat option}\|
118 \synoptopt{--ass-nomap}{ignore map file}\|
119 \synoptkvp{--ass-opt}{val}{assembly option transporter}\|
120 \synoptkvp{--mcl-te}{num}{#expansion threads}\|
121 \synoptkvp{--mcl-I}{float}{mcl inflation value}\|
122 \synoptkvp{--mcl-i}{float}{mcl initial inflation value}\|
123 \synoptkvp{--mcl-l}{float}{mcl initial loop length}\|
124 \synoptkvp{--mcl-c}{float}{mcl center value}\|
125 \synoptkvp{--mcl-pi}{float}{mcl pre-inflation value}\|
126 \synoptkvp{--mcl-scheme}{i}{mcl scheme index}\|
127 \synoptkvp{--mcl-o}{fname}{do not use}\|
128 \synoptkvp{--mcl-opt}{val}{mcl option transporter}\|
129 \synoptkvp{--fmt-lump-count}{num}{collect formatted output}\|
130 \synoptopt{--fmt-opt}{val}{clmformat option transporter}\|
131 \synoptopt{--fmt-tab}{fname}{use this tab file}\|
132 \synoptopt{--fmt-notab}{ignore tab file}\|
133 \: \synoptopt{--fmt-noscores}{omit scores}\|
134 <file-name>
135 }
136
137 \sec{description}{DESCRIPTION}
138
139 \par{
140 \mclpipeline encapsulates a sequence of programs to be run on some
141 input data in order to obtain clusterings and formatted output
142 representing the clusterings, while maintaining unique file names
143 and file name ensembles corresponding with differently parametrized runs.
144 }
145
146 \par{
147 The script can behave in several ways. By default, the pipeline
148 consists of the stages of \it{parsing}, \it{assembly},
149 \it{clustering}, and \it{formatting}.
150 The parsing stage is to be
151 represented by some parser script obeying the interface
152 rules described below. The assembly stage is done by
153 \mysib{mcxassemble}, the clustering stage is done by \mysib{mcl},
154 and the formatting stage is done by \mysib{clmformat}.
155 }
156
157 \par{
158 The script can also be put to simpler uses, e.g. letting the script take
159 care of unique file names for differently parametrized mcl runs. In this
160 case there is no need to specify either the parser or the data file, and
161 subsequent invocations might look like this:
162 }
163
164 \verbatix{
165 mclpipeline --start-mcl=<fname> --mcl-I=1.6 --mcl-scheme=4
166 mclpipeline --start-mcl=<fname> --mcl-I=2.0 --mcl-scheme=4
167 mclpipeline --start-mcl=<fname> --mcl-I=2.4 --mcl-scheme=4
168 .. etc
169 }
170
171 \par{
172 It is easiest if for each parser a wrapper script is written
173 encapsulating the parser and \mclpipeline. A mechanism is provided
174 through which mclpipeline can recognize options that are meant to be
175 passed to the parser. An example of such a wrapper script is the BLAST
176 pipeline \bf{mclblastline} that basically calls mclpipeline with the
177 parameters \usekvp{--parser}{mcxdeblast} \usekvp{--parser-tag}{blast}.
178 In this case the parser is \bf{mcxdeblast}, and mclpipeline will
179 pass any options of the forms \bf{--blast-foo} and \bf{--blast-bar=zut}
180 to the parser (respectively as \bf{--foo} and \bf{--bar=zut}).
181 }
182
183
184 \par{
185 For a given data set the stages of parsing and assembling
186 will often not need to be repeated, especially if there
187 is a well established way of creating a matrix from
188 the input data. In this case, usage
189 will look like
190 }
191
192 \verbatix{
193 mclpipeline [parse/assembly options] --prepare-mcl <file-name>
194 mclpipeline [cluster options 1] --start-mcl <file-name>
195 mclpipeline [cluster options 2] --start-mcl <file-name>
196 mclpipeline [cluster options 3] --start-mcl <file-name>
197 ...
198 }
199
200 \par{
201 Note that \mclpipeline will store the output of those runs
202 in unique file names derived from the parametrizations.
203 }
204
205 \par{
206 There are some options that affect the file names of intermediate
207 results. In the above setup of repeated runs, if used in one run,
208 they must be used in all runs, as \mclpipeline uses them to compute the
209 file names it needs.
210 For the setup above, these options are
211 \genkvp{--xi}{suf},
212 \genkvp{--xo-dat}{suf}, and
213 \genkvp{--xo-ass}{suf}.
214 }
215
216 \par{
217 There are other ways of resuming the pipeline, and one must always take care
218 that options starting with \bf{--xi-}, \bf{--xo-}, \bf{--xa}, or
219 \bf{--xe} are repeated among preparatory and subsequent runs.
220 These tags respectively mnemonize \it{extension in}, \it{extension out},
221 \it{extension append}, and \it{extension extra}.
222 }
223
224 \par{
225 Should one want to experiment with various ways of creating input
226 matrices, then \mclpipeline supplies options to create unique file
227 names and file name ensembles corresponding with different setups and
228 parametrizations. These are \genkvp{--xo-dat}{suf} for the parsing
229 stage and \genkvp{--xo-ass}{suf} for the assembly stage. mclpipeline
230 \it{automatically} generates unique file names for the cluster results,
231 but it does not do so for the parse and assembly results.
232 }
233
234
235 \cpar{Parser interface requirements}{
236 The parser should recognize its last argument as a file name
237 or as the base name of a file.
238 It should produce the files \v{base.raw}, \v{base.hdr},
239 and preferably \v{base.tab} and \v{base.map}, where the base name
240 \v{base} is determined as described below.
241 }
242
243 \par{
244 \mclpipeline will pass its last argument <file-name> to the parser.
245 The parser should recognize the \genkvp{--xi-dat}{suf}
246 and \genkvp{--xo-dat}{suf} options. If the first is present,
247 it should try to strip <file-name> of the suffix specified in
248 the value and use the result as the initial part of the base name
249 for the files it constructs. If stripping does not succeed, it
250 must interpret <file-name> as the base name and append the suffix
251 in order to construct the name of the file it will try to read.
252 If the \genkvp{--xo-dat}{suf} option is present, it must append the
253 suffix specified in the value to the base part as described above.
254 The result is then the full base name to which the \v{raw}, \v{hdr},
255 and other suffixes will be appended.
256 }
257
258 \cpar{Parser interface examples}{}
259
260 \verbatix{\
261 <parser> --xi-dat=abc --xo-dat=xyz foo
262 * parser reads foo.abc, writes foo.xyz.raw, foo.xyz.hdr et cetera.
263 <parser> --xi-dat=abc --xo-dat=xyz foo.abc
264 * idem
265 <parser> --xo-dat=xyz foo.abc
266 * parser reads foo.abc, writes foo.abc.xyz.raw et cetera.
267 <parser> --xi-dat=abc foo.abc
268 * parser reads foo.abc, writes foo.raw, foo.hdr et cetera.
269 <parser> foo.abc
270 * parser reads foo.abc, writes foo.abc.raw, foo.abc.hdr et cetera.
271 }
272
273 \cpar{Output file names construction}{
274 The files of primary interest are the mcl output file and
275 the formatted output produced by clmformat.
276 The pipeline constructs a file name for the mcl output
277 in which several parameters are encoded. The first
278 part of the file name is either the base name for the assembly
279 stage, or simply the name of the input file, depending on
280 whether the option \genkvp{--xo-ass}{suf} was used or not.
281 }
282
283 \par{
284 A suffix encoding key-value pairs is appended. By default
285 it has the form \v{I..s.}, e.g. \v{I20s2}. The latter examples
286 denotes primary inflation value 2.0 and scheme 2.
287 The pipeline will automatically append several other mcl parameters
288 if they are used. These correspond with the pipeline options
289 \genkvp{--mcl-i}{f}, \genkvp{--mcl-l}{i}, \genkvp{--mcl-c}{f},
290 and \genkvp{--mcl-pi}{f},
291 which in turn correspond with the mcl options \genopt{-i}{f},
292 \genopt{-l}{i}, \genopt{-c}{f}, and \genopt{-pi}{f}.
293 The order of appending is alphabetical with capitals preceding
294 lowercase, so a full example is \v{I25c30i35l2pi28s3}.
295 }
296
297 \sec{options}{OPTIONS}
298
299 \begin{itemize}{\mcx_itemopts}
300 \item{\defopt{--whatif}{do not execute}}
301 \car{
302 Shows only what would be done without executing it.
303 Hugely useful!
304 }
305
306 \item{\defopt{--start-assemble}{skip parse stage}}
307 \car{
308 Skip the parse stage, assume the necessary files have been created in a
309 previous run.
310 }
311
312 \item{\defopt{--prepare-mcl}{do preparatory stages}}
313 \car{
314 Do the parsing and assembly stage, then quit. Useful if you
315 want to do multiple cluster runs for a given graph - use
316 \genopt{--start-mcl}
317 }
318
319 \item{\defopt{--start-mcl}{skip earlier stages}}
320 \car{
321 Immediately start the mcl stage.
322 Assume the necessary files have been created in a previous run.
323 }
324
325 \cpar{NOTE}{
326 This option can be used as \genkvp{--start-mcl}{fname}.
327 In this case, no final file name argument need be given, and
328 mcl will use \genarg{fname} as the file name for its input.
329 }
330
331 \par{
332 The difference with \genopt{--start-mcl} is that the latter
333 will assume it is picking up the results of a previous run.
334 The names of those results might include suffixes corresponding
335 with the parse and assembly stage (cf. \genopt{--xo-dat} and
336 \genopt{--xo-ass}).
337 If you are not clear on this (and you should not be), exercise
338 the \genopt{--whatif} option to be sure.
339 }
340
341 \item{\defopt{--start-format}{skip earlier stages}}
342 \car{
343 Immediately start the format stage.
344 Assume the necessary files have been created in a previous run.
345 }
346
347 \item{\defopt{--help}{summary of options}}
348 \car{
349 Print a terse summary of options.
350 }
351
352 \item{\defopt{--xi}{suf}{strip suffix from data file}}
353 \car{
354 In normal usage, this will strip the specified suffix from the data file
355 to obtain the base name for further output.
356 When used with \genkvp{--start-mcl}{fname} the same behaviour is applied
357 to the mcl input file name specified in \genarg{fname}.
358 }
359
360 \item{\defopt{--xo-dat}{suf}{attach suf to parse output}}
361 \car{
362 This suffix will be attached to the base name of the parse output.
363 It can be used to distinguish between different parse parametrizations
364 if this is applicable.
365 }
366
367 \item{\defopt{--xo-ass}{suf}{attach suf to assembly output}}
368 \car{
369 This suffix will be attached to the base name of the assembly output.
370 It can be used to distinguish between different assembly parametrizations
371 if this is applicable.
372 }
373
374 \item{\defopt{--xo-mcl}{suf}{replace mcl output suffix}}
375 \car{
376 This suffix will be used instead of the suffix by default created
377 by the pipeline.
378 }
379
380 \item{\defopt{--xa-mcl}{str}{append to mcl output suffix}}
381 \car{
382 This string will be appended to the suffix by default created
383 by the pipeline.
384 }
385
386 \item{\defopt{--xe-mcl}{suf}{append to mcl output}}
387 \car{
388 This string will be appended as a single suffix to the output base
389 name before mclpipeline appends its own suffix.
390 }
391
392 \item{\defopt{--xo-fmt}{suf}{attach suf to clmformat output}}
393 \car{
394 This suffix will be used instead of the suffix by default used
395 by the formatting stage.
396 }
397
398 \item{\defopt{--ass-repeat}{str}{assembly repeat option}}
399 \car{
400 Corresponds with the \mcxassemble \genopt{-r}{mode} option.
401 Refer to the \mysib{mcxassemble} manual.
402 }
403
404 \item{\defopt{--ass-opt}{val}{assembly option transporter}}
405 \car{
406 Transfer \genopt{-opt}{val} to \mcxassemble.
407 }
408
409 \item{\defopt{--ass-nomap}{ignore map file}}
410 \car{
411 Either no map file is present or it should be ignored.
412 For parsers that don't write map files.
413 }
414
415 \item{\defopt{--mcl-I}{float}{mcl inflation value}}
416 \car{
417 The (main) inflation value mcl should use.
418 \it{This is the primary mcl option}.
419 }
420
421 \item{\defopt{--mcl-scheme}{i}{mcl scheme index}}
422 \car{
423 The scheme index to use. This options is also important.
424 Refer to the \mysib{mcl} manual.
425 }
426
427 \item{\defopt{--mcl-te}{num}{#expansion threads}}
428 \car{
429 The number of threads \mcl should use.
430 }
431
432 \item{\defopt{--mcl-i}{float}{mcl initial inflation value}}
433 \car{
434 The initial inflation value mcl should use.
435 Only for fine-tuning or testing.
436 }
437
438 \item{\defopt{--mcl-l}{float}{mcl initial loop length}}
439 \car{
440 The length of the loop in which initial inflation
441 is applied. By default zero.
442 }
443
444 \item{\defopt{--mcl-c}{float}{mcl center value}}
445 \car{
446 The center value. One may attempt to affect granularity
447 by exercising this option, which controls the loop weights
448 in the input matrix. Refer to the \mysib{mcl} manual.
449 }
450
451
452 \item{\defopt{--mcl-pi}{float}{mcl pre-inflation value}}
453 \car{
454 Pre-inflation, another option which may possibly affect granularity by
455 changing the input matrix. It makes the edge weight
456 distribution either more or less homogeneous.
457 Refer to the \mysib{mcl} manual.
458 }
459
460 \item{\defopt{--mcl-o}{fname}{do not use}}
461 \car{
462 Set the mcl output name.
463 }
464
465 \item{\defopt{--mcl-opt}{val}{mcl option transporter}}
466 \car{
467 Transfer \genopt{-opt}{val} to \mcl.
468 }
469
470 \item{\defopt{--fmt-dump-stats}{add simple measures to dump file}}
471 \car{
472 This adds some simple performance measures to the dump file. For each
473 cluster, five columns proceed the label listing. These are the cluster ID,
474 the number of elements in the cluster, the projection (percentage of
475 within-cluster edge weight relative to total outgoing edge weight), the
476 efficiency of the cluster (which is the average of the efficiency of all its
477 nodes), and the maximum efficiency (average of the max-efficiency of all the
478 nodes). Look into the \sibref{clmformat}{clmformat manual} for more
479 information on and references to the efficiency measures.
480 }
481
482 \item{\defopt{--fmt-fancy}{create detailed output (requires zoem)}}
483 \car{
484 Creates extensive description of node/cluster and cluster/cluster
485 relationships.
486 }
487
488 \item{\defopt{--fmt-lump-count}{num}{collect formatted output}}
489 \car{
490 Collect clusters in the same file until the total number
491 of nodes has exceeded \genarg{num} (in the formatted output).
492 Only meaninful when \genopt{--fmt-fancy} is given.
493 }
494
495 \item{\defopt{--fmt-tab}{use this tab file}}
496 \car{
497 Explicitly specify the tab file to use.
498 }
499
500 \item{\defopt{--fmt-notab}{ignore tab file}}
501 \car{
502 Either no tab file is present or it should be ignored.
503 For parsers that don't write tab files.
504 }
505
506 \item{\defopt{--fmt-opt}{val}{clmformat option transporter}}
507 \car{
508 Transfer \genopt{-opt}{val} to \clmformat.
509 }
510
511 \: \item{\defopt{--fmt-noscores}{omit scores}}
512 \: Do not write cohesion and stickiness scores in the formatted output.
513 \end{itemize}
514
515 \sec{author}{AUTHOR}
516 \par{
517 Stijn van Dongen
518 }
519
520 \sec{seealso}{SEE ALSO}
521 \par{
522 \mysib{mcxdeblast}, \mysib{mclblastline},
523 and \mysib{mclfamily} for an overview of all the documentation
524 and the utilities in the mcl family.
525 }
526
527 \par{
528 With default settings, \mclpipeline depends on the presence
529 of \zoem. It can be obtained from
530 \httpref{http://micans.org/zoem/} .
531 }
532
533 \end{pud::man}
534