GRN
objectplotDiagnosticPlots_peakGene.Rd
Plot diagnostic plots for peak-gene connections for a GRN
object
Object of class GRN
Character or NULL
. Default NULL
. If set to NULL
, the default output folder as specified when initiating the
object in initializeGRN
will be used. Otherwise, all output from this function will be put into the specified folder.
If a folder is provided, while we recommend specifying an absolute path, a relative one also works.
NULL
or character. Default NULL
. Basename of the output files that are produced. If set to NULL
, a default basename is chosen. If a custom basename is specified, all output files will have the chosen basename as file prefix, be careful with not overwriting already existing files (if forceRerun
is set to TRUE
)
List of character vectors. Default list(c("protein_coding", "lincRNA")). Vectors of gene types to consider for the diagnostic plots. Multiple distinct combinations of gene types can be specified. For example, if set to list(c("protein_coding", "lincRNA"), c("protein_coding"), c("all"))
, 3 distinct PDFs will be produced, one for each element of the list. The first file would only consider protein-coding and lincRNA genes, while the second plot only considers protein-coding ones. The special keyword "all" denotes all gene types found (usually, there are many gene types present, also more exotic and rare ones).
Logical. TRUE
or FALSE
. Default FALSE
. If set to FALSE
, the diagnostic plots will be produced based on all peak-gene connections. This is the default and will usually be best to judge whether the background behaves as expected. If set to TRUE
, the diagnostic plots will be produced based on the filtered set of connections. For this, the function filterGRNAndConnectGenes
must have been run before.
TRUE
or FALSE
. Default FALSE
. Print additional plots that may help for debugging and QC purposes? Note that these plots are currently less documented or not at all.
Logical. TRUE
or FALSE
. Default FALSE
. If set to FALSE
, the diagnostic plots will be done across all TF (the default), while setting it to TRUE
will generate the QC plots TF-specifically, including "all" TF, sorted by the number of connections.
TRUE
or FALSE
. Default TRUE
.Should the plots be printed to a PDF file? If set to TRUE
, a PDF file is generated, the name of which depends on the value of basenameOutput
. If set to FALSE
, all plots are printed to the currently active device. Note that most functions print more than one plot, which means you may only see the last plot depending on your active graphics device.
Number>0. Default 12. Width of the PDF, in cm.
Number >0. Default 12. Height of the PDF, in cm.
Integer vector or NULL
. Default NULL
. Page number(s) to plot. Can be used to plot only specific pages to a PDF or the currently active graphics device.
TRUE
or FALSE
. Default FALSE
. Force execution, even if the GRN object already contains the result. Overwrites the old results.
An updated GRN
object.
# See the Workflow vignette on the GRaNIE website for examples
GRN = loadExampleObject()
#> Downloading GRaNIE example object from https://git.embl.de/grp-zaugg/GRaNIE/-/raw/master/data/GRN.rds
#> INFO [2023-08-16 17:29:27] Storing GRN@data$RNA$counts matrix as sparse matrix because fraction of 0s is > 0.1 (0.44)
#> Finished successfully. You may explore the example object. Start by typing the object name to the console to see a summaty. Happy GRaNIE'ing!
types = list(c("protein_coding"))
GRN = plotDiagnosticPlots_peakGene(GRN, gene.types=types, plotAsPDF = FALSE, pages = 1)
#> INFO [2023-08-16 17:29:27] Plotting diagnostic plots for peak-gene correlations
#> INFO [2023-08-16 17:29:27] Gene type protein_coding
#> INFO [2023-08-16 17:29:29] Finished successfully. Execution time: 2 secs
#> INFO [2023-08-16 17:29:29] Finished successfully. Execution time: 2 secs