[
    {
        "id": "gstacks_refMap",
        "name": "gstacks_refMap",
        "article": "10.1111\/mec.15253",
        "website": "http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/gstacks.php",
        "git": "",
        "description": "gstacks build loci from the single and\/or paired-end reads before calling SNPs",
        "version": "2.64",
        "documentation": "http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/gstacks.php",
        "multiqc": "custom",
        "commands": [
            {
                "name": "gstacks_refMap",
                "cname": "gstacks_refMap",
                "command": "gstacks",
                "category": "stacks",
                "output_dir": "gstacks_refMap",
                "inputs": [
                    {
                        "name": "bams",
                        "type": "bams",
                        "file": "{sample}.bam",
                        "expand": true
                    },
                    {
                        "name": "popmap",
                        "type": "popmap"
                    }
                ],
                "outputs": [
                    {
                        "name": "catalog_calls",
                        "type": "stacks_calls",
                        "file": "catalog.calls",
                        "description": "Consensus sequence for each assembled locus in the data"
                    },
                    {
                        "name": "catalog_fa",
                        "type": "fa.gz",
                        "file": "catalog.fa.gz",
                        "description": "Custom file that contains genotyping data"
                    },
                    {
                        "name": "stats",
                        "type": "distribs",
                        "file": "gstacks.log.distribs",
                        "description": "Distributions statistics (bam stats, coverage and phasing_rates per sample)"
                    }
                ],
                "options": [
                    {
                        "name": "gstacks_refMap_threads",
                        "prefix": "-t",
                        "type": "numeric",
                        "value": 4,
                        "min": 1,
                        "max": "NA",
                        "step": 1,
                        "label": "Number of threads to use"
                    },
                    {
                        "name": "gstacks_refMap_model",
                        "prefix": "--model",
                        "type": "select",
                        "value": "marukilow",
                        "choices": [
                            {
                                "marukilow": "marukilow"
                            },
                            {
                                "marukihigh": "marukihigh"
                            },
                            {
                                "snp": "snp"
                            }
                        ],
                        "label": "Model to use to call variants and genotypes"
                    },
                    {
                        "name": "gstacks_refMap_var_alpha",
                        "prefix": "--var-alpha",
                        "type": "numeric",
                        "value": 0.05,
                        "min": 0,
                        "max": "NA",
                        "step": "NA",
                        "label": "Alpha threshold for discovering SNPs"
                    },
                    {
                        "name": "gstacks_refMap_gt_alpha",
                        "prefix": "--gt-alpha",
                        "type": "numeric",
                        "value": 0.05,
                        "min": 0,
                        "max": "NA",
                        "step": "NA",
                        "label": "Alpha threshold for calling genotypes"
                    },
                    {
                        "name": "gstacks_refMap_min_mapq",
                        "prefix": "--min-mapq",
                        "type": "numeric",
                        "value": 20,
                        "min": 0,
                        "max": "NA",
                        "step": 1,
                        "label": "Minimum PHRED-scaled mapping quality to consider a read"
                    },
                    {
                        "name": "gstacks_refMap_max_clipped",
                        "prefix": "--max-clipped",
                        "type": "numeric",
                        "value": 0.2,
                        "min": 0,
                        "max": "NA",
                        "step": "NA",
                        "label": "Maximum soft-clipping level, in fraction of read length"
                    },
                    {
                        "name": "gstacks_refMap_max_insert",
                        "prefix": "--max-insert-len",
                        "type": "numeric",
                        "value": 1000,
                        "min": 50,
                        "max": "NA",
                        "step": 10,
                        "label": "maximum allowed sequencing insert length"
                    },
                    {
                        "name": "gstacks_refMap_rm_pcr_duplicates",
                        "prefix": "--rm-pcr-duplicates",
                        "type": "checkbox",
                        "value": false,
                        "label": "remove read pairs of the same insert length (WARN !! implies --rm-unpaired-reads)"
                    }
                ]
            }
        ],
        "prepare_report_script": "gstacks_refMap.prepare.report.R",
        "prepare_report_outputs": [
            "bam_stats_per_sample_mqc.tsv",
            "effective_coverages_per_sample_mqc.tsv",
            "phasing_rates_per_sample_mqc.tsv"
        ],
        "install": [],
        "citations": {
            "stacks": [
                " Rochette, NC, Rivera-Col\u00f3n, AG, Catchen, JM. Stacks 2: Analytical methods for paired-end sequencing improve RADseq\u2010based population genomics. Mol Ecol. 2019; 28: 4737- 4754. https:\/\/doi.org\/10.1111\/mec.15253"
            ]
        },
        "yaml": "{\n  id: gstacks_refMap,\n  name: gstacks_refMap,\n  article: 10.1111\/mec.15253,\n  website: \"http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/gstacks.php\",\n  git: \"\",\n  description: \"gstacks build loci from the single and\/or paired-end reads before calling SNPs\",\n  version: \"2.64\",\n  documentation: \"http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/gstacks.php\",\n  multiqc: \"custom\",\n  commands:\n    [\n      {\n        name: gstacks_refMap,\n        cname: \"gstacks_refMap\",\n        command: gstacks,\n        category: \"stacks\",\n        output_dir: gstacks_refMap,\n        inputs: [{ name: bams, type: \"bams\", file: \"{sample}.bam\", expand: true}, #all bams must be in the same dir that will be determined from the first bam filename\n                 { name: popmap, type: \"popmap\" }\n                 ],\n        outputs:\n          [\n            { name: catalog_calls, type: \"stacks_calls\", file: \"catalog.calls\", description: \"Consensus sequence for each assembled locus in the data\" },\n            { name: catalog_fa, type: \"fa.gz\", file: \"catalog.fa.gz\", description: \"Custom file that contains genotyping data\" },\n            { name: stats, type: \"distribs\", file: \"gstacks.log.distribs\", description: \"Distributions statistics (bam stats, coverage and phasing_rates per sample)\" },\n          ],\n        options:\n          [\n            {\n              name: gstacks_refMap_threads,\n              prefix: -t,\n              type: numeric,\n              value: 4,\n              min: 1,\n              max: NA,\n              step: 1,\n              label: \"Number of threads to use\",\n            },\n            {\n              name: gstacks_refMap_model,\n              prefix: --model,\n              type: select,\n              value: marukilow,\n              choices: [marukilow: marukilow, marukihigh: marukihigh, snp: snp],\n              label: \"Model to use to call variants and genotypes\",\n            },\n            {\n              name: gstacks_refMap_var_alpha,\n              prefix: --var-alpha,\n              type: numeric,\n              value: 0.05,\n              min: 0,\n              max: NA,\n              step: NA,\n              label: \"Alpha threshold for discovering SNPs\",\n            },\n            {\n              name: gstacks_refMap_gt_alpha,\n              prefix: --gt-alpha,\n              type: numeric,\n              value: 0.05,\n              min: 0,\n              max: NA,\n              step: NA,\n              label: \"Alpha threshold for calling genotypes\",\n            },\n            {\n              name: gstacks_refMap_min_mapq,\n              prefix: --min-mapq,\n              type: numeric,\n              value: 20,\n              min: 0,\n              max: NA,\n              step: 1,\n              label: \"Minimum PHRED-scaled mapping quality to consider a read\",\n            },\n            {\n              name: gstacks_refMap_max_clipped,\n              prefix: --max-clipped,\n              type: numeric,\n              value: 0.20,\n              min: 0,\n              max: NA,\n              step: NA,\n              label: \"Maximum soft-clipping level, in fraction of read length\",\n            },\n            {\n              name: gstacks_refMap_max_insert,\n              prefix: --max-insert-len,\n              type: numeric,\n              value: 1000,\n              min: 50,\n              max: NA,\n              step: 10,\n              label: \"maximum allowed sequencing insert length\",\n            },\n            {\n              name: gstacks_refMap_rm_pcr_duplicates,\n              prefix: --rm-pcr-duplicates,\n              type: \"checkbox\",\n              value: FALSE,\n              label: \"remove read pairs of the same insert length (WARN !! implies --rm-unpaired-reads)\",\n            },\n          ],\n      },\n    ],\n  prepare_report_script:  gstacks_refMap.prepare.report.R,\n  prepare_report_outputs: [\n     bam_stats_per_sample_mqc.tsv,\n     effective_coverages_per_sample_mqc.tsv,\n     phasing_rates_per_sample_mqc.tsv\n  ],  \n  install:\n    {\n      # stacks: [\n      #   \"cd \/opt\/biotools\",\n      #   \"wget http:\/\/catchenlab.life.illinois.edu\/stacks\/source\/stacks-2.61.tar.gz\",\n      #   \"tar -zxvf stacks-2.61.tar.gz\",\n      #   \"cd stacks-2.61\/\",\n      #   \".\/configure\",\n      #   \"make -j 10\",\n      #   \"make install\",\n      #   \"mv -t ..\/bin sstacks kmer_filter gstacks tsv2bam process_shortreads populations ustacks phasedstacks cstacks process_radtags\",\n      #   \"cd .. && rm -r stacks-2.61 stacks-2.61.tar.gz\"\n      # ]\n    },\n  citations:  {\n    stacks: [\n      \" Rochette, NC, Rivera-Col\u00f3n, AG, Catchen, JM. Stacks 2: Analytical methods for paired-end sequencing improve RADseq\u2010based population genomics. Mol Ecol. 2019; 28: 4737- 4754. https:\/\/doi.org\/10.1111\/mec.15253\"\n    ]\n  }\n}\n"
    }
]