flowcraft/generator/engine.py
def _set_configurations(self):
        """This method will iterate over all process in the pipeline and
        populate the nextflow configuration files with the directives
        of each process in the pipeline.
        """

        logger.debug("======================")
        logger.debug("Setting configurations")
        logger.debug("======================")

        resources = ""
        containers = ""
        params = ""
        manifest = ""

        if self.merge_params:
            params += self._get_merged_params_string()
            help_list = self._get_merged_params_help()
        else:
            params += self._get_params_string()
            help_list = self._get_params_help()

        for p in self.processes:

            # Skip processes with the directives attribute populated
            if not p.directives:
                continue

            logger.debug("[{}] Adding directives: {}".format(
                p.template, p.directives))
            resources += self._get_resources_string(p.directives, p.pid)
            containers += self._get_container_string(p.directives, p.pid)

        manifest = self._get_manifest_string()

        self.resources = self._render_config("resources.config", {
            "process_info": resources
        })
        self.containers = self._render_config("containers.config", {
            "container_info": containers
        })
        self.params = self._render_config("params.config", {
            "params_info": params
        })
        self.manifest = self._render_config("manifest.config", {
            "manifest_info": manifest
        })
        self.help = self._render_config("Helper.groovy", {
            "nf_file": basename(self.nf_file),
            "help_list": help_list,
            "version": __version__,
            "pipeline_name": " ".join([x.upper() for x in self.pipeline_name])
        })
        self.user_config = self._render_config("user.config", {})
def _set_configurations(self):
        logger.debug("======================")
        logger.debug("Setting configurations")
        logger.debug("======================")

        resources = ""
        containers = ""
        params = ""
        manifest = ""

        if self.merge_params:
            params += self._get_merged_params_string()
            help_list = self._get_merged_params_help()
        else:
            params += self._get_params_string()
            help_list = self._get_params_help()

        for p in self.processes:

            # Skip processes with the directives attribute populated
            if not p.directives:
                continue

            logger.debug("[{}] Adding directives: {}".format(
                p.template, p.directives))
            resources += self._get_resources_string(p.directives, p.pid)
            containers += self._get_container_string(p.directives, p.pid)

        manifest = self._get_manifest_string()

        self.resources = self._render_config("resources.config", {
            "process_info": resources
        })
        self.containers = self._render_config("containers.config", {
            "container_info": containers
        })
        self.params = self._render_config("params.config", {
            "params_info": params
        })
        self.manifest = self._render_config("manifest.config", {
            "manifest_info": manifest
        })
        self.help = self._render_config("Helper.groovy", {
            "nf_file": basename(self.nf_file),
            "help_list": help_list,
            "version": __version__,
            "pipeline_name": " ".join([x.upper() for x in self.pipeline_name])
        })
        self.user_config = self._render_config("user.config", {})
def _set_configurations ( self ) : logger . debug ( "======================" ) logger . debug ( "Setting configurations" ) logger . debug ( "======================" ) resources = "" containers = "" params = "" manifest = "" if self . merge_params : params += self . _get_merged_params_string ( ) help_list = self . _get_merged_params_help ( ) else : params += self . _get_params_string ( ) help_list = self . _get_params_help ( ) for p in self . processes : # Skip processes with the directives attribute populated if not p . directives : continue logger . debug ( "[{}] Adding directives: {}" . format ( p . template , p . directives ) ) resources += self . _get_resources_string ( p . directives , p . pid ) containers += self . _get_container_string ( p . directives , p . pid ) manifest = self . _get_manifest_string ( ) self . resources = self . _render_config ( "resources.config" , { "process_info" : resources } ) self . containers = self . _render_config ( "containers.config" , { "container_info" : containers } ) self . params = self . _render_config ( "params.config" , { "params_info" : params } ) self . manifest = self . _render_config ( "manifest.config" , { "manifest_info" : manifest } ) self . help = self . _render_config ( "Helper.groovy" , { "nf_file" : basename ( self . nf_file ) , "help_list" : help_list , "version" : __version__ , "pipeline_name" : " " . join ( [ x . upper ( ) for x in self . pipeline_name ] ) } ) self . user_config = self . _render_config ( "user.config" , { } )
This method will iterate over all process in the pipeline and
        populate the nextflow configuration files with the directives
        of each process in the pipeline.
This method will iterate over all process in the pipeline and populate the nextflow configuration files with the directives of each process in the pipeline .