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,
        gene = NULL,
        isoform_id = NULL,
        condition1,
        condition2,
        IFcutoff = 0.05,
        dIFcutoff = 0.1,
        alphas = c(0.05, 0.001),
        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 induced (e.g. if protein domains should be visualized they should be annotated 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.05 (which removes isoforms with minor contribution).
`dIFcutoff` | The dIF cutoff used to add usage to the transcript plot. Default is 0.1.
`alphas` | A numeric vector of length two giving the significance levels represented in plots. The numbers indicate the q-value cutoff for significant (*) and highly significant (***) respectively. Default 0.05 and 0.001 which should be interpret as q<0.05 and q<0.001 respectively). If q-values are higher than this they will be annotated as 'ns' (not significant).
`rescaleTranscripts` | A Logical indicating whether all the isoforms should be resealed to the square root 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 useful 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 (recommended). 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 sub-function.

### 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`. The 'Increased/decreased/unchanged usage is determined by the `dIFcutoff` and `alphas` arguments (since we require it to be both significant (< min(alphas)) and changing (abs(dIF) > dIFcutoff) before being annotated as changing.

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>.

The switchPlot contains regions "Not Annotated" if regions were not analyzed due to the limitations on EBI's website (else EBI will not accept the files). Specifically this is controlled with the "filterAALength" argument of extractSequence.

### 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

`isoformSwitchTestDEXSeq`
`isoformSwitchTestDRIMSeq`
`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.9.1 Index]