Learn R Programming

cubar (version 1.1.0)

slide_codon: sliding window of codons

Description

slide_codon generates a data.table with start, center, and end columns for a sliding window analysis of codons.

Usage

slide_codon(seq, step = 1, before = 0, after = 0)

Value

data.table with start, center, and end columns

Arguments

seq

DNAString, the sequence

step

integer, the step size

before

integer, the number of codons before the center of a window

after

integer, the number of codons after the center of a window

Examples

Run this code
x <- Biostrings::DNAString('ATCTACATAGCTACGTAGCTCGATGCTAGCATGCATCGTACGATCGTCGATCGTAG')
slide_codon(x, step = 3, before = 1, after = 1)

Run the code above in your browser using DataLab