[
    {
        "name": "RADseq_ref",
        "docker_name": "RADseq_ref",
        "description": "Stacks RADseq on ref. genome",
        "version": "0.0.1",
        "author": "MBB",
        "options": [
            {
                "name": "results_dir",
                "type": "output_dir",
                "value": "\/Results",
                "label": "Results directory: ",
                "volumes": [
                    {
                        "Results": "\/Results"
                    }
                ]
            }
        ],
        "steps_in": [
            {
                "step_name": "indexing",
                "tool_name": "bowtie_index",
                "rule_name": "bowtie_index",
                "params": [
                    {
                        "input_name": "genome_fasta",
                        "origin_command": "raw_contigs",
                        "origin_name": "contigs",
                        "origin_step": "input"
                    }
                ]
            },
            {
                "step_name": "stacks",
                "tool_name": "process_radtags",
                "rule_name": "process_radtags_SE",
                "params": [
                    {
                        "input_name": "reads_dir",
                        "origin_command": "raw_read_dir",
                        "origin_name": "read_dir",
                        "origin_step": "input"
                    },
                    {
                        "input_name": "tags",
                        "origin_command": "raw_tsv",
                        "origin_name": "tsv",
                        "origin_step": "input"
                    }
                ]
            },
            {
                "step_name": "mapping",
                "tool_name": "bowtie",
                "rule_name": "bowtie_SE",
                "params": [
                    {
                        "input_name": "read",
                        "origin_command": "process_radtags_SE",
                        "origin_name": "reads_demultiplexed",
                        "origin_step": "stacks"
                    },
                    {
                        "input_name": "index",
                        "origin_command": "bowtie_index",
                        "origin_name": "index",
                        "origin_step": "indexing"
                    }
                ]
            },
            {
                "step_name": "stacks_2",
                "tool_name": "gstacks_refMap",
                "rule_name": "gstacks_refMap",
                "params": [
                    {
                        "input_name": "bams",
                        "origin_command": "bowtie_SE",
                        "origin_name": "bam",
                        "origin_step": "mapping"
                    },
                    {
                        "input_name": "popmap",
                        "origin_command": "raw_popmap",
                        "origin_name": "popmap",
                        "origin_step": "input"
                    }
                ]
            },
            {
                "step_name": "stacks_3",
                "tool_name": "populations",
                "rule_name": "populations",
                "params": [
                    {
                        "input_name": "catalog_calls",
                        "origin_command": "gstacks_refMap",
                        "origin_name": "catalog_calls",
                        "origin_step": "stacks_2"
                    },
                    {
                        "input_name": "popmap",
                        "origin_command": "raw_popmap",
                        "origin_name": "popmap",
                        "origin_step": "input"
                    }
                ]
            }
        ],
        "steps": [
            {
                "title": "indexing",
                "name": "indexing",
                "tools": [
                    "bowtie_index"
                ],
                "default": "bowtie_index"
            },
            {
                "title": "stacks",
                "name": "stacks",
                "tools": [
                    "process_radtags"
                ],
                "default": "process_radtags"
            },
            {
                "title": "mapping",
                "name": "mapping",
                "tools": [
                    "bowtie"
                ],
                "default": "bowtie"
            },
            {
                "title": "stacks_2",
                "name": "stacks_2",
                "tools": [
                    "gstacks_refMap"
                ],
                "default": "gstacks_refMap"
            },
            {
                "title": "stacks_3",
                "name": "stacks_3",
                "tools": [
                    "populations"
                ],
                "default": "populations"
            }
        ],
        "input": [
            "raw_contigs",
            "raw_read_dir",
            "raw_tsv",
            "raw_popmap"
        ],
        "params_equals": [
            {
                "param_A": "stacks_2__gstacks_refMap_popmap",
                "param_B": "stacks_3__populations_popmap"
            }
        ],
        "git": "https:\/\/gitlab.mbb.univ-montp2.fr\/khalid\/RADseq_ref",
        "json": {
            "class": "GraphLinksModel",
            "linkFromPortIdProperty": "fromPort",
            "linkToPortIdProperty": "toPort",
            "modelData": {
                "position": "-616.1309691043286 -875.9281771610162"
            },
            "nodeDataArray": [
                {
                    "name": "bowtie_SE",
                    "text": "Bowtie SE",
                    "size2": "130 85",
                    "category": "Tool",
                    "strokeWidth": 2,
                    "fill": "#3498db",
                    "inservices": [
                        {
                            "name": "i1",
                            "type": "reads",
                            "value": "read",
                            "description": "",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "i2",
                            "type": "bowtie_index",
                            "value": "index",
                            "description": "Index files for bowtie alignment",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "bams",
                            "value": "bam",
                            "description": "Alignment files",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o2",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "Bowtie is an ultrafast, memory-efficient short read aligner.",
                    "version": "1.3.0",
                    "key": "8150707172",
                    "loc": "180 -370"
                },
                {
                    "name": "contigs",
                    "text": "contigs",
                    "size2": "",
                    "category": "Data",
                    "strokeWidth": 2,
                    "fill": "#2ecc71",
                    "inservices": [],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "contigs",
                            "value": "raw_contigs",
                            "description": "",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o2",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "unknown",
                    "version": "unknown",
                    "key": -6,
                    "loc": "-390 -20"
                },
                {
                    "name": "tsv",
                    "text": "tsv",
                    "size2": "",
                    "category": "Data",
                    "strokeWidth": 2,
                    "fill": "#2ecc71",
                    "inservices": [],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "tsv",
                            "value": "raw_tsv",
                            "description": "",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o2",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "unknown",
                    "version": "unknown",
                    "key": -5,
                    "loc": "-380 -180"
                },
                {
                    "name": "popmap",
                    "text": "popmap",
                    "size2": "",
                    "category": "Data",
                    "strokeWidth": 2,
                    "fill": "#2ecc71",
                    "inservices": [],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "popmap",
                            "value": "raw_popmap",
                            "description": "",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o2",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "unknown",
                    "version": "unknown",
                    "key": -9,
                    "loc": "270 -160"
                },
                {
                    "name": "bowtie_index",
                    "text": "Bowtie index",
                    "size2": "155 60",
                    "category": "Tool",
                    "strokeWidth": 2,
                    "fill": "#3498db",
                    "inservices": [
                        {
                            "name": "i1",
                            "type": "contigs",
                            "value": "genome_fasta",
                            "description": "Fasta reference",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "bowtie_index",
                            "value": "index",
                            "description": "Index files for bowtie alignment",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o2",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "Bowtie is an ultrafast, memory-efficient short read aligner.",
                    "version": "1.3.0",
                    "key": "6021309174",
                    "loc": "0 -30"
                },
                {
                    "name": "SE_read_dir",
                    "text": "SE_read_dir",
                    "size2": "",
                    "category": "Data",
                    "strokeWidth": 2,
                    "fill": "#2ecc71",
                    "inservices": [],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "SE_read_dir",
                            "value": "raw_SE_read_dir",
                            "description": "",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o2",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "unknown",
                    "version": "unknown",
                    "key": -10,
                    "loc": "-390 -280"
                },
                {
                    "name": "process_radtags_SE",
                    "text": "Process radtags SE",
                    "size2": "195 85",
                    "category": "Tool",
                    "strokeWidth": 2,
                    "fill": "#3498db",
                    "inservices": [
                        {
                            "name": "i1",
                            "type": "SE_read_dir",
                            "value": "reads_dir",
                            "description": "Directory containing one or more multiplexed SE read files to process",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "i2",
                            "type": "tsv",
                            "value": "tags",
                            "description": "Barcode file",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "fq.gz",
                            "value": "reads_demultiplexed",
                            "description": "Files of reads for each individual",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o2",
                            "type": "SE_read_dir",
                            "value": "read_dir",
                            "description": "dir containing demultiplexed files",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o3",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "process_radtags examines raw reads from an Illumina sequencing run and first, checks that the barcode and the RAD cutsite are intact, and demultiplexes the data. If there are errors in the barcode or the RAD site within a certain allowance process_radtags can correct them. Second, it slides a window down the length of the read and checks the average quality score within the window. If the score drops below 90% probability of being correct (a raw phred score of 10), the read is discarded.",
                    "version": "2.64",
                    "key": "1788931118",
                    "loc": "-140 -250"
                },
                {
                    "name": "gstacks_refMap",
                    "text": "gstacks_refMap",
                    "size2": "150 110",
                    "category": "Tool",
                    "strokeWidth": 2,
                    "fill": "#3498db",
                    "inservices": [
                        {
                            "name": "i1",
                            "type": "bams",
                            "value": "bams",
                            "description": "",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "i2",
                            "type": "popmap",
                            "value": "popmap",
                            "description": "",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "stacks_calls",
                            "value": "catalog_calls",
                            "description": "Consensus sequence for each assembled locus in the data",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o2",
                            "type": "fa.gz",
                            "value": "catalog_fa",
                            "description": "Custom file that contains genotyping data",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o3",
                            "type": "distribs",
                            "value": "stats",
                            "description": "Distributions statistics (bam stats, coverage and phasing_rates per sample)",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o4",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "description": "gstacks build loci from the single and\/or paired-end reads before calling SNPs",
                    "version": "2.64",
                    "key": "8626436167",
                    "loc": "460 -360"
                },
                {
                    "name": "populations",
                    "text": "Populations",
                    "size2": "150 310",
                    "category": "Tool",
                    "strokeWidth": 2,
                    "fill": "#3498db",
                    "inservices": [
                        {
                            "name": "i1",
                            "type": "stacks_calls",
                            "value": "catalog_calls",
                            "description": "Binary calls file from stacks output",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "i2",
                            "type": "popmap",
                            "value": "popmap",
                            "description": "",
                            "ptype": "IN",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices": [
                        {
                            "name": "o1",
                            "type": "tsv",
                            "value": "sumstats",
                            "description": "summary statistics describing every SNP found in every population. frequecy of alleles, expected\/observed heterozygosity, \u03c0, FIS, and so on.",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o2",
                            "type": "tsv",
                            "value": "fstats_pop",
                            "description": "SNP and haplotype-based F statistics between each populations",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o3",
                            "type": "tsv",
                            "value": "haplotypes_tab",
                            "description": "Haplotypes for each sample",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o4",
                            "type": "tsv",
                            "value": "phistats_pop",
                            "description": "Phi statistics between each populations",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o5",
                            "type": "vcf_file",
                            "value": "vcf",
                            "description": "SNP vcf file",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o6",
                            "type": "structure",
                            "value": "structure",
                            "description": "Output in Structure format",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o7",
                            "type": "genepop",
                            "value": "genepop_haplotypes",
                            "description": "Haplotypes in GenePop format",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o8",
                            "type": "genepop",
                            "value": "genepop_snps",
                            "description": "SNP in GenePop format",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o9",
                            "type": "phylip",
                            "value": "phylip",
                            "description": "output nucleotides that are fixed-within, and variant among populations in Phylip format (1 seq per pop)",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o10",
                            "type": "phylip",
                            "value": "phylip_var",
                            "description": "include variable sites in the phylip output encoded using IUPAC notation (1 seq per pop)",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        },
                        {
                            "name": "o11",
                            "type": "phylip",
                            "value": "sample_phylip",
                            "description": "output nucleotides that are variant among samples in Phylip format (1 seq per sample)",
                            "ptype": "OUT",
                            "from": "",
                            "list": false,
                            "stroke": "#000000"
                        }
                    ],
                    "outservices2": [
                        {
                            "name": "o12",
                            "type": "link",
                            "value": "linkOut"
                        }
                    ],
                    "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",
                    "key": "1821825237",
                    "loc": "840 -360"
                }
            ],
            "linkDataArray": [
                {
                    "from": -5,
                    "to": "1788931118",
                    "fromPort": "raw_tsv",
                    "toPort": "tags",
                    "points": [
                        -321.94545459747314,
                        -178.7,
                        -311.94545459747314,
                        -178.7,
                        -286.7363636493683,
                        -178.7,
                        -286.7363636493683,
                        -235.55818195343014,
                        -261.5272727012634,
                        -235.55818195343014,
                        -251.52727270126343,
                        -235.55818195343014
                    ]
                },
                {
                    "from": "8150707172",
                    "to": "8626436167",
                    "fromPort": "bam",
                    "toPort": "bams",
                    "points": [
                        259.0272727012634,
                        -367.35,
                        269.0272727012634,
                        -367.35,
                        315,
                        -367.35,
                        315,
                        -370.3918180465698,
                        360.9727272987366,
                        -370.3918180465698,
                        370.9727272987366,
                        -370.3918180465698
                    ]
                },
                {
                    "from": -9,
                    "to": "8626436167",
                    "fromPort": "raw_popmap",
                    "toPort": "popmap",
                    "points": [
                        328.05454540252686,
                        -161.63060601552326,
                        338.05454540252686,
                        -161.63060601552326,
                        349.5136363506317,
                        -161.63060601552326,
                        349.5136363506317,
                        -346.8081819534301,
                        360.9727272987366,
                        -346.8081819534301,
                        370.9727272987366,
                        -346.8081819534301
                    ]
                },
                {
                    "from": "6021309174",
                    "to": "8150707172",
                    "fromPort": "index",
                    "toPort": "index",
                    "points": [
                        91.52727270126343,
                        -26.099999999999994,
                        101.52727270126343,
                        -26.099999999999994,
                        101.52727270126343,
                        -193.75,
                        90.97272729873657,
                        -193.75,
                        90.97272729873657,
                        -355.5581819534301,
                        100.97272729873657,
                        -355.5581819534301
                    ]
                },
                {
                    "from": -6,
                    "to": "6021309174",
                    "fromPort": "raw_contigs",
                    "toPort": "genome_fasta",
                    "points": [
                        -331.94545459747314,
                        -18.700000000000003,
                        -321.94545459747314,
                        -18.700000000000003,
                        -211.7363636493683,
                        -18.700000000000003,
                        -211.7363636493683,
                        -26.099999999999994,
                        -101.52727270126343,
                        -26.099999999999994,
                        -91.52727270126343,
                        -26.099999999999994
                    ]
                },
                {
                    "from": -10,
                    "to": "1788931118",
                    "fromPort": "raw_SE_read_dir",
                    "toPort": "reads_dir",
                    "points": [
                        -331.94545459747314,
                        -278.70000000000005,
                        -321.94545459747314,
                        -278.70000000000005,
                        -291.7363636493683,
                        -278.70000000000005,
                        -291.7363636493683,
                        -259.1418180465698,
                        -261.5272727012634,
                        -259.1418180465698,
                        -251.52727270126343,
                        -259.1418180465698
                    ]
                },
                {
                    "from": "1788931118",
                    "to": "8150707172",
                    "fromPort": "reads_demultiplexed",
                    "toPort": "read",
                    "points": [
                        -28.472727298736572,
                        -259.1418180465698,
                        -18.472727298736572,
                        -259.1418180465698,
                        36.25,
                        -259.1418180465698,
                        36.25,
                        -379.1418180465698,
                        90.97272729873657,
                        -379.1418180465698,
                        100.97272729873657,
                        -379.1418180465698
                    ]
                },
                {
                    "from": "8626436167",
                    "to": "1821825237",
                    "fromPort": "catalog_calls",
                    "toPort": "catalog_calls",
                    "points": [
                        549.0272727012634,
                        -382.1836360931396,
                        559.0272727012634,
                        -382.1836360931396,
                        648.9659090042114,
                        -382.1836360931396,
                        648.9659090042114,
                        -380.3918180465698,
                        738.9045453071594,
                        -380.3918180465698,
                        748.9045453071594,
                        -380.3918180465698
                    ]
                },
                {
                    "from": -9,
                    "to": "1821825237",
                    "fromPort": "raw_popmap",
                    "toPort": "popmap",
                    "points": [
                        328.05454540252686,
                        -155.76939398447672,
                        346.05454540252686,
                        -155.76939398447672,
                        348,
                        -155.76939398447672,
                        348,
                        -155.76939398447672,
                        556,
                        -155.76939398447672,
                        556,
                        -356.8081819534301,
                        738.9045453071594,
                        -356.8081819534301,
                        748.9045453071594,
                        -356.8081819534301
                    ]
                }
            ],
            "version": 2
        },
        "yaml": "{\nname: \"RADseq_ref\",\ndocker_name: \"RADseq_ref\",\ndescription: \"Stacks RADseq on ref. genome\",\nversion: \"0.0.1\",\nauthor: \"MBB\",\noptions: [\n    {\n    name: \"results_dir\",\n    type: \"output_dir\",\n    value: \"\/Results\",\n    label: \"Results directory: \",\n    volumes:  [Results: \"\/Results\"]\n    },\n],\nsteps_in: [\n{ step_name: \"indexing\", tool_name: \"bowtie_index\", rule_name: \"bowtie_index\",\n    params: [\n        { input_name: genome_fasta, origin_command: raw_contigs, origin_name: contigs, origin_step: input},\n    ]\n},\n{ step_name: \"stacks\", tool_name: \"process_radtags\", rule_name: \"process_radtags_SE\",\n    params: [\n        { input_name: reads_dir, origin_command: raw_read_dir, origin_name: read_dir, origin_step: input},\n        { input_name: tags, origin_command: raw_tsv, origin_name: tsv, origin_step: input},\n    ]\n},\n{ step_name: \"mapping\", tool_name: \"bowtie\", rule_name: \"bowtie_SE\",\n    params: [\n        { input_name: read, origin_command: process_radtags_SE, origin_name: reads_demultiplexed, origin_step: stacks},\n        { input_name: index, origin_command: bowtie_index, origin_name: index, origin_step: indexing},\n    ]\n},\n{ step_name: \"stacks_2\", tool_name: \"gstacks_refMap\", rule_name: \"gstacks_refMap\",\n    params: [\n        { input_name: bams, origin_command: bowtie_SE, origin_name: bam, origin_step: mapping},\n        { input_name: popmap, origin_command: raw_popmap, origin_name: popmap, origin_step: input},\n    ]\n},\n{ step_name: \"stacks_3\", tool_name: \"populations\", rule_name: \"populations\",\n    params: [\n        { input_name: catalog_calls, origin_command: gstacks_refMap, origin_name: catalog_calls, origin_step: stacks_2},\n        { input_name: popmap, origin_command: raw_popmap, origin_name: popmap, origin_step: input},\n    ]\n},\n],\nsteps: [\n    { title: \"indexing\", name: \"indexing\", tools: [bowtie_index], default: \"bowtie_index\" },\n    { title: \"stacks\", name: \"stacks\", tools: [process_radtags], default: \"process_radtags\" },\n    { title: \"mapping\", name: \"mapping\", tools: [bowtie], default: \"bowtie\" },\n    { title: \"stacks_2\", name: \"stacks_2\", tools: [gstacks_refMap], default: \"gstacks_refMap\" },\n    { title: \"stacks_3\", name: \"stacks_3\", tools: [populations], default: \"populations\" },\n],\ninput: [\"raw_contigs\",\"raw_read_dir\",\"raw_tsv\",\"raw_popmap\",],\nparams_equals: [\n        { param_A: \"stacks_2__gstacks_refMap_popmap\", param_B:   \"stacks_3__populations_popmap\"},\n\n]\n\n\n}\n"
    }
]