Skip to content

analysis & workflow schema

Jeffrey Baumes edited this page Feb 24, 2014 · 4 revisions

Analyses

Each analysis is stored as a separate collection in the TreeStore. These are generated by parsing the .xml files located in the Visomics source tree.

Here is a link to the documentation of this XML format.

Here is a link to a live example of a JSON analysis.

JSON format for TreeStore analyses

    {
    "_id": {"$oid": "mongo generated string"},
    "analysis":
      {
      "@name": "name of analysis",
      "type": "vtkr or vtkpython",
      "inputs":
        {
        "input":
          [
            {"@name": "input_name", "@type": "Table or Tree"},
            ...
          ]
        },
      "outputs":
        {
        "output":
          [
            {
            "@name": "output name", "@type": "Table or Tree",
            "@rawViewType": "default view for output", "@rawViewPrettyName": "pretty name for output"
            },
            ...
          ]
        },
      "parameters":
        {
        "parameter":
          [
            {
            "@name": "parameter name", "@type": "parameter type",
            "title": "parameter title", "description": "parameter instructions",
            /* type-specific fields go here: default, min, max, option, etc. */
            },
            ...
          ]
        },
      "script": "analysis code goes here"
      }
    }

Note that "rawViewType" and "rawViewPrettyName" are currently only used for Visomics, so they should be considered optional for Web-only analyses.

Proposed Changes

Analysis Spec

{
    "@name": "name of analysis",
    "type": "vtkr or vtkpython",
    "inputs": [
        {"@name": "input_name", "@type": "Table or Tree"},
        ...
    ],
    "outputs": [
        {
            "@name": "output name", "@type": "Table or Tree",
            "@rawViewType": "default view for output", "@rawViewPrettyName": "pretty name for output"
        },
        ...
    ],
    "parameters": [
        {
            "@name": "parameter name", "@type": "parameter type",
            "title": "parameter title", "description": "parameter instructions",
            /* type-specific fields go here: default, min, max, option, etc. */
        },
        ...
    ],
    "script": "analysis code goes here"
}

Celery Job Input Spec

{
    "name": "name of analysis",
    "inputs": [
        {
            "name": "input name",
            "type": "Table or Tree",
            "data": "encoded data or URI"
        },
        ...
    ],
    "outputs": [
        {
            "name": "output name (script variable name)",
            "type": "Table or Tree"
        },
        ...
    ],
    "parameters": [
        {
            "name": "parameter name",
            "type": "parameter type",
            "value": "parameter title"
        },
        ...
    ],
    "script": "analysis code goes here"
}

Celery Job Output Spec