Commit 6aa73da6 authored by khalid's avatar khalid
Browse files

Add moments tool and try to adapt Simul_Gpop workflow

parent c870b9bc
......@@ -66,8 +66,8 @@ def generate(name):
if "steps_in" in yaml:
for step in yaml["steps_in"]:
for step in yaml["steps_in"]:
print(step)
if "rule_name" in step:
result += "def " + step["step_name"] + "_" + step["rule_name"] + "_inputs():\n"
......
......@@ -3,6 +3,8 @@
# Needs 4 arguments: workflow name, output directory, SAG directory, local_config
# local_config is a file with some configuration usefull for cluster execution or other type of specificity
# Usage: ./main.sh workflow_name output_dir sag_dir local_config
# N.B. output_dir must be global not relative to the current i.e. /home/toto/test/
# sag_dir is the location where sag generator is installed (from https://gitlab.mbb.univ-montp2.fr/jlopez/sag.git)
WAW_DIR=$(pwd)
......
......@@ -20,7 +20,7 @@ config = config["params"]
# Tools inputs functions
def dadi_inputs():
def moments_inputs():
inputs = dict()
inputs["msout"] = rules.simul_coal.output.msout
return inputs
......@@ -35,7 +35,7 @@ def dadi_inputs():
def step_outputs(step):
outputs = list()
if (step == "estimate_model_params" ):
outputs = rules.dadi.output
outputs = rules.moments.output
if (step == "all"):
outputs = list(rules.multiqc.output)
......
......@@ -2,13 +2,14 @@
name: Simul_Gpop,
docker_name: simul_gpop,
description: "",
version: "0.0.1",
version: "0.0.2",
author: "MBB",
#input: "",
steps:
[
{ title: "Coalescent simulation", name: "coal_simul_step", tools: [simul_coal], default: "simul_coal" },
{ title: "Estimate model parameters", name: "estimate_model_params", tools: [dadi], default: "dadi" },
{ title: "Estimate model parameters dadi", name: "estimate_model_params_dadi", tools: [dadi], default: "dadi" },
{ title: "Estimate model parameters moments", name: "estimate_model_params_moments", tools: [moments], default: "moments" },
],
options:
[
......@@ -21,14 +22,21 @@
},
],
steps_in: [
{ step_name: estimate_model_params, tool_name: dadi, rule_name: dadi,
{ step_name: estimate_model_params_dadi, tool_name: dadi, rule_name: dadi,
params: [
{input_name: input, origin_command: simul_coal, origin_name: msout },
{input_name: inputdadi, origin_command: simul_coal, origin_name: msout },
]
},
{ step_name: estimate_model_params_moments, tool_name: moments, rule_name: moments,
params: [
{input_name: inputmoments, origin_command: simul_coal, origin_name: msout },
]
},
],
params_equals: [
{ param_A: simul_coal_pop1, param_B: dadi_namepop1 },
{ param_A: simul_coal_pop2, param_B: dadi_namepop2 },
{ param_A: simul_coal_pop1, param_B: moments_namepop1 },
{ param_A: simul_coal_pop2, param_B: moments_namepop2 },
]
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment