flowcraft/generator/engine.py
def build(self):
        """Main pipeline builder

        This method is responsible for building the
        :py:attr:`NextflowGenerator.template` attribute that will contain
        the nextflow code of the pipeline.

        First it builds the header, then sets the main channels, the
        secondary inputs, secondary channels and finally the
        status channels. When the pipeline is built, is writes the code
        to a nextflow file.
        """

        logger.info(colored_print(
            "\tSuccessfully connected {} process(es) with {} "
            "fork(s) across {} lane(s) \u2713".format(
                len(self.processes[1:]), len(self._fork_tree), self.lanes)))

        # Generate regular nextflow header that sets up the shebang, imports
        # and all possible initial channels
        self._build_header()

        self._set_channels()

        self._set_init_process()

        self._set_secondary_channels()

        logger.info(colored_print(
            "\tSuccessfully set {} secondary channel(s) \u2713".format(
                len(self.secondary_channels))))

        self._set_compiler_channels()

        self._set_configurations()

        logger.info(colored_print(
            "\tFinished configurations \u2713"))

        for p in self.processes:
            self.template += "\n{}".format(p.template_str)

        self._build_footer()

        project_root = dirname(self.nf_file)

        # Write configs
        self.write_configs(project_root)

        # Write pipeline file
        with open(self.nf_file, "w") as fh:
            fh.write(self.template)

        logger.info(colored_print(
            "\tPipeline written into {} \u2713".format(self.nf_file)))
def build(self):
        logger.info(colored_print(
            "\tSuccessfully connected {} process(es) with {} "
            "fork(s) across {} lane(s) \u2713".format(
                len(self.processes[1:]), len(self._fork_tree), self.lanes)))

        # Generate regular nextflow header that sets up the shebang, imports
        # and all possible initial channels
        self._build_header()

        self._set_channels()

        self._set_init_process()

        self._set_secondary_channels()

        logger.info(colored_print(
            "\tSuccessfully set {} secondary channel(s) \u2713".format(
                len(self.secondary_channels))))

        self._set_compiler_channels()

        self._set_configurations()

        logger.info(colored_print(
            "\tFinished configurations \u2713"))

        for p in self.processes:
            self.template += "\n{}".format(p.template_str)

        self._build_footer()

        project_root = dirname(self.nf_file)

        # Write configs
        self.write_configs(project_root)

        # Write pipeline file
        with open(self.nf_file, "w") as fh:
            fh.write(self.template)

        logger.info(colored_print(
            "\tPipeline written into {} \u2713".format(self.nf_file)))
def build ( self ) : logger . info ( colored_print ( "\tSuccessfully connected {} process(es) with {} " "fork(s) across {} lane(s) \u2713" . format ( len ( self . processes [ 1 : ] ) , len ( self . _fork_tree ) , self . lanes ) ) ) # Generate regular nextflow header that sets up the shebang, imports # and all possible initial channels self . _build_header ( ) self . _set_channels ( ) self . _set_init_process ( ) self . _set_secondary_channels ( ) logger . info ( colored_print ( "\tSuccessfully set {} secondary channel(s) \u2713" . format ( len ( self . secondary_channels ) ) ) ) self . _set_compiler_channels ( ) self . _set_configurations ( ) logger . info ( colored_print ( "\tFinished configurations \u2713" ) ) for p in self . processes : self . template += "\n{}" . format ( p . template_str ) self . _build_footer ( ) project_root = dirname ( self . nf_file ) # Write configs self . write_configs ( project_root ) # Write pipeline file with open ( self . nf_file , "w" ) as fh : fh . write ( self . template ) logger . info ( colored_print ( "\tPipeline written into {} \u2713" . format ( self . nf_file ) ) )
Main pipeline builder

        This method is responsible for building the
        :py:attr:`NextflowGenerator.template` attribute that will contain
        the nextflow code of the pipeline.

        First it builds the header, then sets the main channels, the
        secondary inputs, secondary channels and finally the
        status channels. When the pipeline is built, is writes the code
        to a nextflow file.
Main pipeline builder