get_length_distribution {ribor} | R Documentation |
The function get_length_distribution
retrieves the raw or normalized
counts at each read length from 'range.lower' to 'range.upper'.
get_length_distribution( ribo.object, region, range.lower = length_min(ribo.object), range.upper = length_max(ribo.object), compact = TRUE, experiment = experiments(ribo.object) )
ribo.object |
A 'Ribo' object |
region |
Specific region of interest |
range.lower |
Lower bound of the read length, inclusive |
range.upper |
Upper bound of the read length, inclusive |
compact |
Option to return a DataFrame with Rle and factor as opposed to a raw data.frame |
experiment |
List of experiment names |
This function is a wrapper function of get_region_counts
, and the
returned DataFrame is valid input for plot_length_distribution
.
An annotated DataFrame or data.frame (if the compact parameter is set to FALSE) of the read-length specific region count information for a single region specified in the 'region' parameter. The returned data frame will have a length column, and it will not contain a transcript column.
plot_length_distribution
to plot the output of this function
#generate the ribo object file.path <- system.file("extdata", "sample.ribo", package = "ribor") sample <- Ribo(file.path) #specify the experiments of interest experiments <- c("Hela_1", "Hela_2", "WT_1") #gets the normalized length distribution from read length 2 to 5 length.dist <- get_length_distribution(ribo.object = sample, region = "CDS", range.lower = 2, range.upper = 5)