getCAI {AnaCoDa}R Documentation

Calculate the Codon Adaptation Index

Description

getCAI returns the Codon Adaptation Index for a genome based on a provided reference.

Usage

getCAI(referenceGenome, testGenome, default.weight = 0.5)

Arguments

referenceGenome

A genome object initialized with initializeGenomeObject. Serves as reference set to calculate the necessary codon weights.

testGenome

A genome object initialized with initializeGenomeObject. The genome for which the CAI is supposed to be calculated

default.weight

Default weight to use if codon is missing from referenceGenome

Value

Returns a named vector with the CAI for each gene

Examples


genome_file1 <- system.file("extdata", "more_genes.fasta", package = "AnaCoDa")
genome_file2 <- system.file("extdata", "genome.fasta", package = "AnaCoDa")

## reading genome
referenceGenome <- initializeGenomeObject(file = genome_file1)
testGenome <- initializeGenomeObject(file = genome_file2)

cai <- getCAI(referenceGenome, testGenome)


[Package AnaCoDa version 0.1.4.4 Index]