View source: R/Dif_expression_plots.R
te.plot | R Documentation |
Create 2 TE plots of:
- Within sample (TE log2 vs mRNA fpkm) ("default")
- Between all combinations of samples
(x-axis: rna1fpkm - rna2fpkm, y-axis rfp1fpkm - rfp2fpkm)
te.plot(
df.rfp,
df.rna,
output.dir = QCfolder(df.rfp),
type = c("default", "between"),
filter.rfp = 1,
filter.rna = 1,
collapse = FALSE,
plot.title = "",
plot.ext = ".pdf",
width = 6,
height = "auto"
)
df.rfp |
a |
df.rna |
a |
output.dir |
directory to save plots, plots will be named "TE_between.pdf" and "TE_within.pdf" |
type |
which plots to make, default: c("default", "between"). Both plots. |
filter.rfp |
numeric, default 1. minimum fpkm value to be included in plots |
filter.rna |
numeric, default 1. minimum fpkm value to be included in plots |
collapse |
a logical/character (default FALSE), if TRUE all samples within the group SAMPLE will be collapsed to one. If "all", all groups will be merged into 1 column called merged_all. Collapse is defined as rowSum(elements_per_group) / ncol(elements_per_group) |
plot.title |
title for plots, usually name of experiment etc |
plot.ext |
character, default: ".pdf". Alternatives: ".png" or ".jpg". |
width |
numeric, default 6 (in inches) |
height |
numeric or character, default "auto", which is: 3 + (ncol(RFP_CDS_FPKM)-2). Else a numeric value of height (in inches) |
Ribo-seq and RNA-seq must have equal nrows, with matching samples. Only exception is if RNA-seq is 1 single sample. Then it will use that for each of the Ribo-seq samples. Same stages, conditions etc, with a unique pairing 1 to 1. If not you can run collapse = "all". It will then merge all and do combined of all RNA-seq vs all Ribo-seq
a data.table with TE values, fpkm and log fpkm values, library samples melted into rows with split variable called "variable".
##
# df.rfp <- read.experiment("zf_baz14_RFP")
# df.rna <- read.experiment("zf_baz14_RNA")
# te.plot(df.rfp, df.rna)
## Collapse replicates:
# te.plot(df.rfp, df.rna, collapse = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.