Analysis Chains
Introduction
An analysis chain is a directed acyclic graph representing data flow. The graph's nodes are analysis modules and edges are data-dependency links, which specify that the output of one module in the chain should be presented as inputs to another module. Every formal input in the chain is either free or bound. The bound inputs are those which have links connected to them. The free inputs do not. Here is a more detailed overview about analysis chains.
The analysis engine (AE) executes analysis chains against a data-set of images. Since modules are assumed to be deterministic, the AE reuses the results of a module if it determines that module has been executed before. Read this overview to learn more about analysis chain execution.
Defining Analysis Chains
Analysis chains, similarly to Analysis Modules and Semantic types, are defined in XML according to the Analysis Chain schema.
Figure 1 is a schematically illustration of an Analysis Chain for computing an image's Haralick textures. The Original Files -> Image Import modules are special OME modules for accessing an image's pixels. All analysis chains that do pixel processing will begin with this motif. Images in OME are 5D (spatial extents, focal plane, wavelengths, timepoints) however many algorithms e.g. Haralick Textures only work on 2D images. Create Pixels Slices -> Create Plane Slices doesn't affect 2D images but it does divide 3D, 4D, and 5D images into their constituent planes.
An Analysis Chain XML definition is a specification of the chain
DAG's vertices <Nodes> ... </Node>
and edges
<Links> ... </Links>
. Since multiple instances of
the same analysis module, presumably with different inputs, can be in
an analysis chain the NodeID
tag exists to differntiate
between the various analysis modules that are referenced with the
ProgramName
tag.
<AnalysisChains xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... > <AnalysisChain Name="Haralick Chain" Locked="false"> <Nodes> <Node NodeID = "Files" ProgramName = "Original files"/> <Node NodeID = "Import" ProgramName = "Image import"/> <Node NodeID = "TypeCast" ProgramName="Create pixels slices"/> <Node NodeID = "Deli" ProgramName="Create plane slices"/> <Node NodeID = "HaralickFeatures" ProgramName="Haralick Features 2D"/> </Nodes> <Links> <Link FromNodeID="Files" FromOutputName="Files" ToNodeID="Import" ToInputName="Files"/> <Link FromNodeID="Import" FromOutputName="Pixels" ToNodeID="TypeCast" ToInputName="Pixels"/> <Link FromNodeID="TypeCast" FromOutputName="Slices" ToNodeID="Deli" ToInputName="Slices"/> <Link FromNodeID="Deli" FromOutputName="Plane slices" ToNodeID="HaralickFeatures" ToInputName="Pixels Plane Slice"/> </Links> </AnalysisChain> </AnalysisChains>
Although it is possible to create analysis chains by directly writing the XML, it is usually much better to use Shoola's Chain Builder and take advantage of its graphical interface and error checking. Chains made using Chain Builder can be exported outside of OME into XML files using ome commander.