u12DensityPlot {IntEREst} | R Documentation

## Density plot of fld changes of intron retention and exon-exon junction levels

### Description

Density plot of fold change of the retention levels of U12- vs U2- type intron, or exon-exon junction levels of the flanking exons. For the density plot of the foldchange of intron retention levels the `u12DensityPlotIntron()` function or `u12DensityPlot()` function with `intronExon= "intron"` can be used. For density plot of the foldchange of exon-exon junction levels use `u12DensityPlot()` function with `intronExon= "exon"`.

### Usage

    u12DensityPlot(x,
    	type=c("U12", "U2Up", "U2Dn", "U2UpDn", "U2Rand"),
    	fcType="edgeR", sampleAnnotation=c(),  sampleAnnoCol=c(),
    	group=c(), intExCol="int_ex", intTypeCol="int_type", intronExon,
    	strandCol="strand", geneIdCol="collapsed_transcripts",
    	naUnstrand=FALSE, col=1, lty=1, lwd=1, plotLegend=TRUE,
    	cexLegend=1, xLegend="topright", yLegend=NULL, legend=c(),
    	randomSeed=NULL, xlab="", ...)

    u12DensityPlotIntron(x,
    	type= c("U12", "U2Up", "U2Dn", "U2UpDn", "U2Rand"),
    	fcType= "edgeR", sampleAnnotation=c(),  sampleAnnoCol=c(),
    	group=c(), intExCol="int_ex", intTypeCol="int_type",
    	strandCol= "strand", geneIdCol= "collapsed_transcripts",
    	naUnstrand=FALSE, col=1, lty=1, lwd=1, plotLegend=TRUE,
    	cexLegend=1, xLegend="topright", yLegend=NULL, legend=c(),
    	randomSeed=NULL, xlab="", ...)

### Arguments

`x` | Object of type `SummarizedExperiment`.
`type` | A vector that includes the type of introns to plot. Available options are U12 introns "U12", U2 introns at downstream of U12 introns "U2Dn", U2 introns at upstream of U12 introns "U2Up", U2 introns at upstream or downstream of U12 introns suitable for when the coorduinates in object x are unstranded (their strand is "*") "U2UpDn", random U2 introns from object x "U2Rand". Settings "U2Up", "U2Dn" and "U2UpDn" are useful only if the refernce is linearly ordered. References with exons only resulted by `referencePrepare` and `unionRefTr` are NOT necessarily linearly ordered.
`fcType` | Available as "fpkm" or "edgeR" (as default) corresponding to either log fold change of fpkm values or degeR normalized log fold change values.
`sampleAnnoCol` | Which colummn of `colData` of `x` to consider for plotting.
`sampleAnnotation` | A vector of size 2 which cotains values from `colData` of `SummarizedExperiment` object; e.g. if `getAnnotation(x)[, sampleAnnoCol]= c("test", "test", "ctrl","ctrl", ...)` , and the goal is to compare "test" and "ctrl" samples, `sampleAnnotation` should either be `c("test", "ctrl")` or `c("ctrl", "test")`.
`group` | Vector to manually define the sample groups (or annotations). It is ignored if `sampleAnnoCol` is defined.
`intExCol` | Column name (or number) that represents whether each row of `x` assays is "intron" or "exon".
`intTypeCol` | Column name (or number) that represents what type of intron each row of `x` assays represents.
`intronExon` | Whether plot intron retention (set `intronExon="intron"`) or exon-exon junction (set `intronExon="exon"`) levels.
`strandCol` | Column name (or number) that represents the strand of each row of assays in `x`. The values in the column are either "+", "-" or "*".
`geneIdCol` | Column name (or number) that represents the gene ID of each row of assays in `x`.
`naUnstrand` | Replace unstranded results, i.e. introns or exon with "*" strand, with NA (to be excluded).
`col` | A vector with the size of 1 or the same size as the `type` parameter which includes the colour/colours of the plotted density lines (default=1).
`lty` | A vector with the size of 1 or the same size as the `type` parameter which includes the type of the plotted density lines (default=1).
`lwd` | A vector with the size of 1 or the same size as the `type` parameter which includes the width of the plotted density lines (default=1).
`plotLegend` | Whether show legend (TRUE by default).
`cexLegend` | Size of the text in legend .
`xLegend, yLegend` | Position of legend in the plot. For more info see `x` and `y` parameters in `legend`.
`legend` | The replacement texts to be used in legend.
`randomSeed` | Seed value for random number generator.
`xlab` | The lable of the X axis of the plot; by default it is "".
`...` | Other parameter settings from the `plot` function.

### Value

Returns NULL.

### Author(s)

Ali Oghabian

### See Also

`exactTestInterest`, `lfc`

### Examples

    u12DensityPlotIntron(mdsChr22Obj,
        type= c("U12", "U2Up", "U2Dn", "U2UpDn", "U2Rand"),
        fcType= "edgeR", sampleAnnoCol="test_ctrl",
        sampleAnnotation=c("ctrl","test"), intExCol="int_ex",
        intTypeCol="intron_type", strandCol= "strand",
        geneIdCol= "collapsed_transcripts_id", naUnstrand=FALSE, col=c(2,3,4,5,6),
        lty=c(1,2,3,4,5), lwd=1, plotLegend=TRUE, cexLegend=0.7,
        xLegend="topright", yLegend=NULL, legend=c(), randomSeed=10,
        ylim=c(0,0.6), xlab=expression("log"[2]*" fold change FPKM"))

[Package IntEREst version 1.4.1 Index]