switchPlot {IsoformSwitchAnalyzeR} | R Documentation

## Isoform Switch Analysis Plot

### Description

This function enables a full analysis of a specific gene containing an isoform switch (with functional consequences) by creating a composite plot visualizing 1) The isoform structure along with the concatenated annotations (including transcript classification, ORF, Coding Potential, NMD sensitivity, annotated protein domains as well as annotated signal peptides) 2) gene and isoform expression and 3) isoform usage - including the result of the isoform switch test.

### Usage

    switchPlot(
        switchAnalyzeRlist = NULL,
        gene = NULL,
        isoform_id = NULL,
        condition1,
        condition2,
        IFcutoff=0,
        rescaleTranscripts = TRUE,
        reverseMinus = TRUE,
        addErrorbars = TRUE,
        logYaxis=FALSE,
        localTheme = theme_bw(base_size = 8),
        additionalArguments = list()
    )

### Arguments

`switchAnalyzeRlist` | A `switchAnalyzeRlist` object containing all the analysis to be incuded (e.g. if protein domains should be visualized they should be annotaed in the `switchAnalyzeRlist` object (via analyzePFAM))
`gene` | Either the gene_id or the gene name of the gene to plot, alternatively one can use the `isoform_id` argument to supply a vector of isoform_ids.
`isoform_id` | Vector of id indicating which isoforms (from the same gene) to plot, alternatively one can use the `gene_id` argument to plot all isoforms of a gene.
`condition1` | First condition of the comparison to analyze. Must match 'condition_1' in the 'isoformFeatures' entry of the `switchAnalyzeRlist`. Only needed if more than one comparison is analyzed.
`condition2` | Second condition of the comparison to analyze. Must match 'condition_2' in the 'isoformFeatures' entry of the `switchAnalyzeRlist`. Only needed if more than one comparison is analyzed.
`IFcutoff` | The cutoff used for the minimum contribution to gene expression (in at least one condition) for an isoforms must have to be plotted (measured as Isoform Fraction (IF) values). Default is 0 (which removes non-expressed isoforms).
`rescaleTranscripts` | A Logical indicating whether all the isoforms should be rescaled to the squareroot of their original sizes. This feature is implemented because introns usually are much larger than exons making it difficult to see structural changes. This is very usefull for structural visualization but the scaling might distort actual intron and exon sizes. Default is TRUE.
`reverseMinus` | A logic indicating whether isoforms on minus strand should be inverted so they are visualized as going from left to right instead of right to left. (Only affects minus strand isoforms). Default is TRUE
`addErrorbars` | A logic indicating whether error bars should be added to the expression plots to show uncertainty in estimates (recomended). By default the error-bars indicate 95% confidence intervals, see ?switchPlotGeneExp for more information and additional options (that can be passed via `additionalArguments`. Default is TRUE.
`logYaxis` | A logical indicating whether the y-axis of gene and isoform expression sub-plots should be log10 transformed. Default is FALSE.
`localTheme` | General ggplo2 theme with which the plot is made, see `?ggplot2::theme` for more info. Default is theme_bw().
`additionalArguments` | A named list arguments passed to the functions `switchPlotTranscript`, `switchPlotGeneExp`, `switchPlotIsoExp`, and `switchPlotIsoUsage` which each creates a subset of the Isoform Switch Analysis Plot. This enable further customization of the plots. The name of the list entries must correspond to the corresponding argument in the subfunction.

### Details

The isoform switch analysis plot is a plot contains all the information necessary to judge the importance of a gene with isoform switching, and contains information about from expression levels, switch size as well as the annotation of the isoform differences.

The gene expression, isoform expression and isoform usage plots are generated by `switchPlotGeneExp`, `switchPlotIsoExp` and `switchPlotIsoUsage` respectively. The plot of the transcript structure along with all the annotation is done with `switchPlotTranscript`.

Changes in isoform usage are measure as the difference in isoform fraction (dIF) values, where isoform fraction (IF) values are calculated as <isoform_exp> / <gene_exp>.

### Value

A isoform switch analysis plot

### Author(s)

Kristoffer Vitting-Seerup

### References

Vitting-Seerup et al. The Landscape of Isoform Switches in Human Cancers. Mol. Cancer Res. (2017).

### See Also

`isoformSwitchTest`
`switchPlotTranscript`
`switchPlotGeneExp`
`switchPlotIsoExp`
`switchPlotIsoUsage`
`switchPlotTopSwitches`

### Examples

    ### Prepare for plotting
    data("exampleSwitchListAnalyzed")

    mostSwitchingGene <- extractTopSwitches(
        exampleSwitchListAnalyzed,
        filterForConsequences = TRUE,
        n = 1
    )

    ### Make isoform Switch Analysis Plot
    switchPlot(
        switchAnalyzeRlist = exampleSwitchListAnalyzed,
        gene = mostSwitchingGene$gene_id,
        condition1 = mostSwitchingGene$condition_1,
        condition2 = mostSwitchingGene$condition_2
    )

[Package IsoformSwitchAnalyzeR version 1.2.0 Index]