KaKsStatistics: Uses KaKs_Calculator for selected pairs of aligned coding...

View source: R/selection_funks.R

KaKsStatisticsR Documentation

Uses KaKs_Calculator for selected pairs of aligned coding sequences to infer Ka and Ks values among other measures. The pairs that are selected are individuated by GeneFamilies::axtForSelectedDistances.

Description

Uses KaKs_Calculator for selected pairs of aligned coding sequences to infer Ka and Ks values among other measures. The pairs that are selected are individuated by GeneFamilies::axtForSelectedDistances.

Usage

KaKsStatistics(cds.msa, gene.group.name, background.genes = NULL,
  w.dir = tempdir(),
  ka.ks.calculator.path = getOption("GeneFamilies.ka.ks.calculator.path",
  file.path(path.package("GeneFamilies"), "KaKs_Calculator")),
  ka.ks.calculator.model = getOption("GeneFamilies.ka.ks.calculator.model",
  "GY"), ...)

Arguments

cds.msa

The result of invoking seqinr::read.alignment representing the multiple alignment of coding sequences.

gene.group.name

A string representing the name of the gene group for which the argument cds.msa was generated.

background.genes

A character vector or NULL specifying a subset of the genes in argument cds.msa. If such a background is specified sequence based distances are only considered for pairs of genes where one member is taken from the background and the other from the non-background (foreground) subsets. Default is NULL.

w.dir

The directory in which to store input and output files with which the KaKs_Calculator is invoked. Default is tempdir().

ka.ks.calculator.path

The file path under which to find the KaKs_Calculator executable. Default is getOption('GeneFamilies.ka.ks.calculator.path', file.path(path.package('GeneFamilies'), 'KaKs_Calculator')).

ka.ks.calculator.model

A string used as a command line argument for the -m switch of KaKs_Calculator. This argument defines the evolution model to be used. Default is getOption('GeneFamilies.ka.ks.calculator.model', 'GY').

...

additional arguments passed to base::read.table used to read in the table written out by KaKs_Calculator.

Value

An instance of base::data.frame the read in tabular result of invoking KaKs_Calculator using the system function. There is a strange behavior of KaKs_Calculator, sometimes it write out a header line to its result table, when e.g. using model GY, and sometimes it does not, when using the newer models like GMYN. The result read in here is assuming NO header line. To get your desired results look for the appropriate row-name in the first column. To pass argument header = TRUE to base::read.table use the ... argument.


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.