plotGenes: Plots the impulse fits and data

View source: R/srcImpulseDE2_plotGenes.R

plotGenesR Documentation

Plots the impulse fits and data

Description

Plots the impulse fits and data to pdf and return a list of gplots. Points are size factor normalised data. Consider using boolSimplePlot=TRUE if the plot seems to crowded.

Usage

plotGenes(vecGeneIDs = NULL, scaNTopIDs = NULL, objectImpulseDE2,
  boolCaseCtrl, dirOut = NULL,
  strFileName = "ImpulseDE2_Trajectories.pdf",
  boolMultiplePlotsPerPage = TRUE, boolSimplePlot = FALSE,
  vecRefPval = NULL, strNameRefMethod = NULL)

Arguments

vecGeneIDs

(string vector) [Default NULL] Gene names to be plotted. Must be in rownames of objectImpulseDE2@matCountDataProc. Supply either vecGeneIDs or scaNTopIDs.

scaNTopIDs

(int) [Default NULL] Number of top differentially expressed (by q-value) genes to be plotted Supply either vecGeneIDs or scaNTopIDs.

objectImpulseDE2

(ImpulseDE2 object) Object previously fitted to be used for plotting.

boolCaseCtrl

(bool) Whether to create case-ctrl plot.

dirOut

(dir) [Default NULL] Directory into which pdf is printed.

strFileName

(str) [Default 'ImpulseDE2_Trajectories.pdf'] File name of pdf with plots.

boolMultiplePlotsPerPage

(bool) [Default TRUE] Whether to create grid with multiple plots on each page of pdf.

boolSimplePlot

(bool) [Default TRUE] Whether to omit batch structure in plotting of model fits and only plot fit to first batch/all data (if no confounders were given). This strongly simplifies plots and is recommended e.g. for case-ctrl data.

vecRefPval

(vector length vecGeneIDs) [Default NULL] P/Q-values to be displayed alongside ImpulseDE2 q-value for differential expression in plot titles.

strNameRefMethod

(str) [Default NULL] Name of reference method used to generate vecRefPval. Mentioned in plot titles.

Value

lsgplotsID (gplot list length vecGeneIDs) List of gplots for IDs in vecGeneIDs. This is secondary output next to the .pdf and can be used to extract single plots or assemble plots differently.

Author(s)

David Sebastian Fischer

See Also

Called by separately by user.

Examples

lsSimulatedData <- simulateDataSetImpulseDE2(
vecTimePointsA   = rep(seq(1,8),3),
vecTimePointsB   = NULL,
vecBatchesA      = NULL,
vecBatchesB      = NULL,
scaNConst        = 0,
scaNImp          = 40,
scaNLin          = 20,
scaNSig          = 40)
objectImpulseDE2 <- runImpulseDE2(
matCountData    = lsSimulatedData$matObservedCounts, 
dfAnnotation    = lsSimulatedData$dfAnnotation,
boolCaseCtrl    = FALSE,
vecConfounders  = NULL,
boolIdentifyTransients = FALSE,
scaNProc        = 1 )
lsgplotsID <- plotGenes(
scaNTopIDs=5,
objectImpulseDE2=objectImpulseDE2,
boolCaseCtrl=FALSE,
boolMultiplePlotsPerPage=TRUE,
boolSimplePlot=FALSE)
lsgplotsID[[1]]


YosefLab/ImpulseDE2 documentation built on Sept. 17, 2022, 2:45 a.m.