ribo_fft_plot: Get periodogram plot per read length

View source: R/shift_footprints_helpers.R

ribo_fft_plotR Documentation

Get periodogram plot per read length

Description

Get periodogram plot per read length

Usage

ribo_fft_plot(fft_dt, period_window = c(0, 6))

Arguments

fft_dt

a data.table with read_length, amplitude and periods

period_window

x axis limits, default c(0,6)

Value

a ggplot, geom_line plot facet by read length.

Examples

## Note, this sample data is not intended to be strongly periodic.
## Real data should have a cleaner peak for x = 3 (periodicity)
# Load sample data
df <- ORFik.template.experiment()
# Load annotation
cds <- loadRegion(df, "cds", names.keep = filterTranscripts(df))
# Select a riboseq library
df <- df[df$libtype == "RFP", ]
footprints <- fimport(filepath(df[1,], "default"))
fft_dt <-ribo_fft(footprints, cds)
ribo_fft_plot(fft_dt)

Roleren/ORFik documentation built on April 25, 2024, 8:41 p.m.