Skip to content
Snippets Groups Projects
Commit 0332e6cc authored by Thomas Faraut's avatar Thomas Faraut
Browse files

Pulled down update to submodule_dir

parent db52b585
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,18 @@ class Command(object):
def wdir(self):
return self._wdir
def get_param(self, key):
if key not in self.params:
print_error_exit("key %s absent from config file" % key)
return self.params[key]
def get_param_as_str(self, key):
param = self.get_param(key)
if isinstance(param, list):
return " ".join(map(str, param))
else:
return str(param)
def get_sample_fastq(self, wildcards):
pass
......@@ -407,7 +419,8 @@ class MergeBatches(Detection):
svtype=[x for x in self.varianttypes if x != "mCNV"])
return outputs
class Popsim(Common):
class Popsim(Command):
def __init__(self, params):
Command.__init__(self, params)
......@@ -418,6 +431,34 @@ class Popsim(Common):
svtype=[x for x in self.varianttypes if x != "mCNV"])
return outputs
def buildpop_inputs(self, wildcards):
inputs = {
"reference": self.reference
}
params = {
"nstretches": False,
"genotypes": False,
"sv_list": False
}
if NSTRETCHES is not None:
inputs["nstretches"] = NSTRETCHES
params["nstretches"] = True
if GENOTYPES is not None:
inputs["genotypes"] = GENOTYPES
params["genotypes"] = True
if SV_LIST is not None:
inputs["sv_list"] = SV_LIST
params["sv_list"] = True
return inputs, params
def buildpop_outputs(self):
outputs = []
for n in range(1, NB_INDS+1):
outputs += [os.path.abspath(os.path.join("pop", "indiv%d_1.fq.gz" % n)),
os.path.abspath(os.path.join("pop", "indiv%d_2.fq.gz" % n))]
return outputs
def set_absolute_path(params, key):
params["_"+key] = params[key]
......
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment