[
    {
        "id": "dadi",
        "name": "dadi",
        "article": "10.1038\/npre.2010.4594.1",
        "website": "https:\/\/dadi.readthedocs.io\/en\/latest\/",
        "git": "https:\/\/bitbucket.org\/gutenkunstlab\/dadi\/src\/master\/",
        "description": "Fit population genetic models of demography and selection using diffusion approximations to the allele frequency spectrum",
        "version": "2.3.0",
        "documentation": "https:\/\/dadi.readthedocs.io\/en\/latest\/",
        "multiqc": "custom",
        "commands": [
            {
                "name": "dadi",
                "cname": "Dadi",
                "command": "",
                "category": "genet_pop",
                "output_dir": "dadi",
                "inputs": [
                    {
                        "name": "fs_file_name",
                        "type": "path"
                    }
                ],
                "outputs": [
                    {
                        "name": "full",
                        "type": "txt",
                        "file": "dadi-full.txt",
                        "description": ""
                    },
                    {
                        "name": "easy",
                        "type": "txt",
                        "file": "dadi-easy.txt",
                        "description": ""
                    },
                    {
                        "name": "modelsfs",
                        "type": "txt",
                        "file": "dadi-modelsfs.txt",
                        "description": ""
                    },
                    {
                        "name": "img",
                        "type": "png",
                        "file": "dadi_{model}_mqc.png",
                        "description": ""
                    }
                ],
                "options": [
                    {
                        "name": "dadi_masked",
                        "prefix": "--masked",
                        "type": "checkbox",
                        "value": false,
                        "label": "--masked : If set, mask the singletons in the sfs: [1,0] and [0,1]."
                    },
                    {
                        "name": "dadi_folded",
                        "prefix": "--folded",
                        "type": "checkbox",
                        "value": false,
                        "label": "--folded : If set, the sfs is folded (i.e. no outgroup to polarize the data)."
                    },
                    {
                        "name": "dadi_projected",
                        "prefix": "--projected",
                        "type": "checkbox",
                        "value": false,
                        "label": "--projected : If set, the sfs is projected down to n1,n2 (values to be set with option -n). If your data have missing calls for some individuals, projecting down to a smaller sample size will increase the number of SNPs you can use. It will average over all possible re-samplings of the larger sample size data (assuming random mating)."
                    },
                    {
                        "name": "dadi_datatype",
                        "type": "select",
                        "prefix": "--datatype",
                        "choices": [
                            {
                                "simul": "simul"
                            },
                            {
                                "sfs": "sfs"
                            },
                            {
                                "snp-dadi": "snp-dadi"
                            }
                        ],
                        "value": "simul",
                        "label": "Type of input: 1) simul: ms simulation. 2) sfs: sfs data. 3) snp-dadi: snp data with dadi format; the sample size is required (values to be set with options -j and -n). 4) vcf: vcf data; it requires -c to be provided and it will only include sites without missing data."
                    },
                    {
                        "name": "dadi_namepop1",
                        "prefix": "--namepop1",
                        "type": "text",
                        "value": "Pop1",
                        "label": "Population 1 name"
                    },
                    {
                        "name": "dadi_namepop2",
                        "prefix": "--namepop2",
                        "type": "text",
                        "value": "Pop2",
                        "label": "Population 2 name"
                    },
                    {
                        "name": "dadi_proj_sample",
                        "prefix": "--proj_sample",
                        "type": "text",
                        "value": "10,10 ",
                        "label": "--proj_sample : Sample size of population 1 and 2 in the sfs. Recall that for a diploid organism we get two samples from each individual. These values are ignored if -j is not set."
                    },
                    {
                        "name": "dadi_grid_points",
                        "prefix": "--grid_points",
                        "type": "text",
                        "value": "10,20,30 ",
                        "label": "--grid_points : Size of the grids for extrapolation. dadi solves a partial differential equation, approximating the solution using a grid of points in population frequency space (diffusion approximation). The grid takes 3 numbers separated by a coma. Good results are obtained by setting the smallest grid size slightly larger than the largest sample size, but this can be altered depending on usage. If you are fitting a complex model, it may speed up the analysis considerably to first run an optimization at small grid sizes. They can then be refined by running another optimization with a finer grid."
                    },
                    {
                        "name": "dadi_model_list",
                        "type": "select",
                        "prefix": "--model_list",
                        "choices": [
                            {
                                "SI": "SI"
                            },
                            {
                                "IM": "IM"
                            },
                            {
                                "SC": "SC"
                            },
                            {
                                "AM": "AM"
                            }
                        ],
                        "value": "SI",
                        "label": "--model_list : List the models to include in the inference. All available models are defined in dadi_models_2pop.py."
                    },
                    {
                        "name": "dadi_maxiterGlobal",
                        "prefix": "",
                        "type": "numeric",
                        "value": 100,
                        "min": 1,
                        "max": "NA",
                        "step": 1,
                        "label": "maximum global search iterations - in each iteration, it explores twice the number of parameters."
                    },
                    {
                        "name": "dadi_accept",
                        "prefix": "",
                        "type": "numeric",
                        "value": 1,
                        "min": "NA",
                        "max": "NA",
                        "step": "NA",
                        "label": "parameter for acceptance distribution (lower values makes the probability of acceptance smaller)"
                    },
                    {
                        "name": "dadi_visit",
                        "prefix": "",
                        "type": "numeric",
                        "value": 1.01,
                        "min": "NA",
                        "max": "NA",
                        "step": "NA",
                        "label": "parameter for visiting distribution (higher values makes the algorithm jump to a more distant region)"
                    },
                    {
                        "name": "dadi_Tini",
                        "prefix": "",
                        "type": "numeric",
                        "value": 50,
                        "min": "NA",
                        "max": "NA",
                        "step": "NA",
                        "label": "initial temperature"
                    },
                    {
                        "name": "dadi_no_local_search",
                        "prefix": "",
                        "type": "checkbox",
                        "value": false,
                        "label": "If set to True, a Generalized Simulated Annealing will be performed with no local search strategy applied"
                    },
                    {
                        "name": "dadi_local_method",
                        "prefix": "",
                        "type": "text",
                        "value": "L-BFGS-B",
                        "label": "local search method"
                    },
                    {
                        "name": "dadi_maxiterLocal",
                        "prefix": "",
                        "type": "numeric",
                        "value": 20,
                        "min": "NA",
                        "max": "NA",
                        "step": 1,
                        "label": "maxiterLocal"
                    }
                ]
            }
        ],
        "prepare_report_script": "dadi.prepare.report.py",
        "prepare_report_outputs": [
            "dadi-full_mqc.txt"
        ],
        "install": [],
        "citations": {
            "numpy": [
                "S. van der Walt, S. C. Colbert and G. Varoquaux, 'The NumPy Array: A Structure for Efficient Numerical Computation,' in Computing in Science & Engineering, vol. 13, no. 2, pp. 22-30, March-April 2011, doi: 10.1109\/MCSE.2011.37."
            ],
            "scipy": [
                "Virtanen, P., Gommers, R., Oliphant, T.E. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods 17, 261-272 (2020). https:\/\/doi.org\/10.1038\/s41592-019-0686-2"
            ],
            "matplotlib": [
                "J. D. Hunter, 'Matplotlib: A 2D Graphics Environment,' in Computing in Science & Engineering, vol. 9, no. 3, pp. 90-95, May-June 2007, doi: 10.1109\/MCSE.2007.55."
            ],
            "dadi": [
                "Gutenkunst, R., Hernandez, R., Williamson, S. et al. Diffusion Approximations for Demographic Inference: DaDi. Nat Prec (2010). https:\/\/doi.org\/10.1038\/npre.2010.4594.1"
            ]
        },
        "yaml": "{\n  id: dadi,\n  name: dadi,\n  article: \"10.1038\/npre.2010.4594.1\",\n  website: \"https:\/\/dadi.readthedocs.io\/en\/latest\/\",\n  git: \"https:\/\/bitbucket.org\/gutenkunstlab\/dadi\/src\/master\/\",\n  description: \"Fit population genetic models of demography and selection using diffusion approximations to the allele frequency spectrum\",\n  version: \"2.3.0\",\n  documentation: \"https:\/\/dadi.readthedocs.io\/en\/latest\/\",\n  multiqc: \"custom\",\n  commands:\n    [\n      {\n        name: dadi,\n        cname: \"Dadi\",\n        command: \"\",\n        category: \"genet_pop\",\n        output_dir: dadi,\n        inputs:\n        [\n          { name: fs_file_name, type: \"path\" }\n          #{ pop_file_name: } Path-name to the file describing how individuals map to populations. This file is ignored if datatype is not 'vcf'.\n        ],\n        outputs: [\n          { name: full, type: \"txt\", file: \"dadi-full.txt\", description: \"\" },\n          { name: easy, type: \"txt\", file: \"dadi-easy.txt\", description: \"\" },\n          { name: modelsfs, type: \"txt\", file: \"dadi-modelsfs.txt\", description: \"\" },\n          { name: img, type: \"png\", file: \"dadi_{model}_mqc.png\", description: \"\" }\n        ],\n        options:\n          [\n            {\n              name: dadi_masked,\n              prefix: \"--masked\",\n              type: checkbox,\n              value: FALSE,\n              label: \"--masked : If set, mask the singletons in the sfs: [1,0] and [0,1].\",\n            },\n            {\n              name: dadi_folded,\n              prefix: \"--folded\",\n              type: checkbox,\n              value: FALSE,\n              label: \"--folded : If set, the sfs is folded (i.e. no outgroup to polarize the data).\",\n            },\n            {\n              name: dadi_projected,\n              prefix: \"--projected\",\n              type: checkbox,\n              value: FALSE,\n              label: \"--projected : If set, the sfs is projected down to n1,n2 (values to be set with option -n). If your data have missing calls for some individuals, projecting down to a smaller sample size will increase the number of SNPs you can use. It will average over all possible re-samplings of the larger sample size data (assuming random mating).\",\n            },\n            #{\n            #  name: dadi_nameoutput,\n            #  prefix: \"--nameoutput\",\n            #  type: text,\n            #  value: \"dadi\",\n            #  label: \"Prefix for output files\"\n            #},\n            {\n              name: dadi_datatype,\n              type: select,\n              prefix: \"--datatype\",\n              choices: [\n                simul: \"simul\",\n                sfs: \"sfs\",\n                snp-dadi: \"snp-dadi\"\n              ],\n              value: \"simul\",\n              label: \"Type of input: 1) simul: ms simulation. 2) sfs: sfs data. 3) snp-dadi: snp data with dadi format; the sample size is required (values to be set with options -j and -n). 4) vcf: vcf data; it requires -c to be provided and it will only include sites without missing data.\"\n            },\n            {\n              name: dadi_namepop1,\n              prefix: \"--namepop1\",\n              type: text,\n              value: \"Pop1\",\n              label: \"Population 1 name\"\n            },\n            {\n              name: dadi_namepop2,\n              prefix: \"--namepop2\",\n              type: text,\n              value: \"Pop2\",\n              label: \"Population 2 name\"\n            },\n\n            {\n              name: dadi_proj_sample,\n              prefix: \"--proj_sample\",\n              type: text,\n              value: \"10,10 \",\n              label: \"--proj_sample : Sample size of population 1 and 2 in the sfs. Recall that for a diploid organism we get two samples from each individual. These values are ignored if -j is not set.\"\n            },\n\n            {\n              name: dadi_grid_points,\n              prefix: \"--grid_points\",\n              type: text,\n              value: \"10,20,30 \",\n              label: \"--grid_points : Size of the grids for extrapolation. dadi solves a partial differential equation, approximating the solution using a grid of points in population frequency space (diffusion approximation). The grid takes 3 numbers separated by a coma. Good results are obtained by setting the smallest grid size slightly larger than the largest sample size, but this can be altered depending on usage. If you are fitting a complex model, it may speed up the analysis considerably to first run an optimization at small grid sizes. They can then be refined by running another optimization with a finer grid.\"\n            },\n\n            {\n              name: dadi_model_list,\n              type: select,\n              prefix: \"--model_list\",\n              choices: [\n                SI: \"SI\",\n                IM: \"IM\",\n                SC: \"SC\",\n                AM: \"AM\"\n              ],\n              value: \"SI\",\n              label: \"--model_list : List the models to include in the inference. All available models are defined in dadi_models_2pop.py.\"\n            },\n\n            {\n              name: dadi_maxiterGlobal,\n              prefix: \"\",\n              type: numeric,\n              value: 100,\n              min: 1,\n              max: NA,\n              step: 1,\n              label: \"maximum global search iterations - in each iteration, it explores twice the number of parameters.\",\n            },\n            {\n              name: dadi_accept,\n              prefix: \"\",\n              type: numeric,\n              value: 1,\n              min: NA,\n              max: NA,\n              step: NA,\n              label: \"parameter for acceptance distribution (lower values makes the probability of acceptance smaller)\",\n            },\n            {\n              name: dadi_visit,\n              prefix: \"\",\n              type: numeric,\n              value: 1.01,\n              min: NA,\n              max: NA,\n              step: NA,\n              label: \"parameter for visiting distribution (higher values makes the algorithm jump to a more distant region)\",\n            },\n            {\n              name: dadi_Tini,\n              prefix: \"\",\n              type: numeric,\n              value: 50,\n              min: NA,\n              max: NA,\n              step: NA,\n              label: \"initial temperature\",\n            },\n            {\n              name: dadi_no_local_search,\n              prefix: \"\",\n              type: checkbox,\n              value: FALSE,\n              label: \"If set to True, a Generalized Simulated Annealing will be performed with no local search strategy applied\",\n            },\n            {\n              name: dadi_local_method,\n              prefix: \"\",\n              type: text,\n              value: \"L-BFGS-B\",\n              label: \"local search method\"\n            },\n            {\n              name: dadi_maxiterLocal,\n              prefix: \"\",\n              type: numeric,\n              value: 20,\n              min: NA,\n              max: NA,\n              step: 1,\n              label: \"maxiterLocal\",\n            },         \n          ]\n      },\n    ],\n  prepare_report_script:  dadi.prepare.report.py,\n  prepare_report_outputs: [\n    dadi-full_mqc.txt\n  ],\n  install: {\n    # numpy: [\n    #   \"pip3 install numpy\"\n    # ],\n    # scipy: [\n    #   \"pip3 install scipy\"\n    # ],\n    # matplotlib: [\n    #   \"pip3 install matplotlib\"\n    # ],\n    # dadi: [\n    #   \"cd \/sources\/dadi_sources\",\n    #   \"tar -xvzf dadi-wrapper.tar.gz\",\n    #   \"cd \/sources\/dadi_sources\/dadi-wrapper\/dadi-2.0.6_modif\",\n    #   \"python3 setup.py install\"\n    # ],\n  },\n  citations:  {\n    numpy: [\n      \"S. van der Walt, S. C. Colbert and G. Varoquaux, 'The NumPy Array: A Structure for Efficient Numerical Computation,' in Computing in Science & Engineering, vol. 13, no. 2, pp. 22-30, March-April 2011, doi: 10.1109\/MCSE.2011.37.\"\n    ],\n    scipy: [\n      \"Virtanen, P., Gommers, R., Oliphant, T.E. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods 17, 261-272 (2020). https:\/\/doi.org\/10.1038\/s41592-019-0686-2\"\n    ],\n    matplotlib: [\n      \"J. D. Hunter, 'Matplotlib: A 2D Graphics Environment,' in Computing in Science & Engineering, vol. 9, no. 3, pp. 90-95, May-June 2007, doi: 10.1109\/MCSE.2007.55.\"\n    ],\n    dadi: [\n      \"Gutenkunst, R., Hernandez, R., Williamson, S. et al. Diffusion Approximations for Demographic Inference: DaDi. Nat Prec (2010). https:\/\/doi.org\/10.1038\/npre.2010.4594.1\"\n    ],\n  }\n}\n"
    }
]