From 29d92d039aed951caad716a86fe85083e277704e Mon Sep 17 00:00:00 2001
From: Mia Croiset <mia.croiset@ens-lyon.fr>
Date: Fri, 16 Jun 2023 09:54:07 +0200
Subject: [PATCH] update json schema

---
 nextflow.config      |   2 +-
 nextflow_schema.json | 170 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 171 insertions(+), 1 deletion(-)

diff --git a/nextflow.config b/nextflow.config
index cbdcd5c..f4f369b 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -151,7 +151,7 @@ params {
     hicstuff_centro_file = 'None'       //give absolute path or 'None'
     hicstuff_base = 1.1
     hicstuff_distance_out_file = 'distance_law.txt'
-    hicstuff_rm_centro = 'None'         //int or 'None'
+    hicstuff_rm_centro = 'None'         //string number (ex: '30') or 'None'
     hicstuff_distance_plot = 'false'
     hicstuff_distance_out_plot = 'plot_distance_law.pdf'
     hicstuff_filter_pcr_out_file = 'valid_idx_pcrfree.pairs'
diff --git a/nextflow_schema.json b/nextflow_schema.json
index 811f414..e5aeb17 100644
--- a/nextflow_schema.json
+++ b/nextflow_schema.json
@@ -526,6 +526,176 @@
                     "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters."
                 }
             }
+        },
+        "hicstuff options":{
+            "title": "Hicstuff options",
+            "type": "object",
+            "description": "Options for hicstuff workflow, set in the config file.",
+            "help_text": "These options are specific to the hicstuff workflow and allow you to customise the parameters",
+            "properties": {
+                "workflow": {
+                    "type": "string",
+                    "description": "Selection of the workflow to run. Choices are hicstuff or hicpro",
+                    "default": "hicstuff",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_bwt2_align_opts": {
+                    "type": "string",
+                    "description": "Parameters for bowtie2 alignment",
+                    "default": "--very-sensitive-local",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_min_size": {
+                    "type": "integer",
+                    "description": "Minimum contig size required to keep it",
+                    "default": 0,
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_min_qual":{
+                    "type": "integer",
+                    "description": "Minimum mapping quality required to keep a pair of Hi-C reads",
+                    "default": 30,
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_circular": {
+                    "type": "boolean",
+                    "description": "Use if the genome is circular",
+                    "default": false,
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_bin": {
+                    "type": "integer",
+                    "description": "Binsize for plotting matrix",
+                    "default": 10000,
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_output_contigs": {
+                    "type": "string",
+                    "description": "Name of info contigs file",
+                    "default": "info_contigs.txt",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_output_frags": {
+                    "type": "string",
+                    "description": "Name of fragments list file",
+                    "default": "fragments_list.txt",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_valid_pairs": {
+                    "type": "string",
+                    "description": "Name of valid pairs file",
+                    "default": "valid.pairs",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_valid_idx": {
+                    "type": "string",
+                    "description": "Name of valid pairs index file",
+                    "default": "valid_idx.pairs",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_matrix": {
+                    "type": "string",
+                    "description": "Common name of matrix files",
+                    "default": "abs_fragments_contacts_weighted.txt",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_plot_events":{
+                    "type": "boolean",
+                    "description": "Whether plots should be generated at different steps of the pipeline",
+                    "default": false,
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_frags_plot": {
+                    "type": "boolean",
+                    "description": "Whether fragments plot should be generated",
+                    "default": "false",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_frags_plot_path": {
+                    "type": "string",
+                    "description": "Name of fragments plot file",
+                    "default": "frag_hist.pdf",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_pie_plot": {
+                    "type": "string",
+                    "description": "Prefix of distribution plot file during filter events",
+                    "default": "distrib",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_dist_plot": {
+                    "type": "string",
+                    "description": "Prefix of distance plot file during filter events",
+                    "default": "dist",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "distance_law": {
+                    "type": "boolean",
+                    "description": "If True, generates a distance law file with the values of the probabilities to have a contact between two distances for each chromosomes or arms if the file with the positions has been given. The values are not normalized, or averaged.",
+                    "default": "false",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_distance_out_file": {
+                    "type": "string",
+                    "description": "Name of distance law table file",
+                    "default": "distance_law.txt",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_distance_plot": {
+                    "type": "boolean",
+                    "description": "Whether distance law table should be plotted",
+                    "default": "false",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_distance_out_plot": {
+                    "type": "string",
+                    "description": "Name of distance law table plot if hicstuff_distance_plot is true",
+                    "default": "distance_law.txt",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_base":{
+                    "type": "number",
+                    "description": "Base use to construct the logspace of the bins for distance law",
+                    "default": 1.1,
+                    "fa_icon": "fas fa_cogs"
+                },
+                "hicstuff_rm_centro": {
+                    "type": "string",
+                    "description": "If the distance law is computed, this is the number of kb that will be removed around the centromere position given by in the centromere file",
+                    "default": "None",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_centro_file":{
+                    "type": "string",
+                    "description": "If not None, path of file with Positions of the centromeres separated by aspace and in the same order than the chromosomes",
+                    "default": "None",
+                    "fa_icon": "fas fa_cogs"
+                },
+                "filter_event": {
+                    "type": "boolean",
+                    "description": "Filter spurious or uninformative 3C events. Requires a restriction enzyme",
+                    "default": "false",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_valid_idx_filtered": {
+                    "type": "string",
+                    "description": "Name of filtered valid pairs index file",
+                    "default": "valid_idx_filtered.pairs",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "filter_pcr": {
+                    "type": "boolean",
+                    "description": "If True, PCR duplicates will be filtered based on genomic positions Pairs where both reads have exactly the same coordinates are considered duplicates and only one of those will be conserved.",
+                    "default": "false",
+                    "fa_icon": "fas fa-cogs"
+                },
+                "hicstuff_filter_pcr_out_file":{
+                    "type": "string",
+                    "description": "Name of pair file after PCR filtering",
+                    "default": "valid_idx_pcrfree.pairs",
+                    "fa_icon": "fas fa_cogs"
+                }
+            }
         }
     },
     "allOf": [
-- 
GitLab