correlation.plots: Correlation plots between all samples

correlation.plotsR Documentation

Correlation plots between all samples

Description

Get correlation plot of raw counts and/or log2(count + 1) over selected region in: c("mrna", "leaders", "cds", "trailers")

Note on correlation: Pearson correlation, using pairwise observations to fill in NA values for the covariance matrix.

Usage

correlation.plots(
  df,
  output.dir,
  region = "mrna",
  type = "fpkm",
  height = 400,
  width = 400,
  size = 0.15,
  plot.ext = ".pdf",
  complex.correlation.plots = TRUE,
  data_for_pairs = countTable(df, region, type = type),
  as_gg_list = FALSE,
  text_size = 4,
  method = c("pearson", "spearman")[1]
)

Arguments

df

an ORFik experiment

output.dir

directory to save to, named : cor_plot, cor_plot_log2 and/or cor_plot_simple with either .pdf or .png

region

a character (default: mrna), make raw count matrices of whole mrnas or one of (leaders, cds, trailers)

type

which value to use, "fpkm", alternative "counts".

height

numeric, default 400 (in mm)

width

numeric, default 400 (in mm)

size

numeric, size of dots, default 0.15. Deprecated.

plot.ext

character, default: ".pdf". Alternatives: ".png" or ".jpg".

complex.correlation.plots

logical, default TRUE. Add in addition to simple correlation plot two computationally heavy dots + correlation plots. Useful for deeper analysis, but takes longer time to run, especially on low-quality gpu computers. Set to FALSE to skip these.

data_for_pairs

a data.table from ORFik::countTable of counts wanted. Default is fpkm of all mRNA counts over all libraries.

as_gg_list

logical, default FALSE. Return as a list of ggplot objects instead of as a grob. Gives you the ability to modify plots more directly.

text_size

size of correlation numbers

method

c("pearson", "spearman")[1]

Value

invisible(NULL) / if as_gg_list is TRUE, return a list of raw plots.


JokingHero/ORFik documentation built on April 23, 2024, 12:37 a.m.