mclpipeline(1)

πŸ“¦ version 14-137, in ubuntu jammy

okay bestie, sit down, hydrate, we're doing pipelines today πŸ’…βœ¨

This is the manual page for mclpipeline, a USER COMMANDS situation, and honestly? It's about to be your whole personality. No cap.

🌸 NAME 🌸

mclpipeline β€” a generic pipeline for generating and scrutinizing mcl clusterings.

πŸŽ€ NOTE πŸŽ€

mcl has acquired the ability to manipulate label input directly. This enables a very lightweight mechanism of generating clusterings by teaming up mcl with a lightweight parser. You might want to use this mechanism. Example invocations using the mcxdeblast BLAST parser are documented in the mcl manual.


πŸ¦‹ SYNOPSIS πŸ¦‹

mclpipeline [options] <file-name>

where <file-name> is either the name of the data input file, or its base name. In the latter case the --xi-dat option is required. In case mclpipeline is indeed used to control all stages from the data input file onwards, usage will often be like this:

mclpipeline [prepare options] --prepare-mcl <file-name>
mclpipeline [cluster options 1] --start-mcl <file-name>
mclpipeline [cluster options 2] --start-mcl <file-name>
.. etc

mclpipeline can also be used to control shorter pipelines, i.e. in case the input matrix was already created or in case pre-assembled parts of the input matrix were already created. In this case, usage will often be like this:

mclpipeline [cluster options 1] --start-mcl=<fname>
mclpipeline [cluster options 2] --start-mcl=<fname>

or

mclpipeline [assembly options] --start-assemble=<fname> --prepare-mcl

✨ NOTE ✨

It is possible to make mclpipeline output a large array of performance measures related to nodes and clusters in hyperlinked output by supplying the --fmt-fancy option. This can be useful if one wants to scrutinize a clustering in greater detail and navigate within the clustering. The output then includes listings of external nodes that are relevant/close to a given cluster, and vice versa, listings of external clusters that are relevant/close to a given node.

Generating this more intricate output requires the presence of the zoem macro processor. Refer to the SEE ALSO section and the clmformat manual for more information on zoem. By default zoem is not required, and the return result is a file where each line contains a clustering consisting of tab-separated labels.

If this program does not work as expected, please file a bug report with the developer and/or subscribe to mcl-devel as indicated on http://micans.org/mcl/. The problem will then be fixed. (yes, actually do this, they're nice about it πŸ™ˆ)

The full list of pipeline options is given below. Start simple, and if you need some behaviour, try to see if there is an option that fits your needs. If you use a wrapper pipeline such as mclblastline(1), you can ignore the --parser and --parser-tag options as they are provided by the wrapper.

mclpipeline --parser=application (data parser) --parser-tag=str (parse option transporter)

