slide_codon: sliding window of codons

View source: R/window.R

slide_codonR Documentation

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)

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

Value

data.table with start, center, and end columns

Examples

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


cubar documentation built on April 3, 2025, 8:58 p.m.