{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "subset_cosmx",
  "description": "Filters the output from NanoString experiment to keep only a subset of the fields of view.\nExpected input folder structure:\npath/to/dataset/\n    ├── CellComposite/\n    ├── CellLabels/\n    ├── CellOverlay/\n    ├── CompartmentLabels/\n    ├── <dataset_id>_exprMat_file.csv\n    ├── <dataset_id>_fov_positions_file.csv\n    ├── <dataset_id>_metadata_file.csv\n    └── <dataset_id>_tx_file.csv  \n",
  "type": "object",
  "$defs": {
    "arguments": {
      "title": "Arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input folder",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"cosmx_data\"`. "
        },
        "num_fovs": {
          "type": "integer",
          "description": "Number of fields of views to keep",
          "help_text": "Type: `integer`, multiple: `False`, required. "
        },
        "subset_transcripts_file": {
          "type": "boolean",
          "description": "Whether to subset the <dataset_id>_tx_file.csv file.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "subset_polygons_file": {
          "type": "boolean",
          "description": "Whether to subset the <dataset_id>_polygons.csv file.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "output": {
          "type": "string",
          "format": "path",
          "description": "The directory where the subset data will be stored.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output\"`, direction: `output`, example: `\"cosmx_data_tiny\"`. ",
          "default": "$id.$key.output"
        }
      }
    },
    "nextflow input-output arguments": {
      "title": "Nextflow input-output arguments",
      "type": "object",
      "description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.",
      "properties": {
        "publish_dir": {
          "type": "string",
          "description": "Path to an output directory.",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"output/\"`. "
        }
      }
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/arguments"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
