コード例 #1
0
ファイル: rules.py プロジェクト: vladsaveliev/snakemake
        def cleanup(f):
            prefix = self.rule.workflow.default_remote_prefix
            # remove constraints and turn this into a plain string
            cleaned = strip_wildcard_constraints(f)
            if (self.rule.workflow.default_remote_provider is not None
                    and f.startswith(prefix) and not is_flagged(f, "local")):
                cleaned = f[len(prefix) + 1:]
                cleaned = IOFile(cleaned, rule=self.rule)
            else:
                cleaned = IOFile(AnnotatedString(cleaned), rule=self.rule)
                cleaned.clone_remote_object(f)

            return cleaned
コード例 #2
0
ファイル: rules.py プロジェクト: mw55309/snakemake
        def cleanup(f):
            prefix = self.rule.workflow.default_remote_prefix
            # remove constraints and turn this into a plain string
            cleaned = strip_wildcard_constraints(f)

            modified_by = get_flag_value(f, PATH_MODIFIER_FLAG)

            if (self.rule.workflow.default_remote_provider is not None
                    and f.startswith(prefix) and not is_flagged(f, "local")):
                cleaned = f[len(prefix) + 1:]
                cleaned = IOFile(cleaned, rule=self.rule)
            else:
                cleaned = IOFile(AnnotatedString(cleaned), rule=self.rule)
                cleaned.clone_remote_object(f)

            if modified_by is not None:
                cleaned.flags[PATH_MODIFIER_FLAG] = modified_by

            return cleaned
コード例 #3
0
ファイル: snakemake.py プロジェクト: epruesse/ymp
 def wrapper(wildcards, **kwargs):
     # no partial here, fail if anything left
     return strip_wildcard_constraints(val).format(
         **kwargs, **wildcards)
コード例 #4
0
ファイル: rules.py プロジェクト: mw55309/snakemake
 def benchmark(self):
     return IOFile(strip_wildcard_constraints(self.rule.benchmark),
                   rule=self.rule)