rbh2kaks: rbh2kaks

View source: R/rbh2kaks.R

rbh2kaksR Documentation

rbh2kaks

Description

This function calculates Ka/Ks (dN/dS; accoring to Li (1993) or Yang and Nielson (2000) for each (conditional-)reciprocal best hit (CRBHit) pair. The names of the rbh columns must match the names of the corresponding cds1 and cds2 DNAStringSet vectors.

Usage

rbh2kaks(
  rbhpairs,
  cds1,
  cds2,
  model = "Li",
  plotHistPlot = FALSE,
  plotDotPlot = FALSE,
  dag = NULL,
  gene.position.cds1 = NULL,
  gene.position.cds2 = NULL,
  tandem.dups.cds1 = NULL,
  tandem.dups.cds2 = NULL,
  colorBy = "none",
  threads = 1,
  ...
)

Arguments

rbhpairs

(conditional-)reciprocal best hit (CRBHit) pair result (see cds2rbh) [mandatory]

cds1

cds1 sequences as DNAStringSet or url for first crbh pairs column [mandatory]

cds2

cds2 sequences as DNAStringSet or url for second crbh pairs column [mandatory]

model

specify codon model either "Li" or "NG86" or one of KaKs_Calculator2 model "NG", "LWL", "LPB", "MLWL", "MLPB", "GY", "YN", "MYN", "MS", "MA", "GNG", "GLWL", "GLPB", "GMLWL", "GMLPB", "GYN", "GMYN" [default: Li]

plotHistPlot

specify if histogram should be plotted [default: TRUE]

plotDotPlot

specify if dotplot should be plotted (mandatory to define gene.position.cds1 and gene.position.cds1) [default: FALSE]

dag

specify DAGchainer results as obtained via 'rbh2dagchainer()' [default: NULL]

gene.position.cds1

specify gene position for cds1 sequences (see cds2genepos) [default: NULL]

gene.position.cds2

specify gene position for cds2 sequences (see cds2genepos) [default: NULL]

tandem.dups.cds1

specify tandem duplicates for cds1 sequences (see tandemdups) [default: NULL]

tandem.dups.cds2

specify tandem duplicates for cds2 sequences (see tandemdups) [default: NULL]

colorBy

specify if Ka/Ks gene pairs should be colored by "rbh_class", dagchainer", "tandemdups" or "none" [default: none]

threads

number of parallel threads [default: 1]

...

other codon alignment parameters (see cds2codonaln) and other plot_kaks parameters (see plot_kaks)

Value

Ka/Ks values

Author(s)

Kristian K Ullrich

References

Li WH. (1993) Unbiased estimation of the rates of synonymous and nonsynonymous substitution. J. Mol. Evol., 36, 96-99.

Wang D, Zhang Y et al. (2010) KaKs_Calculator 2.0: a toolkit incorporating gamma-series methods and sliding window strategies. Genomics Proteomics Bioinformatics. 8(1), 77-80.

Yang Z and Nielson R. (2000) Estimating synonymous and nonsynonymous substitution rates under realistic evolutionary models. Mol. Biol. Evol., 17(1), 32-43.

See Also

dnastring2kaks, isoform2longest, cds2genepos, plot_kaks, rbh2dagchainer, tandemdups

Examples

## load example sequence data
data("ath", package="CRBHits")
data("aly", package="CRBHits")
## load example CRBHit pairs
data("ath_aly_crbh", package="CRBHits")
## only analyse subset of CRBHit pairs
ath_aly_crbh$crbh.pairs <- head(ath_aly_crbh$crbh.pairs)
ath_aly_crbh.kaks <- rbh2kaks(
    rbhpairs=ath_aly_crbh,
    cds1=ath,
    cds2=aly,
    model="Li")
head(ath_aly_crbh.kaks)
## plot kaks
g.kaks <- plot_kaks(ath_aly_crbh.kaks)

kullrich/CRBHits documentation built on March 29, 2024, 11:34 a.m.