def build(self):
logger.info(colored_print(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>len(self.processes[<NUM_LIT:1>:]), len(self._fork_tree), self.lanes)))<EOL>self._build_header()<EOL>self._set_channels()<EOL>self._set_init_process()<EOL>self._set_secondary_channels()<EOL>logger.info(colored_print(<EOL>"<STR_LIT>".format(<EOL>len(self.secondary_channels))))<EOL>self._set_compiler_channels()<EOL>self._set_configurations()<EOL>logger.info(colored_print(<EOL>"<STR_LIT>"))<EOL>for p in self.processes:<EOL><INDENT>self.template += "<STR_LIT>".format(p.template_str)<EOL><DEDENT>self._build_footer()<EOL>project_root = dirname(self.nf_file)<EOL>self.write_configs(project_root)<EOL>with open(self.nf_file, "<STR_LIT:w>") as fh:<EOL><INDENT>fh.write(self.template)<EOL><DEDENT>logger.info(colored_print(<EOL>"<STR_LIT>".format(self.nf_file)))<EOL>
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.