[
    {
        "id": "populations",
        "name": "Stacks populations",
        "article": "10.1111\/mec.15253",
        "website": "http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/populations.php",
        "git": "",
        "description": "The populations program will analyze a population of individual samples computing a number of population genetics statistics as well as exporting a variety of standard output formats.",
        "version": "2.64",
        "documentation": "http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/populations.php",
        "multiqc": "stacks",
        "commands": [
            {
                "name": "populations",
                "cname": "Populations",
                "command": "populations",
                "category": "stacks",
                "output_dir": "populations",
                "inputs": [
                    {
                        "name": "catalog_calls",
                        "type": "stacks_calls",
                        "description": "Binary calls file from stacks output"
                    },
                    {
                        "name": "popmap",
                        "type": "popmap"
                    }
                ],
                "outputs": [
                    {
                        "name": "sumstats",
                        "type": "tsv",
                        "file": "populations.sumstats.tsv",
                        "description": "summary statistics describing every SNP found in every population. frequecy of alleles, expected\/observed heterozygosity, \u03c0, FIS, and so on."
                    },
                    {
                        "name": "fstats_pop",
                        "type": "tsv",
                        "file": "populations.fst_{popA}-{popB}.tsv",
                        "description": "SNP and haplotype-based F statistics between each populations"
                    },
                    {
                        "name": "haplotypes_tab",
                        "type": "tsv",
                        "file": "populations.haplotypes.tsv",
                        "description": "Haplotypes for each sample"
                    },
                    {
                        "name": "phistats_pop",
                        "type": "tsv",
                        "file": "populations.phistats_{popA}-{popB}.tsv",
                        "description": "Phi statistics between each populations"
                    },
                    {
                        "name": "vcf",
                        "type": "vcf_file",
                        "file": "populations.snps.vcf.gz",
                        "description": "SNP vcf file"
                    },
                    {
                        "name": "structure",
                        "type": "structure",
                        "file": "populations.structure",
                        "description": "Output in Structure format"
                    },
                    {
                        "name": "genepop_haplotypes",
                        "type": "genepop",
                        "file": "populations.haps.genepop",
                        "description": "Haplotypes in GenePop format"
                    },
                    {
                        "name": "genepop_snps",
                        "type": "genepop",
                        "file": "populations.snps.genepop",
                        "description": "SNP in GenePop format"
                    },
                    {
                        "name": "phylip",
                        "type": "phylip",
                        "file": "populations.fixed.phylip",
                        "description": "output nucleotides that are fixed-within, and variant among populations in Phylip format (1 seq per pop)"
                    },
                    {
                        "name": "phylip_var",
                        "type": "phylip",
                        "file": "populations.var.phylip",
                        "description": "include variable sites in the phylip output encoded using IUPAC notation (1 seq per pop)"
                    },
                    {
                        "name": "sample_phylip",
                        "type": "phylip",
                        "file": "samples.fixed.phylip",
                        "description": "output nucleotides that are variant among samples in Phylip format (1 seq per sample)"
                    }
                ],
                "options": [
                    {
                        "name": "populations_threads",
                        "prefix": "-t",
                        "type": "numeric",
                        "value": 4,
                        "min": 1,
                        "max": "NA",
                        "step": 1,
                        "label": "Number of threads to use"
                    },
                    {
                        "name": "populations_r",
                        "prefix": "-r",
                        "type": "numeric",
                        "value": 0.7,
                        "min": 0,
                        "max": "NA",
                        "step": "NA",
                        "label": "Minimum percentage of individuals in a population required to process a locus for that population"
                    },
                    {
                        "name": "populations_max_obs_het",
                        "prefix": "--max-obs-het",
                        "type": "numeric",
                        "value": 1,
                        "min": 0,
                        "max": "NA",
                        "step": "NA",
                        "label": "Specify a maximum observed heterozygosity required to process a nucleotide site at a locus"
                    },
                    {
                        "name": "populations_min_maf",
                        "prefix": "--min-maf",
                        "type": "numeric",
                        "value": 0.05,
                        "min": 0,
                        "max": 0.5,
                        "step": "NA",
                        "label": "Specify a minimum minor allele frequency required to process a nucleotide site at a locus"
                    },
                    {
                        "name": "populations_p",
                        "prefix": "-p",
                        "type": "numeric",
                        "value": 2,
                        "min": 1,
                        "max": "NA",
                        "step": 1,
                        "label": "Minimum number of populations a locus must be present in to process a locus"
                    },
                    {
                        "name": "populations_remove_ctg_info",
                        "prefix": "",
                        "type": "checkbox",
                        "value": true,
                        "label": "Remove ##contig info from vcf header in order not to slow down the conversion to GDS "
                    }
                ]
            }
        ],
        "prepare_report_script": "populations.prepare.report.R",
        "prepare_report_outputs": [
            "PCA_Eigenvalues_mqc.txt",
            "PCA_First2axis_mqc.yaml",
            "Mean_Pairwise_Pop_FST_mqc.csv",
            "IBS_mqc.png"
        ],
        "install": [],
        "citations": {
            "stacks": [
                "Rochette, NC, Rivera-Col\u00f3n, AG, Catchen, JM. Stacks 2: Analytical methods for paired-end sequencing improve RADseq-based population genomics. Mol Ecol. 2019; 28: 4737- 4754. https:\/\/doi.org\/10.1111\/mec.15253"
            ]
        },
        "yaml": "{\n  id: populations,\n  name: Stacks populations,\n  article: 10.1111\/mec.15253,\n  website: \"http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/populations.php\",\n  git: \"\",\n  description: \"The populations program will analyze a population of individual samples computing a number of population genetics statistics as well as exporting a variety of standard output formats.\",\n  version: \"2.64\",\n  documentation: \"http:\/\/catchenlab.life.illinois.edu\/stacks\/comp\/populations.php\",\n  multiqc: \"stacks\",\n  commands:\n    [\n      {\n        name: populations,\n        cname: \"Populations\",\n        command: populations,\n        category: \"stacks\",\n        output_dir: populations,\n        inputs: [{ name: catalog_calls, type: \"stacks_calls\", description: \"Binary calls file from stacks output\" }, { name: popmap, type: \"popmap\" }],\n        outputs: [\n          {name: sumstats, type: \"tsv\", file: \"populations.sumstats.tsv\", description: \"summary statistics describing every SNP found in every population. frequecy of alleles, expected\/observed heterozygosity, \u03c0, FIS, and so on.\"},\n          { name: fstats_pop, type: \"tsv\", file: \"populations.fst_{popA}-{popB}.tsv\", description: \"SNP and haplotype-based F statistics between each populations\" },\n#          { name: fstats_summary, type: \"tsv\", file: \"populations.fst_summary.tsv\", description: \"SNP and haplotype-based F statistics summary\" },\n          { name: haplotypes_tab, type: \"tsv\", file: populations.haplotypes.tsv, description: \"Haplotypes for each sample\" },\n          { name: phistats_pop, type: \"tsv\", file: \"populations.phistats_{popA}-{popB}.tsv\", description: \"Phi statistics between each populations\" },\n#          { name: phistats_summary, type: \"tsv\", file: \"populations.phistats_summary.tsv\", description: \"Phi statistics summary\" },\n          { name: vcf, type: \"vcf_file\", file: \"populations.snps.vcf.gz\", description: \"SNP vcf file\" },\n          { name: structure, type: \"structure\", file: \"populations.structure\", description: \"Output in Structure format\" },\n          { name: genepop_haplotypes, type: \"genepop\", file: \"populations.haps.genepop\", description: \"Haplotypes in GenePop format\" },\n          { name: genepop_snps, type: \"genepop\", file: \"populations.snps.genepop\", description: \"SNP in GenePop format\" },\n#          { name: plink_map, type: \"map\", file: \"populations.plink.map\", description: \"Genotypes in PLINK format\" },\n#          { name: plink_ped, type: \"ped\", file: \"populations.plink.ped\", description: \"Genotypes in PLINK format\" },\n#          { name: radpainter_haplotypes, type: \"radpainter\", file: \"populations.haps.radpainter\", description: \"Haplotypes fineRADstructure\/RADpainter format\" },\n          { name: phylip, type: \"phylip\", file: \"populations.fixed.phylip\", description: \"output nucleotides that are fixed-within, and variant among populations in Phylip format (1 seq per pop)\" },\n          { name: phylip_var, type: \"phylip\", file: \"populations.var.phylip\", description: \"include variable sites in the phylip output encoded using IUPAC notation (1 seq per pop)\" },\n          { name: sample_phylip, type: \"phylip\", file: \"samples.fixed.phylip\", description: \"output nucleotides that are variant among samples in Phylip format (1 seq per sample)\" },\n#          { name: PCA_Eigenvalues_mqc, type: \"txt\", file: PCA_Eigenvalues_mqc.txt ,description: \"PCA eigenvalues\" },\n#          { name: PCA_First2axis_mqc, type: \"yaml\", file: PCA_First2axis_mqc.yaml ,description: \"PCA plot on first 2 axis\" },\n#          { name: Mean_Pairwise_Pop_FST_mqc, type: \"csv\", file: Mean_Pairwise_Pop_FST_mqc.csv ,description: \"Mean pairwise population Fstats\" },\n#          { name: IBS_mqc, type: \"png\", file: IBS_mqc.png ,description: \"IBS heatmap\" },\n        ],\n        options:\n          [\n            {\n              name: populations_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: populations_r,\n              prefix: -r,\n              type: numeric,\n              value: 0.7,\n              min: 0,\n              max: NA,\n              step: NA,\n              label: \"Minimum percentage of individuals in a population required to process a locus for that population\",\n            },\n            {\n              name: populations_max_obs_het,\n              prefix: --max-obs-het,\n              type: numeric,\n              value: 1,\n              min: 0,\n              max: NA,\n              step: NA,\n              label: \"Specify a maximum observed heterozygosity required to process a nucleotide site at a locus\",\n            },\n            {\n              name: populations_min_maf,\n              prefix: --min-maf,\n              type: numeric,\n              value: 0.05,\n              min: 0,\n              max: 0.5,\n              step: NA,\n              label: \"Specify a minimum minor allele frequency required to process a nucleotide site at a locus\",\n            },\n            {\n              name: populations_p,\n              prefix: -p,\n              type: numeric,\n              value: 2,\n              min: 1,\n              max: NA,\n              step: 1,\n              label: \"Minimum number of populations a locus must be present in to process a locus\",\n            },\n            {\n              name: populations_remove_ctg_info,\n              prefix: '',\n              type: checkbox,\n              value: TRUE,\n              label: \"Remove ##contig info from vcf header in order not to slow down the conversion to GDS \",\n            }\n          ],\n      },\n    ],\n  prepare_report_script:  populations.prepare.report.R,\n  prepare_report_outputs: [\n    PCA_Eigenvalues_mqc.txt,\n    PCA_First2axis_mqc.yaml,\n    Mean_Pairwise_Pop_FST_mqc.csv,\n    IBS_mqc.png\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      # calibrate: ['Rscript -e ''install.packages(\"calibrate\",repos=\"https:\/\/cloud.r-project.org\/\",Ncpus=8, clean=TRUE);library(\"calibrate\")'''],\n      # SNPRelate: ['Rscript -e ''BiocManager::install(\"SNPRelate\",Ncpus=8, clean=TRUE);library(\"SNPRelate\")'''],\n      # ComplexHeatmap: ['apt-get install -y libcairo2-dev libxt-dev ', 'Rscript -e ''library(devtools);install_github(\"jokergoo\/ComplexHeatmap\");library(\"ComplexHeatmap\")'''],\n      # tabix: ['apt-get -y install tabix'],\n      # bcftools: [\n      # \"cd \/opt\/biotools\",\n      # \"wget https:\/\/github.com\/samtools\/bcftools\/releases\/download\/1.9\/bcftools-1.9.tar.bz2\",\n      # \"tar -xvjf bcftools-1.9.tar.bz2\",\n      # \"cd bcftools-1.9\",\n      # \".\/configure --prefix=\/opt\/biotools\",\n      # \"make -j 10\",\n      # \"make install\",\n      # \"mv bcftools \/opt\/biotools\/bin\/\",\n      # \"cd .. && rm -r bcftools-1.9.tar.bz2 bcftools-1.9\"\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-based population genomics. Mol Ecol. 2019; 28: 4737- 4754. https:\/\/doi.org\/10.1111\/mec.15253\"\n    ]\n  }\n}\n"
    }
]