The Manifest

The manifest file is used to provide metadata and parameters for packages uploaded to Strateos. It can be thought of as a markdown language you can use to create a graphical user interface for your protocols so that they can be parameterized and launched easily through the web app.

The basic structure of a manifest.json file is as follows:

{
  "format": "python",
  "license": "MIT",
  "protocols": [
    {
      "name": "sample5",
      "version": "1.0.0",
      "display_name": "Sample Protocol #5", 
            "description": "This is a sample protocol.",
      "command_string": "python sample5.py",
      "inputs": {},
      "preview": {
        "refs":{},
        "parameters": {}
            }
    }
  ]
}

📘

A useful tool for editing your manifest can be found at http://jsoneditoronline.com

Many protocols in one manifest

A manifest may contain one or multiple protocols in its protocols array. The best way to organize a directory containing multiple protocols is to have the manifest file referring to all of them at the root of the directory and code for each of the protocols in separate subfolders. The command_string field should call each one accordingly.

For example, if your language of choice is Python, your directory structure would look something like:

my_package/
    protocol_1/
        __init__.py
        protocol.py
    protocol_2/
        __init__.py
        protocol.py
   manifest.json

and your manifest.json would call each protocol as a module:

{
  "protocols": [
    {
      "name": "protocol1",
      "version": "1.1.2",
      "display_name": "My First Protocol", 
      "command_string": "python -m protocol_1.protocol",
      ...
    },
    {
      "name": "protocol2",
      "version": "2.0.5",
      "display_name": "My Second Protocol",
      "command_string": "python -m protocol_2.protocol",
      ...
    }
  ]
  ...
}

Protocol specific information

Here we will outline the various fields within a manifest:

name

This is a shortname for your protocol, usually one CamelCased word. This is the name you will use to refer to your protocol when you run transcriptic preview or transcriptic analyze from the command-line (more on that later). This name will appear in the protocol browser on secure.strateos.com unless you specify another name in the display_name field.

command_string

This is a string that represents exactly how you would run your protocol from the command-line from the directory that your manifest.json file is located in. Keeping it simple, assuming your protocol was in the same directory as your manifest.json file and was called sample_protocol.py, the command string would be python sample_protocol.py.

parameters

Parameters specified in this stanza get passed to the protocol script specified in the
command string. Parameters must be passed in the format expected by their input type.

inputs

An input refers to an editable field on a protocol within the protocol browser, they will allow you to replace the parameters you hard-coded into the preview once the protocol is uploaded as a package to the web app. There are several types of inputs and they're outlined here

Inputs can optionally have a description, default, and label. Inputs are assumed to be required automatically and will throw an error in the UI if not completed unless the field "required": false is included in the manifest for a given input.

Values must be supplied for each input within the parameters section of your preview unless the input has either a default value or specifies "required": "false". The value of each input is either the parameter's appropriate input type or an object describing further options for the field.

For example:

"inputs": {
    "sample_vol": {
    "type":"volume",
    "label": "Sample Volume",
    "description": "The volume of the sample",
    "default": "10:microliter"
  },
    "samples": {
    "type": "aliquot+",
    "label": "Samples to PCR"
    },
    "additives (optional)": {
    "type": "aliquot",
    "label": "Additives for PCR",
    "required": false
    },
    "gel": {
    "type": "bool",
    "label": "Run a gel?",
    "default": true
  }, 
    "gel_type": {
    "type": "choice,
    "label": "Gel Type",
    "options": [
      {
        "name": "2% agarose", 
        "value": "agarose(10,2%)"
      },
      {
        "name": "0.8% agarose",
        "value": "agarose(10,0.8%)"
      }
     ]
  }
    "pcr_gradient_top": "temperature",
    "pcr_gradient_bottom": "temperature"
}

For more details check the Input Types page

preview

The preview field within a protocol's manifest is used to print Autoprotocol to standard out by providing the protocol's associated script (called by its command_string) with sample parameters. This can be done by using the transcriptic preview <protocol name> command from the directory that contains your manifest.

parameters

This section indicates the values for each input defined above, unless the input has either a default value or specifies "required": "false". The value of each input is either the parameter's appropriate input type or an object describing further options for the field.

"parameters": {
    "sample_vol" : "20:microliter",  # optional, only required if deviating from default value
    "samples": ["sample_container/A1"],  # optional
  "gel": false, 
  "gel_type": "agarose(10,2%)",  # must be specified since no default is given
    "pcr_gradient_top": "64:celsius",
    "pcr_gradient_bottom": "52:celsius"
}

refs

The refs stanza details containers used by the preview protocol. A ref must be in the form of:

"refs":
    "ref_name":{
    "type":  <plate type>,
    "store":  <storage condition>
    "aliquots": {
        "0": {
            "volume": "100:microliter",
            "properties": {
                    "foo": "bar",
                    ...
        },
        ...
    },
  },
    ...
}

You can also specify aliquots and their names and properties within the refs section if they are applicable to your script. Read more about refs in the Structure section here. All refs specified in this section must be used in your protocol.