CodonU.analyzer.cai_comp

Module Contents

Functions

calculate_cai(→ dict[str, float | dict[str, float]])

Calculates cai values for each codon

CodonU.analyzer.cai_comp.calculate_cai(handle: str, genetic_code_num: int, min_len_threshold: int = 200, gene_analysis: bool = False, save_file: bool = False, file_name: str = 'CAI_report', folder_path: str = 'Report') dict[str, float | dict[str, float]]

Calculates cai values for each codon

Parameters:
  • handle – Handle to the file, or the filename as a string

  • genetic_code_num – Genetic table number for codon table

  • min_len_threshold – Minimum length of nucleotide sequence to be considered as gene

  • gene_analysis – Option if gene analysis (True) or genome analysis (False) (optional)

  • save_file – Option for saving the values in xlsx format (Optional)

  • file_name – Intended file name (Optional)

  • folder_path – Folder path where image should be saved (optional)

Returns:

The dictionary containing codon and cai value pairs if gene_analysis is False, otherwise returns the

dictionary containing gene name and corresponding codon and cai value pairs