For a DESeq2 analysis, the function which retrieves the variance stabililizing transformation via the vst() of deseq2. For a limma analysis, the function will calculate the PCs using plotMDS

If no DE_type is 'all', the function will plot the PCA for the normalized data.

It then plots a labelled PCA plot in png format

plot_PCA_TS(
  time_object,
  exp_name = NULL,
  DE_type = NULL,
  show_names = TRUE,
  return_plot = TRUE,
  pcsToUse = 1:2
)

Arguments

time_object

A timeseries object

exp_name

The name of the experiment for which the PCA is plotted

DE_type

Either conditional or temporal for the type of differential experiment being plotted

show_names

boolean indicating if sample names should be put on the pca or not

return_plot

boolean indicating if the plot should be returned. If FALSE, it will return the vst and pca_data instead.

pcsToUse

vector of two integers indicating which PCs to plot. The first value will be the xaxis while the second will be the yaxis.

Value

the pca_plot

Examples

TS_object<-create_example_object_for_R()
TS_object <- normalize_timeSeries_with_deseq2(time_object=TS_object)
#> converting counts to integer mode
#Perform conditional differential gene expression analysis
TS_object<-conditional_DE_wrapper(TS_object,vignette_run=TRUE)
TS_object<-temporal_DE_wrapper(TS_object,do_all_combinations=FALSE,vignette_run=TRUE)
TS_pca<-plot_PCA_TS(TS_object,DE_type='all')
#> using ntop=500 top features by variance