[--whatif (do not execute)]
[--start-assemble (skip parse stage)]
[--start-mcl (skip earlier stages)]
[--start-format (skip earlier stages)]
[--prepare-mcl (do preparatory stages)]
[--help (summary of options)]
[--xi=suf (strip suf from input file)]
[--xo-dat=suf (attach suf to parse output)]
[--xo-ass=suf (attach suf to assembly output)]
[--xi-mcl=suf (use with --start-mcl)]
[--xo-mcl=suf (replace mcl output suffix)]
[--xa-mcl=str (append to mcl output suffix)]
[--xe-mcl=suf (append to mcl output)]
[--xo-fmt=suf (attach suf to clmformat output)]
[--ass-repeat=str (assembly repeat option)]
[--ass-nomap (ignore map file)]
[--ass-opt=val (assembly option transporter)]
[--mcl-te=num (#expansion threads)]
[--mcl-I=float (mcl inflation value)]
[--mcl-i=float (mcl initial inflation value)]
[--mcl-l=float (mcl initial loop length)]
[--mcl-c=float (mcl center value)]
[--mcl-pi=float (mcl pre-inflation value)]
[--mcl-scheme=i (mcl scheme index)]
[--mcl-o=fname (do not use)]
[--mcl-opt=val (mcl option transporter)]
[--fmt-lump-count=num (collect formatted output)]
[--fmt-opt val (clmformat option transporter)]
[--fmt-tab fname (use this tab file)]
[--fmt-notab (ignore tab file)]
<file-name>

πŸ’œ DESCRIPTION πŸ’œ

mclpipeline encapsulates a sequence of programs to be run on some input data in order to obtain clusterings and formatted output representing the clusterings, while maintaining unique file names and file name ensembles corresponding with differently parametrized runs.

The script can behave in several ways. By default, the pipeline consists of the stages of parsing, assembly, clustering, and formatting. The parsing stage is to be represented by some parser script obeying the interface rules described below. The assembly stage is done by mcxassemble(1), the clustering stage is done by mcl(1), and the formatting stage is done by clmformat(1).

The script can also be put to simpler uses, e.g. letting the script take care of unique file names for differently parametrized mcl runs. In this case there is no need to specify either the parser or the data file, and subsequent invocations might look like this:

mclpipeline --start-mcl=<fname> --mcl-I=1.6 --mcl-scheme=4
mclpipeline --start-mcl=<fname> --mcl-I=2.0 --mcl-scheme=4
mclpipeline --start-mcl=<fname> --mcl-I=2.4 --mcl-scheme=4
.. etc

It is easiest if for each parser a wrapper script is written encapsulating the parser and mclpipeline. A mechanism is provided through which mclpipeline can recognize options that are meant to be passed to the parser. An example of such a wrapper script is the BLAST pipeline mclblastline that basically calls mclpipeline with the parameters --parser=mcxdeblast --parser-tag=blast. In this case the parser is mcxdeblast, and mclpipeline will pass any options of the forms --blast-foo and --blast-bar=zut to the parser (respectively as --foo and --bar=zut). iconic, honestly 🫢

For a given data set the stages of parsing and assembling will often not need to be repeated, especially if there is a well established way of creating a matrix from the input data. In this case, usage will look like

mclpipeline [parse/assembly options] --prepare-mcl <file-name>
mclpipeline [cluster options 1] --start-mcl <file-name>
mclpipeline [cluster options 2] --start-mcl <file-name>
mclpipeline [cluster options 3] --start-mcl <file-name>
...

Note that mclpipeline will store the output of those runs in unique file names derived from the parametrizations.

There are some options that affect the file names of intermediate results. In the above setup of repeated runs, if used in one run, they must be used in all runs, as mclpipeline uses them to compute the file names it needs. For the setup above, these options are --xi=suf, --xo-dat=suf, and --xo-ass=suf.

There are other ways of resuming the pipeline, and one must always take care that options starting with --xi-, --xo-, --xa, or --xe are repeated among preparatory and subsequent runs. These tags respectively mnemonize extension in, extension out, extension append, and extension extra.

Should one want to experiment with various ways of creating input matrices, then mclpipeline supplies options to create unique file names and file name ensembles corresponding with different setups and parametrizations. These are --xo-dat=suf for the parsing stage and --xo-ass=suf for the assembly stage. mclpipeline automatically generates unique file names for the cluster results, but it does not do so for the parse and assembly results.

🧚 Parser interface requirements 🧚

The parser should recognize its last argument as a file name or as the base name of a file. It should produce the files base.raw, base.hdr, and preferably base.tab and base.map, where the base name base is determined as described below.

mclpipeline will pass its last argument <file-name> to the parser. The parser should recognize the --xi-dat=suf and --xo-dat=suf options. If the first is present, it should try to strip <file-name> of the suffix specified in the value and use the result as the initial part of the base name for the files it constructs. If stripping does not succeed, it must interpret <file-name> as the base name and append the suffix in order to construct the name of the file it will try to read. If the --xo-dat=suf option is present, it must append the suffix specified in the value to the base part as described above. The result is then the full base name to which the raw, hdr, and other suffixes will be appended.

🌈 Parser interface examples 🌈

  • <parser> --xi-dat=abc --xo-dat=xyz foo
    • parser reads foo.abc, writes foo.xyz.raw, foo.xyz.hdr et cetera.
  • <parser> --xi-dat=abc --xo-dat=xyz foo.abc
    • idem
  • <parser> --xo-dat=xyz foo.abc
    • parser reads foo.abc, writes foo.abc.xyz.raw et cetera.
  • <parser> --xi-dat=abc foo.abc
    • parser reads foo.abc, writes foo.raw, foo.hdr et cetera.
  • <parser> foo.abc
    • parser reads foo.abc, writes foo.abc.raw, foo.abc.hdr et cetera.

πŸ‘‘ Output file names construction πŸ‘‘

The files of primary interest are the mcl output file and the formatted output produced by clmformat. The pipeline constructs a file name for the mcl output in which several parameters are encoded. The first part of the file name is either the base name for the assembly stage, or simply the name of the input file, depending on whether the option --xo-ass=suf was used or not.

A suffix encoding key-value pairs is appended. By default it has the form I..s., e.g. I20s2. The latter examples denotes primary inflation value 2.0 and scheme 2. The pipeline will automatically append several other mcl parameters if they are used. These correspond with the pipeline options --mcl-i=f, --mcl-l=i, --mcl-c=f, and --mcl-pi=f, which in turn correspond with the mcl options -i f, -l i, -c f, and -pi f. The order of appending is alphabetical with capitals preceding lowercase, so a full example is I25c30i35l2pi28s3.


✨ OPTIONS ✨

  • --whatif β€” (do not execute). Shows only what would be done without executing it. Hugely useful! πŸ”₯
  • --start-assemble β€” (skip parse stage). Skip the parse stage, assume the necessary files have been created in a previous run.
  • --prepare-mcl β€” (do preparatory stages). Do the parsing and assembly stage, then quit. Useful if you want to do multiple cluster runs for a given graph β€” use --start-mcl.
  • --start-mcl β€” (skip earlier stages). Immediately start the mcl stage. Assume the necessary files have been created in a previous run.
## πŸ’€ NOTE πŸ’€ This option can be used as --start-mcl=fname. In this case, no final file name argument need be given, and mcl will use fname as the file name for its input. The difference with --start-mcl is that the latter will assume it is picking up the results of a previous run. The names of those results might include suffixes corresponding with the parse and assembly stage (cf. --xo-dat and --xo-ass). If you are not clear on this (and you should not be), exercise the --whatif option to be sure. fr fr, just run --whatif bestie, it costs you nothing πŸ’–

  • --start-format β€” skip the earlier stages and jump straight into the format stage, bestie. It assumes the files it needs were already made in a previous run. ✨
  • --help β€” prints a short and sweet summary of the options. That's the whole job. πŸ’…
  • --xi suf β€” in normal usage, this strips the specified suffix suf from the data file to get the base name for further output. When you use it with --start-mcl=fname, the same behavior is applied to the mcl input file name specified in fname. πŸŽ€
  • --xo-dat suf β€” attaches suf to the base name of the parse output. Use it to tell different parse parametrizations apart if that applies. πŸ¦‹
  • --xo-ass suf β€” attaches suf to the base name of the assembly output. Use it to distinguish different assembly parametrizations if that applies. 🌸
  • --xo-mcl suf β€” use suf instead of the mcl output suffix that the pipeline creates by default. πŸ’–
  • --xa-mcl str β€” appends str to the mcl output suffix that the pipeline creates by default. πŸ“Ž
  • --xe-mcl suf β€” appends suf as a single suffix to the output base name before mclpipeline appends its own suffix. 🌟
  • --xo-fmt suf β€” use suf instead of the suffix the formatting stage uses by default for clmformat output. ✨
  • --ass-repeat str β€” corresponds with the mcxassemble -r mode option. Go read the mcxassemble(1) manual for the deets. πŸ”
  • --ass-opt val β€” assembly option transporter. Transfers -opt val to mcxassemble. πŸ“¦
  • --ass-nomap β€” ignore the map file. Either no map file is present or it should be ignored. For parsers that don't write map files. πŸ—ΊοΈ
  • --mcl-I float β€” the (main) inflation value mcl should use. This is the primary mcl option, no cap. πŸ”₯
  • --mcl-scheme i β€” the scheme index to use. This option is also important. Refer to the mcl(1) manual. πŸ‘‘
  • --mcl-te num β€” the number of threads mcl should use. Parallel bestie behavior. 🧡
  • --mcl-i float β€” the initial inflation value mcl should use. Only for fine-tuning or testing. πŸ™ˆ
  • --mcl-l float β€” the length of the loop in which initial inflation is applied. By default zero. πŸŒ€
  • --mcl-c float β€” the center value. One may attempt to affect granularity by exercising this option, which controls the loop weights in the input matrix. Refer to the mcl(1) manual. βš–οΈ
  • --mcl-pi float β€” pre-inflation, another option which may possibly affect granularity by changing the input matrix. It makes the edge weight distribution either more or less homogeneous. Refer to the mcl(1) manual. 🌈
  • --mcl-o fname β€” set the mcl output name. do not use. πŸ’€
  • --mcl-opt val β€” mcl option transporter. Transfers -opt val to mcl. πŸ“¦
  • --fmt-dump-stats β€” adds some simple performance measures to the dump file. For each cluster, five columns come before the label listing. These are the cluster ID, the number of elements in the cluster, the projection (percentage of within-cluster edge weight relative to total outgoing edge weight), the efficiency of the cluster (which is the average of the efficiency of all its nodes), and the maximum efficiency (average of the max-efficiency of all the nodes). Look into the clmformat manual for more information on and references to the efficiency measures. πŸ“Š
  • --fmt-fancy β€” creates an extensive description of node/cluster and cluster/cluster relationships. Requires zoem. 🌟
  • --fmt-lump-count num β€” collects clusters in the same file until the total number of nodes has exceeded num (in the formatted output). Only meaningful when --fmt-fancy is given. 🧺
  • --fmt-tab β€” explicitly specify the tab file to use. πŸŽ€
  • --fmt-notab β€” ignore the tab file. Either no tab file is present or it should be ignored. For parsers that don't write tab files. 🚫
  • --fmt-opt val β€” clmformat option transporter. Transfers -opt val to clm format. πŸ“¦

πŸ’– AUTHOR πŸ’–

Stijn van Dongen. πŸ‘‘


🌈 SEE ALSO 🌈

mcxdeblast(1), mclblastline(1), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

With default settings, mclpipeline depends on the presence of zoem. It can be obtained from http://micans.org/zoem/ .


This page is mclpipeline(1), version 14-137, dated 16 May 2014. Stay iconic, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from