get_codons {MixviR}R Documentation

Get Codons From Gene Sequence

Description

Group a gene sequence into codons (triplets) that can be used for subsequent translation. If any elements of the character vector have length >1 (insertions in ALT column of VCF), they are trimmed to the first base. Used by id.snps, id.indels, and create_ref functions.

Usage

get_codons(gene.seq, rev = FALSE)

Arguments

gene.seq

Character vector containing gene sequence. The length of this vector should be equal to the length of sequence.

rev

Logical indicating whether the reverse complement of the gene.seq should be used.

Value

A character vector containing translated amino acids associated with each nucleotide position in the input vector.

Examples

get_codons(gene.seq = c("A","U","G","C","A","T","T","T","A","C","A","G","T","A","A"))

[Package MixviR version 3.5.0 Index]