Snakemake extension functions
- add_targets(*targets)
- PP(p, parent_project_id=None)
Value of the project parameter
pin current project, if parent_project_id is not specified, otherwise the value of parameterpinparent_project_id. If parameterpis not in the project parameters, then the value of this parameter in the first recusively searched parameters of parent projects. If none is found returns None.
- T(t)
The file name for target
tof the current object.
- TE(t)
The file name pattern for target
tof the current object suitable as an argument to the expand function (a.k.a. the curly brackets are doubled).
- EF(s)
Argument
sis a string that may include projects parameters as well as object’s parameters as they are definded with PP and P directives in the so_project.yaml file.
- DT(t, dot=None, level=1, mode='equal')
List of files for the targets named
tof the dependency objects (the objects the current object depends on).- Parameters
t (str) – the name of the target in the dependency objects.
dot (str) – the object type of the dependency objects to be used. If None, dependency objects of all object types will be used, if not None, the level and model values are ignored.
level (int) – how many levels down the dependency graph to explore. The default value of 1 indicates that only the objects that the current object depends on directly will be used.
mode (
'equal'or'lessOrEqual') – if set to'equal', only objects that are exactly level steps away from the current object will be used. If set to'lessOrEqual', objects of level steps or less will be used.
- P(p)
Value of the parameter
pof the current object or None, ifpis not in the list of parameters.
- DP(p, dot=None, level=1, mode='equal')
List of values of the parameter
pof the dependency objects (the objects the current object depends on, the values are None, ifpis not in the parameters ).- Parameters
p (str) – the name of the parameter of the dependency objects.
dot (str) – the object type of the dependency objects to be used. If None, dependency objects of all object types will be used.
level (int) – how many levels down the dependency graph to explore. The default value of 1 indicates that only the objects that the current object depends on directly will be used.
mode (
'equal'or'lessOrEqual') – if set to'equal', only objects that are exactly level steps away from the current object will be used. If set to'lessOrEqual', objects of level steps or less will be used.
- LFS(t)
A set of three log files, log.O, log.E, and log.T, named after target
tto be used in a rule.This function is expected to be used in the
logsection of the snakemake rules likelog: **LFS('bamFile')). After that, the rule can use one or more of{log.O},{log.E}, and{log.T}for storing standard output, standard error, or timing information respectively.