multiOmicsPlot_animate: Multi-omics animation using list input

View source: R/browser_default.R

multiOmicsPlot_animateR Documentation

Multi-omics animation using list input

Description

The animation will move with a play butten, there is 1 transition per library given.

Usage

multiOmicsPlot_animate(
  display_range,
  annotation = display_range,
  reference_sequence,
  reads,
  viewMode = c("tx", "genomic")[1],
  custom_regions = NULL,
  leader_extension = 0,
  trailer_extension = 0,
  withFrames = NULL,
  frames_type = "lines",
  colors = NULL,
  kmers = NULL,
  kmers_type = c("mean", "sum")[1],
  ylabels = NULL,
  lib_to_annotation_proportions = c(0.8, 0.2),
  lib_proportions = NULL,
  annotation_proportions = NULL,
  width = NULL,
  height = NULL,
  plot_name = "default",
  plot_title = NULL,
  display_sequence = c("both", "nt", "aa", "none")[1],
  seq_render_dist = 100,
  aa_letter_code = c("one_letter", "three_letters")[1],
  annotation_names = NULL,
  start_codons = "ATG",
  stop_codons = c("TAA", "TAG", "TGA"),
  custom_motif = NULL,
  log_scale = FALSE,
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

display_range

the whole region to visualize, a GRangesList or GRanges object

annotation

the whole annotation which your target region is a subset, a GRangesList or GRanges object

reference_sequence

the genome reference, a FaFile or FaFile convertible object

reads

the NGS libraries, as a list of GRanges with or without score column for replicates.

viewMode

character, default "tx" (transcript coordinates, first position is 1, exons are merged into a single sequence)
Alternative: "genomic" (genomic coordinates, first position is first position in display_range argument. Introns are displayed).

custom_regions

a GRangesList or NULL, default: NULL. The alternative annotation, like self defined uORFs etc. The vertical annotation bars will have a different color.

leader_extension

integer, default 0. (How much to extend view upstream)

trailer_extension

integer, default 0. (How much to extend view downstream)

withFrames

a logical vector, default NULL. Alternative: a length 1 or same length as list length of "reads" argument.

frames_type

character, default "lines". Alternative:
- columns
- stacks
- area

colors

character, default NULL (automatic colouring). If "withFrames" argument is TRUE, colors are set to to c("red", "green", "blue") for the 3 frames. Alternative: Character vector of length 1 or length of "reads" list argument.

kmers

numeric (integer), bin positions into kmers.

kmers_type

character, function used for kmers sliding window. default: "mean", alternative: "sum"

ylabels

character, default NULL. Name of libraries in "reads" list arugment.

lib_to_annotation_proportions

numeric vector of length 2. relative sizes of profiles and annotation.

lib_proportions

numeric vector of length equal to displayed libs. Relative sizes of profiles displayed

annotation_proportions

numeric vector of length 3 (seq displayed), or 2 (seq not displayed). Relative sizes of annotation tracks.

width

numeric, default NULL. Width of plot.

height

numeric, default NULL. Height of plot.

plot_name

= character, default "default" (will create name from display_range name). Alternative: custom name for region.

plot_title

character, default NULL. A title for plot.

display_sequence

character/logical, default c("both","nt", "aa", "none")[1]. If TRUE or "both", display nucleotide and aa sequence in plot.

seq_render_dist

integer, default 100. The sequences will appear after zooming below this threshold.

aa_letter_code

character, when set to "three_letters", three letter amino acid code is used. One letter by default.

annotation_names

character, default NULL. Alternative naming for annotation.

start_codons

character vector, default "ATG"

stop_codons

character vector, default c("TAA", "TAG", "TGA")

custom_motif

character vector, default NULL.

log_scale

logical, default FALSE. Log2 scale the count values, for easier visualization of shapes.

BPPARAM

how many cores/threads to use? default: BiocParallel::SerialParam(). To see number of threads used for multicores, do BiocParallel::bpparam()$workers. You can also add a time remaining bar, for a more detailed pipeline.

Value

the plot object

Examples

library(RiboCrypt)
df <- ORFik.template.experiment()[9:10,]
cds <- loadRegion(df, "cds")
mrna <- loadRegion(df, "mrna")
# multiOmicsPlot_animate(mrna[1], annotation = cds[1], reference_sequence = findFa(df),
#                     frames_type = "columns", leader_extension = 30, trailer_extension = 30,
#                     reads = outputLibs(df, type = "pshifted", output.mode = "envirlist",
#                                   naming = "full", BPPARAM = BiocParallel::SerialParam()))

Miswi/RiboCrypt documentation built on April 16, 2024, 10:47 a.m.