Description Usage Arguments Details Value See Also Examples
View source: R/diff_exp_plots.R
Generate an MA plot for differential TSSs or TSRs.
1 2 3 4 5 6 7 8 9 |
experiment |
TSRexploreR object. |
data_type |
Whether to plot differential TSSs ('tss') or TSRs ('tsr'). |
de_comparisons |
Character vector of differential expression comparisons to plot. |
ncol |
Integer specifying the number of columns to arrange multiple plots. |
log2fc_cutoff |
Differential features not meeting this |log2(fold change)| threshold will not be considered. |
fdr_cutoff |
Differential features not meeting this significance threshold will not be considered. |
... |
Arguments passed to geom_point. |
This function generates an MA plot of the results from differential analysis of TSSs or TSRs.
'de_comparisons' are the names given to the comparisons from the 'comparison_name' argument of the 'differential_expression' function. 'log2fc_cutoff' and 'fdr_cutoff' are the log2(fold change) and FDR cutoffs used for coloring of features as significantly altered in the plot.
ggplot2 object of MA plot.
fit_de_model
to fit a differential expression model.
differential_expression
to find differential TSSs or TSRs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(TSSs)
sample_sheet <- data.frame(
sample_name=c(
sprintf("S288C_D_%s", seq_len(3)),
sprintf("S288C_WT_%s", seq_len(3))
),
file_1=rep(NA, 6), file_2=rep(NA, 6),
condition=c(rep("Diamide", 3), rep("Untreated", 3))
)
exp <- TSSs %>%
tsr_explorer(sample_sheet=sample_sheet) %>%
format_counts(data_type="tss")
diff_tss <- exp %>%
fit_de_model(data_type="tss", formula= ~condition, method="edgeR") %>%
differential_expression(
data_type="tss",
comparison_name="Diamide_vs_Untreated",
comparison_type="coef",
comparison=2)
p <- plot_ma(diff_tss, data_type="tss")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.