How to use the comparem.amino_acid_usage.AminoAcidUsage function in comparem

To help you get started, we’ve selected a few comparem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dparks1134 / CompareM / comparem / main.py View on Github external
def aa_usage(self, options):
        """Amino acid usage command"""

        gene_files = self._input_files(options.protein_gene_files, options.file_ext)

        # calculate amino acid usage
        amino_acid_usage = AminoAcidUsage(options.cpus)
        genome_aa_usage, aa_set = amino_acid_usage.run(gene_files)

        # write out results
        self._write_usage_profile(genome_aa_usage, 
                                    aa_set, 
                                    options.counts, 
                                    options.output_file)

        self.logger.info('Amino acid usage written to: %s' % options.output_file)