cds2codonaln: cds2codonaln

View source: R/cds2codonaln.R

cds2codonalnR Documentation

cds2codonaln

Description

This function takes two single sequence DNAString's or two single sequence DNAStringSet's, converts them into aa, calculates a global alignment and converts this alignment back into a codon alignment.

Usage

cds2codonaln(
  cds1,
  cds2,
  type = "global",
  substitutionMatrix = "BLOSUM62",
  gapOpening = 10,
  gapExtension = 0.5,
  remove.gaps = FALSE,
  ...
)

Arguments

cds1

single sequence DNAStringSet or DNAString [mandatory]

cds2

single sequence DNAStringSet or DNAString [mandatory]

type

type of alignment (see pairwiseAlignment) [default: global]

substitutionMatrix

substitution matrix representing the fixed substitution scores for an alignment (see pairwiseAlignment) [default: BLOSUM62]

gapOpening

the cost for opening a gap in the alignment (see pairwiseAlignment) [default: 10]

gapExtension

the incremental cost incurred along the length of the gap in the alignment (see pairwiseAlignment) [default: 0.5]

remove.gaps

specify if gaps in the codon alignment should be removed [default: FALSE]

...

other cds2aa parameters

Value

codon alignment as DNAStringSet

Author(s)

Kristian K Ullrich

References

Pagès, H et al. (2014) Biostrings: Efficient manipulation of biological strings. R package version, 2(0).

See Also

pairwiseAlignment

Examples

## define two cds sequences
cds1 <- Biostrings::DNAString("ATGCAACATTGC")
cds2 <- Biostrings::DNAString("ATGCATTGC")
cds2codonaln(cds1, cds2)

kullrich/MSA2dist documentation built on Nov. 14, 2024, 5:39 p.m.