{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "configuration_blueprint",
  "type": "object",
  "properties": {
    "SimpleComment": {"type": "object", "properties": {},
      "SimpleComment": ["Configuration file for Mikado. Sections:",
      "- log_settings: settings related to the verbosity of logs.",
      "- db_settings: Database settings, for Mikado serialise and pick.",
      "- reference: Settings related to the genome reference.",
      "- prepare: settings related to the Mikado prepare stage",
      "- serialise: settings related to the Mikado serialise stage",
      "- pick: settings related to the Mikado pick stage",
    "- multiprocessing_method: which method (fork, spawn, forkserver) Mikado should use for multiprocessing."],
    "Comment": ["Configuration file for Mikado. Sections:",
      "- log_settings: settings related to the verbosity of logs.",
      "- db_settings: Database settings, for Mikado serialise and pick.",
      "- reference: Settings related to the genome reference.",
      "- prepare: settings related to the Mikado prepare stage",
      "- serialise: settings related to the Mikado serialise stage",
      "- pick: settings related to the Mikado pick stage",
    "- multiprocessing_method: which method (fork, spawn, forkserver) Mikado should use for multiprocessing."]
    },
    "multiprocessing_method": {
      "type": "string",
      "default": "",
      "enum": ["fork", "spawn", "forkserver", ""]
    },
    "log_settings": {
      "Comment": [
        "Settings related to the logs. Keys:",
        "- sql_level: verbosity for SQL calls. Default: WARNING.",
        "  In decreasing order: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'",
        "- log_level: verbosity. Default: WARNING.",
        "  In decreasing order: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'"
      ],
      "type": "object",
      "properties": {
        "log_level": {
          "type": "string",
          "enum": [
            "DEBUG",
            "INFO",
            "WARNING",
            "ERROR",
            "CRITICAL"
          ],
          "default": "WARNING"
        },
        "sql_level": {
          "type": "string",
          "enum": [
            "DEBUG",
            "INFO",
            "WARNING",
            "ERROR",
            "CRITICAL"
          ],
          "default": "WARNING"
        },
        "log": {
          "oneOf": [null, {"type": "string", "default": null}]
        }
      }
    },
    "db_settings": {
      "Comment": [
        "Settings related to DB connection. Parameters:",
        "db: the DB to connect to. Required. Default: mikado.db",
        "dbtype: Type of DB to use. Choices: sqlite, postgresql, mysql. Default: sqlite.",
        "dbhost: Host of the database. Unused if dbtype is sqlite. Default: localhost",
        "dbuser: DB user. Default: ''",
        "dbpasswd: DB password for the user. Default: ''",
        "dbport: Integer. It indicates the default port for the DB."
      ],
      "SimpleComment": [
        "Settings related to DB connection. Parameters:",
        "db: the DB to connect to. Required. Default: mikado.db",
        "dbtype: Type of DB to use. Choices: sqlite, postgresql, mysql. Default: sqlite.",
        "dbhost: Host of the database. Unused if dbtype is sqlite. Default: localhost",
        "dbuser: DB user. Default: ''",
        "dbpasswd: DB password for the user. Default: ''",
        "dbport: Integer. It indicates the default port for the DB."
      ],
      "type": "object",
      "properties": {
        "db": {
          "default": "mikado.db",
          "type": "string"
        },
        "dbtype": {
          "default": "sqlite",
          "enum": [
            "mysql",
            "postgresql",
            "sqlite"
          ],
          "type": "string"
        },
        "dbhost": {
          "format": "hostname",
          "default": "localhost"
        },
        "dbuser": {
          "type": "string",
          "default": ""
        },
        "dbpasswd": {
          "type": "string",
          "default": ""
        },
        "dbport": {
          "type": "integer",
          "default": 0
        }
      },
      "required": [
        "dbtype",
        "db"
      ]
    },
    "serialise":{
      "type": "object",
      "Comment": ["Options related to serialisation",
              "- force: whether to drop and reload everything into the DB",
              "- files: options related to input files",
              "- max_objects: Maximum number of objects to keep in memory while loading data into the database",
              "- max_regression: if the ORF lacks a valid start site, this percentage indicates how far",
              "  along the sequence Mikado should look for a good start site. Eg. with a value of 0.1,",
              "  on a 300bp sequence with an open ORF Mikado would look for an alternative in-frame start codon",
              "  in the first 30 bps (10% of the cDNA).",
              "- max_target_seqs: equivalently to BLAST, it indicates the maximum number of targets to keep",
              "  per blasted sequence.",
              "- discard_definition: Boolean. **Deprecated**, it was used for specifying how to load BLAST files.",
              "- procs: Number of processors to use. Default: 1.",
              "- single_thread: if true, Mikado prepare will force the usage of a single thread in this step."],
      "SimpleComment": ["Options related to serialisation",
        "- force: whether to drop and reload everything into the DB",
        "- max_regression: if the ORF lacks a valid start site, this percentage indicates how far",
        "  along the sequence Mikado should look for a good start site. Eg. with a value of 0.1,",
        "  on a 300bp sequence with an open ORF Mikado would look for an alternative in-frame start codon",
        "  in the first 30 bps (10% of the cDNA).",
        "- procs: Number of processors to use. Default: 1."
      ],
      "required": ["max_regression", "procs", "files"],
      "properties": {
        "files": {
          "type": "object",
          "properties": {
            "junctions": {
              "type": "array",
              "default": [],
              "optional": false
            },
            "xml": {
              "type": "array",
              "default": []
            },
            "external_scores": {
              "type": ["string", "null"],
              "default": null
            },
            "orfs": {
              "type": "array",
              "default": []
            },
            "transcripts": {
              "type": "string",
              "default": "mikado_prepared.fasta"
            },
            "log": {
              "type": "string",
              "default": "serialise.log"
            },
            "blast_targets": {
              "type": "array",
              "default": []
            },
            "output_dir": {
              "type": "string",
              "default": "."}
          }
        },
        "max_objects": {"type": "integer", "default": 100000, "minimum": 1},
        "max_regression": {"type": "number",
          "minimum": 0,
          "maximum": 1,
          "default": 0.1},
        "max_target_seqs": {"type": "integer", "default": 100000, "minimum": 1},
        "force": {"type": "boolean", "default": false},
        "single_thread": {"type": "boolean", "default": false},
        "procs": {"type": "integer", "default": 1, "minimum": 1}
      }
    },
    "prepare":{
      "type": "object",
      "Comment": ["Options related to the input data preparation.",
        "- files: options relative to the input/output files.",
        "- procs: Number of processes to use.",
        "- strip_cds: whether to remove the CDS from the predictions during preparation.",
        "- lenient: if set to True, invalid transcripts will be only flagged and not removed. EXPERIMENTAL.",
        "- strand_specific: if set to True, transcripts will be assumed to be in the correct orientation, no strand flipping or removal",
        "- strand_specific_assemblies: array of input predictions which are to be considered as strand-specific.",
        "  Predictions not in this list will be considered as non-strand-specific.",
        "- canonical: canonical splice sites, to infer the correct orientation."
      ],
      "SimpleComment": ["Options related to the input data preparation.",
        "- procs: Number of processes to use.",
        "- strand_specific: if set to True, transcripts will be assumed to be in the correct orientation, no strand flipping or removal",
        "- strip_cds: Boolean. It indicates whether to remove the CDS from the predictions during preparation."
      ],
      "required": ["files", "strand_specific", "procs"],
      "properties":
      {
        "keep_redundant": {
          "type": "boolean", "default": false
        },
        "minimum_length": {
          "type": "integer", "default": 200, "minimum": 1
        },
        "procs": {"type": "integer", "default": 1},
        "files": {
          "Comment": ["Options related to the input and output files.",
            "- out: output GTF file",
            "- out_fasta: output transcript FASTA file",
            "- gff: array of input predictions for this step.",
            "- log: output log. Default: prepare.log",
            "- labels: labels to be associated with the input GFFs. Default: None."
          ],
          "type": "object",
          "required": ["out", "out_fasta", "gff"],
          "properties": {
            "output_dir": {"type": "string", "default": "."},
            "out": {"type": "string", "default": "mikado_prepared.gtf"},
            "out_fasta": {"type": "string", "default": "mikado_prepared.fasta"},
            "log": {"type": "string", "default": "prepare.log"},
            "gff": { "type": "array", "default": []},
            "labels": {"type": "array", "default": []},
            "strand_specific_assemblies": {"type": "array", "default": []}
          }
        },
        "strip_cds": {"type": "boolean", "default": false},
        "single": {"type": "boolean", "default": false},
        "lenient": {"type": "boolean", "default": false},
        "strand_specific": {"type": "boolean", "default": false},
        "canonical": {"type": "array", "default": [
            ["GT", "AG"],
            ["GC", "AG"],
            ["AT", "AC"]
        ]}
      }
    },
    "pick": {
      "type": "object",
      "required": ["scoring_file"],
      "Comment": ["- scoring_file: a scoring file for the analysis. Default: plants.yaml.",
      "- source_score: a dictionary with pre-defined scores to assign to the transcripts according to their source. Eg all Cufflinks transcripts from the seed (label: \"cuff_seed\") could be assigned a default additional score of 1."],
      "SimpleComment": ["Parameters related to the Mikado pick stage.",
        "- alternative_splicing: Parameters related to which AS events to consider as valid during picking.",
        "- chimera_split: parameters related to splitting of transcripts in the presence of multiple ORFs",
        "- files: input and output files",
        "- run_options: generic options related to the run, eg number of processors to use.",
        "- scoring_file: a scoring file for the analysis. Default: plants.yaml."],
      "properties": {
        "scoring_file": {
          "type": "string",
          "default": "plants.yaml"
          },
        "source_score":{
          "type": "object",
          "default": {},
          "properties": {
            "source": {"type": "string"},
            "score": {"type": "number"}
          }
        },
        "alternative_splicing": {
          "Comment": [
            "Parameters related to alternative splicing reporting.",
            "- report: whether to report at all or not the AS events.",
            "- min_cds_overlap: minimum overlap between the CDS of the primary transcript and any AS event. Default: 60%.",
            "- min_cdna_overlap: minimum overlap between the CDNA of the primary transcript and any AS event.",
            "Default: 0% i.e. disabled, we check for the CDS overlap.",
            "- keep_retained_introns: Whether to consider as valid AS events where one intron",
            "is retained compared to the primary or any other valid AS. Default: false.",
            "- max_isoforms: Maximum number of isoforms per locus. 1 implies no AS reported. Default: 3",
            "- valid_ccodes: Valid class codes for AS events. Valid codes are in categories",
            "'Alternative splicing', 'Extension' (with junction F1 lower than 100%), and Overlap (exluding m). Default: j, J, g, G, C, h",
            "- max_utr_length: Maximum length of the UTR for AS events. Default: 10e6 (i.e. no limit)",
            "- max_fiveutr_length: Maximum length of the 5'UTR for AS events. Default: 10e6 (i.e. no limit)",
            "- max_threeutr_length: Maximum length of the 5'UTR for AS events. Default: 10e6 (i.e. no limit)",
            "- min_score_perc: Minimum score threshold for subsequent AS events.",
            " Only transcripts with a score at least (best) * value are retained.",
            "- only_confirmed_introns: bring back AS events only when their introns are either",
            " present in the primary transcript or in the set of confirmed introns.",
            "- pad: boolean switch. If true, Mikado will pad all the transcript in a gene so that their ends are the same",
            "- ts_distance: if padding, this is the maximum distance in base-pairs between the starts of transcripts",
            "  to be considered to be padded together.",
            "- ts_max_splices: if padding, this is the maximum amount of splicing junctions that the transcript to pad",
            " is allowed to cross. If padding would lead to cross more than this number, the transcript will not be padded."
          ],
          "SimpleComment": [
            "Parameters related to alternative splicing reporting.",
            "- report: whether to report at all or not the AS events.",
            "- max_isoforms: Maximum number of isoforms per locus. 1 implies no AS reported. Default: 3",
            "- only_confirmed_introns: bring back AS events only when their introns are either",
            " present in the primary transcript or in the set of confirmed introns."
          ],
          "required": ["report", "max_isoforms", "only_confirmed_introns"],
          "type": "object",
          "properties": {
            "report": {
              "type": "boolean",
              "default": true
            },
            "min_cds_overlap": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "default": 0.75
            },
            "min_cdna_overlap": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "default": 0.5
            },
            "keep_retained_introns": {
              "type": "boolean",
              "default": false
            },
            "max_isoforms": {
              "type": "integer",
              "minimum": 1,
              "default": 5
            },
            "valid_ccodes": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "j",
                  "e",
                  "o",
                  "h",
                  "J",
                  "C",
                  "g",
                  "G"
                ]
              },
              "default": [
                "j",
                "J",
                "G",
                "h"
              ]
            },
            "redundant_ccodes": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "j",
                  "n",
                  "O",
                  "e",
                  "o",
                  "h",
                  "J",
                  "C",
                  "c",
                  "m",
                  "mo",
                  "=",
                  "_",
                  "x",
                  "p",
                  "P",
                  "X",
                  "I",
                  "i"
                ]
              },
              "default": [
                "c",
                "m",
                "_",
                "=",
                "n"
              ]
            },
            "min_score_perc": {
              "type": "number",
              "default": 0.5,
              "minimum": 0,
              "maximum": 1
            },
            "only_confirmed_introns":{
              "type": "boolean",
              "default": true
            },
            "ts_distance": {
              "type": "integer",
              "default": 300,
              "minimum": 0
            },
            "pad": {
              "type": "boolean",
              "default": false
            },
            "ts_max_splices": {
              "type": "integer",
              "minimum": 0,
              "default": 1
            }
          }
        },
        "output_format": {
          "Comment": [
            "Parameters related to the output format.",
            "  - source: prefix for the source field in the mikado output.",
            "  - id_prefix: prefix for the ID of the genes/transcripts in the output"
          ],
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "default": "Mikado"
            },
            "id_prefix": {
              "type": "string",
              "default": "mikado"
            },
            "report_all_orfs": {
              "type": "boolean",
              "default": false
            }
          }
        },
        "orf_loading": {
          "type": "object",
          "Comment": [
            "Parameters related to ORF loading.",
            "- minimal_secondary_orf_length: Minimum length of a *secondary* ORF",
            "  to be loaded after the first, in bp. Default: 200 bps",
            "- minimal_orf_length: Minimum length in bps of an ORF to be loaded,",
            "  as the primary ORF, onto a transcript. Default: 50 bps",
            "- strand_specific: Boolean flag. If set to true, monoexonic transcripts",
            "  will not have their ORF reversed even if they would have an ORF on the opposite strand."
          ],
          "properties": {
            "minimal_secondary_orf_length": {
              "type": "integer",
              "default": 200,
              "minimum": 0
            },
            "minimal_orf_length": {
              "type": "integer",
              "default": 50,
              "minimum": 0
            },
            "strand_specific": {
              "type": "boolean",
              "default": true
            }
          }
        },
        "chimera_split": {
          "Comment": [
            "Parameters related to the splitting of transcripts in the presence of",
            "two or more ORFs. Parameters:",
            "- execute: whether to split multi-ORF transcripts at all. Boolean.",
            "- blast_check: whether to use BLAST information to take a decision. See blast_params for details.",
            "- blast_params: Parameters related to which BLAST data we want to analyse."
          ],
          "SimpleComment": [
            "Parameters related to the splitting of transcripts in the presence of",
            "two or more ORFs. Parameters:",
            "- execute: whether to split multi-ORF transcripts at all. Boolean.",
            "- blast_check: whether to use BLAST information to take a decision. See blast_params for details.",
            "- blast_params: Parameters related to which BLAST data we want to analyse."
          ],
          "type": "object",
          "properties": {
            "blast_check": {
              "type": "boolean",
              "default": true
            },
            "execute": {
              "type": "boolean",
              "default": true
            },
            "skip": {
              "type": "array",
              "default": []
            },
            "blast_params": {
              "type": "object",
              "Comment": [
                "Parameters for the BLAST check prior to splitting.",
                "- evalue: Minimum evalue for the whole hit. Default: 1e-6",
                "- hsp_evalue: Minimum evalue for any HSP hit (some might be discarded even if the whole hit is valid). Default: 1e-6",
                "- leniency: One of 'STRINGENT', 'LENIENT', 'PERMISSIVE'. Default: LENIENT",
                "- max_target_seqs: maximum number of hits to consider. Default: 3",
                "- minimal_hsp_overlap: minimum overlap of the ORF with the HSP (*not* reciprocal). Default: 0.8, i.e. 80%",
                "- min_overlap_duplication: minimum overlap (in %) for two ORFs to consider them as target duplications.",
                "  This means that if two ORFs have no HSPs in common, but the coverage of their disjoint HSPs covers more",
                "  Than this % of the length of the *target*, they represent most probably a duplicated gene."
              ],
              "SimpleComment": [
                "Parameters for the BLAST check prior to splitting.",
                "- evalue: Minimum evalue for the whole hit. Default: 1e-6",
                "- leniency: One of 'STRINGENT', 'LENIENT', 'PERMISSIVE'. Default: LENIENT",
                "- max_target_seqs: maximum number of hits to consider. Default: 3"
                ],
              "properties": {
                "evalue": {
                  "type": "number",
                  "minimum": 0,
                  "default": 0.000001
                },
                "hsp_evalue": {
                  "type": "number",
                  "minimum": 0,
                  "default": 0.000001
                },
                "leniency": {
                  "type": "string",
                  "enum": [
                    "STRINGENT",
                    "LENIENT",
                    "PERMISSIVE"
                  ],
                  "default": "LENIENT"
                },
                "max_target_seqs": {
                  "type": "integer",
                  "minimum": 1,
                  "default": 3
                },
                "minimal_hsp_overlap": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1,
                  "default": 0.5
                },
                "min_overlap_duplication": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1,
                  "default": 0.8
                }
              }
            }
          },
          "required": [
            "blast_check",
            "execute"
          ]
        },
        "run_options": {
          "type": "object",
          "required": ["procs", "single_thread"],
          "Comment": [
            "Generic run options.",
            "- shm: boolean flag. If set and the DB is sqlite, it will be copied onto the /dev/shm faux partition",
            "- shm_db: String. It indicates a DB that has to be copied onto SHM and left there for",
            "  concurrent Mikado runs.",
            "- shm_shared: boolean flag. If set, the database loaded onto SHM will be shared and should not be",
            "  deleted at the end of the run (see shm_db).",
            "  for faster access. Default: false",
            "- exclude_cds: boolean flag. If set, the CDS information will not be printed in Mikado output. Default: false",
            "- procs: number of processes to use. Default: 1",
            "- preload: boolean flag. If set, the whole database will be preloaded into memory for faster access. Useful when",
            "  using SQLite databases.",
            "- single_thread: boolean flag. If set, multithreading will be disabled - useful for profiling and debugging.",
            "- consider_truncated_for_retained: boolean. Normally, Mikado considers only exons which span a whole intron as possible retained intron events. If this flag is set to true, also terminal exons will be considered.",
            "- remove_overlapping_fragments: DEPRECATED, see clustering.",
            "- purge: DEPRECATED, see clustering."
          ],
          "SimpleComment": [
            "Generic run options.",
            "- procs: number of processes to use. Default: 1",
            "- intron_range: A range where most of the introns (99%) should fall into. Transcripts with too many",
            " introns larger or smaller than what is defined in this range will be penalised",
            " in the scoring. Default: [60, 900]",
            "- preload: boolean flag. If set, the whole database will be preloaded into memory for potentially faster access.",
            "- single_thread: boolean flag. If set, multithreading will be disabled - useful for profiling and debugging.",
            "- flank: DEPRECATED. Now set in the clustering section."
          ],
          "properties": {
            "shm": {
              "type": "boolean",
              "default": false
            },
            "shm_db": {
              "type": "string",
              "default": ""
            },
            "exclude_cds": {
              "type": "boolean",
              "default": false
            },
            "intron_range": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0
              },
              "uniqueItems": true,
              "maxItems": 2,
              "minItems": 2,
              "default": [60, 900]
            },
            "consider_truncated_for_retained": {
              "type": "boolean",
              "default": false
            },
            "procs": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "single_thread": {
              "type": "boolean",
              "default": false
            },
            "preload": {
              "type": "boolean",
              "default": false
            }
          }
        },
        "clustering": {
          "type": "object",
          "Comment": [
            "Parameters related to the clustering of transcripts into loci.",
            "- cds_only: boolean, it specifies whether to cluster transcripts only according to their CDS (if present).",
            "- min_cds_overlap: minimal CDS overlap for the second clustering.",
            "- min_cdna_overlap: minimal cDNA overlap for the second clustering.",
            "- flank: maximum distance for transcripts to be clustered within the same superlocus.",
            "- remove_overlapping_fragments: boolean, it specifies whether to remove putative fragments.",
            "- purge: boolean, it specifies whether to remove transcripts which fail the minimum requirements check - or whether to ignore those requirements altogether.",
            "- simple_overlap_for_monoexonic: boolean. If set to true (default), then any overlap mean inclusion",
            "in a locus for or against a monoexonic transcript. If set to false, normal controls for the percentage",
            "of overlap will apply.",
            "- max_distance_for_fragments: maximum distance from a valid locus for another to be considered a fragment."
          ],
          "SimpleComment": [
            "Parameters related to the clustering of transcripts into loci.",
            "- flank: maximum distance for transcripts to be clustered within the same superlocus."
          ],
          "properties": {
            "cds_only": {
              "type": "boolean",
              "default": false
            },
            "min_cds_overlap": {
              "type": "number",
              "minimum": 0.000001,
              "maximum": 1,
              "default": 0.2
            },
            "min_cdna_overlap": {
              "type": "number",
              "minimum": 0.000001,
              "maximum": 1,
              "default": 0.2
            },
            "purge": {
              "type": "boolean",
              "default": true
            },
            "flank": {
              "type": "integer",
              "minimum": 0,
              "default": 200
            },
            "simple_overlap_for_monoexonic": {
              "type": "boolean",
              "default": true
            }
          }
        },
        "fragments":{
            "type": "object",
            "Comment": ["Parameters related to the handling of fragments.",
            "- remove: boolean. Whether to remove fragments or leave them, properly tagged.",
            "- max_distance: maximum distance of a putative fragment from a valid gene.",
            "- valid_class_codes: which class codes will be considered as fragments. Default:",
            "(p, P, x, X, i, m, _). Choices: '_' plus any class code with category",
             "'Intronic', 'Fragment', or 'Overlap'."],
            "SimpleComment": ["Parameters related to the handling of fragments.",
            "- remove: boolean. Whether to remove fragments or leave them, properly tagged."],
            "properties": {
            "remove": {
              "type": "boolean",
              "default": true
            },
            "max_distance": {
              "type": "number",
              "minimum": 0,
              "default": 2000
            },
            "valid_class_codes": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "p",
                  "P",
                  "i",
                  "I",
                  "ri",
                  "rI",
                  "x",
                  "X",
                  "m",
                  "_",
                  "e",
                  "o"
                ]
              },
              "default": [
                "p",
                "P",
                "x",
                "X",
                "i",
                "m",
                "_",
                "e",
                "o"
              ]
            }
            }
          },
          "files": {
          "type": "object",
          "Comment": [
            "Input and output files for Mikado pick.",
            "- gff: input GTF/GFF3 file. Default: mikado_prepared.gtf",
            "- loci_out: output GFF3 file from Mikado pick. Default: mikado.loci.gff3",
            "- subloci_out: optional GFF file with the intermediate subloci. Default: no output",
            "- monoloci_out: optional GFF file with the intermediate monoloci. Default: no output",
            "- log: log file for this step."
          ],
          "SimpleComment": [
            "Input and output files for Mikado pick.",
            "- gff: input GTF/GFF3 file. Default: mikado_prepared.gtf",
            "- loci_out: output GFF3 file from Mikado pick. Default: mikado.loci.gff3",
            "- subloci_out: optional GFF file with the intermediate subloci. Default: no output",
            "- monoloci_out: optional GFF file with the intermediate monoloci. Default: no output",
            "- log: log file for this step."],
          "required": ["input"],
          "properties": {
            "output_dir": {
              "type": "string",
              "default": "."
            },
            "input": {
              "type": "string",
              "default": "mikado_prepared.gtf"
            },
            "loci_out": {
              "type": "string",
              "default": "mikado.loci.gff3"
            },
            "subloci_out": {
              "type": "string",
              "default": "mikado.subloci.gff3"
            },
            "monoloci_out": {
              "type": "string",
              "default": ""
            },
            "log": {
            "type": "string",
            "default": "mikado_pick.log"
            }
          }
        }
      }
    },
    "reference": {
    "type": "object",
    "Comment": ["Options related to the reference genome.",
    "- genome: the genome FASTA file. Required",
    "- genome_fai: the corresponding FAI for the genome. Inferred if absent.",
    "- transcriptome: a GTF/GFF reference transcriptome. Currently ignored."],
    "required": ["genome"],
    "anyOf": [{"required": ["genome"]}, "genome_fai", "transcriptome"],
    "properties": {
      "genome": {
        "type": "string",
        "default": "",
        "required": true
      },
      "genome_fai": {
        "type": ["string"],
        "default": ""
      },
      "transcriptome": {
        "type": ["string"],
        "default": ""
      },
      "min_intron": {
          "type": "integer", "required": true,
          "default": 20, "minimum": 1
        },
        "max_intron": {
          "type": "integer", "required": true,
          "default": 10000, "minimum": 1
        }
     }
    }
  }
}
