flowcraft/templates/process_viral_assembly.py
def write_assembly(self, output_file, filtered=True):
        """Writes the assembly to a new file.

        The ``filtered`` option controls whether the new assembly will be
        filtered or not.

        Parameters
        ----------
        output_file : str
            Name of the output assembly file.
        filtered : bool
            If ``True``, does not include filtered ids.
        """

        logger.debug("Writing the filtered assembly into: {}".format(
            output_file))
        with open(output_file, "w") as fh:

            for contig_id, contig in self.contigs.items():
                if contig_id not in self.filtered_ids and filtered:
                    fh.write(">{}_{}\\n{}\\n".format(self.sample,
                                                     contig["header"],
                                                     contig["sequence"]))
def write_assembly(self, output_file, filtered=True):
        logger.debug("Writing the filtered assembly into: {}".format(
            output_file))
        with open(output_file, "w") as fh:

            for contig_id, contig in self.contigs.items():
                if contig_id not in self.filtered_ids and filtered:
                    fh.write(">{}_{}\\n{}\\n".format(self.sample,
                                                     contig["header"],
                                                     contig["sequence"]))
def write_assembly ( self , output_file , filtered = True ) : logger . debug ( "Writing the filtered assembly into: {}" . format ( output_file ) ) with open ( output_file , "w" ) as fh : for contig_id , contig in self . contigs . items ( ) : if contig_id not in self . filtered_ids and filtered : fh . write ( ">{}_{}\\n{}\\n" . format ( self . sample , contig [ "header" ] , contig [ "sequence" ] ) )
Writes the assembly to a new file.

        The ``filtered`` option controls whether the new assembly will be
        filtered or not.

        Parameters
        ----------
        output_file : str
            Name of the output assembly file.
        filtered : bool
            If ``True``, does not include filtered ids.
Writes the assembly to a new file .