split_codons: Split RNA sequence into codons

View source: R/split_codons.R

split_codonsR Documentation

Split RNA sequence into codons

Description

Split RNA sequence into codons

Usage

split_codons(rna_string, start = 1)

Arguments

rna_string

A character object with a RNA sequence.

start

An integer specifying the position in the RNA sequence where the reading frame starts.

Value

An atomic character vector with a sequence of codons corresponding to the specified reading frame of the RNA sequence.

Examples

rna_string <- "ATCGTACGATATGATACAGAGATAGACATATTTAACGG"

split_codons(rna_string)
# "ATC" "GTA" "CGA" "TAT" "GAT" "ACA" "GAG" "ATA" "GAC" "ATA" "TTT" "AAC"

split_codons(rna_string, start = 5)
# "TAC" "GAT" "ATG" "ATA" "CAG" "AGA" "TAG" "ACA" "TAT" "TTA" "ACG"

rforbiodatascience22/group_10_package documentation built on April 5, 2022, 7:51 p.m.