switchPlotTopSwitches {IsoformSwitchAnalyzeR} | R Documentation

## Creating the Isoform Switch Analysis Plot for the Top Switches

### Description

This function outputs the top n (defined by `n`) Isoform Switch Analysis Plot (see switchPlot) for genes with significant isoform switches (as defined by `alpha` and `dIFcutoff`) to a specific folder (controlled by `pathToOutput`. The plots are automatically sorted by decreasing significance or switche size (as controled by `sortByQvals`). The plots can furthermore be created in sub-folders based both which conditions are compared and whether any consequences of the switch have been predicted. In summary it facilitates an easy and prioritized, (but comprehensive), manual analysis of isoform switches.

### Usage

    switchPlotTopSwitches(
        switchAnalyzeRlist,
        alpha = 0.05,
        dIFcutoff = 0.1,
        n=10,
        sortByQvals=TRUE,
        filterForConsequences = FALSE,
        pathToOutput = getwd(),
        splitComparison=TRUE,
        splitFunctionalConsequences = TRUE,
        IFcutoff=0,
        fileType = "pdf",
        additionalArguments=list(),
        quiet=FALSE
    )

### Arguments

`switchAnalyzeRlist` | A `switchAnalyzeRlist` containing all the annotation for the isoforms.
`alpha` | The cutoff which the (callibrated) fdr correct p-values must be smaller than for calling significant switches. Defualit is 0.05.
`dIFcutoff` | The cutoff which the changes in (absolute) isoform usage must be larger than before an isoform is considered switching. This cutoff can remove cases where isoforms with (very) low dIF values are deemed significant and thereby included in the downstream analysis. This cutoff is analogous to having a cutoff on log2 fold change in a normal differential expression analysis of genes to ensure the genes have a certain effect size. Default is 0.1 (10%).
`n` | The number of top genes (after filtering and sorted according to `sortByQvals`) that should be generated in each subfolder indicated by `splitComparison, splitFunctionalConsequences`. Use NA to create all. Default is 10.
`sortByQvals` | A logic indicating whether to the top `n` features are sorted by decreasing significance (increasing q-values) (if `sortByQvals=TURE`) or decreasing switch size (absolute dIF, which are still significant as defined by `alpha`) (if `sortByQvals=FALSE`). The dIF values for genes are considered as the total change within the gene calculated as `sum(abs(dIF))` for each gene. Default is TRUE (sort by p-values).
`filterForConsequences` | A logic indicating whether to only plot gene with predicted consequences of the isoform switch. Requires that predicted consequences have been annotated (via analyzeSwitchConsequences. Defalut is FALSE.
`pathToOutput` | A path to the folder in which the plots should be made. Default is working directory ( getwd() ).
`splitComparison` | A logic indicating whether to create a subfolder for each comparison. If splitComparison is TRUE the subfolders will be created else all isoform switch analyzer plots will saved in the same folder. Default is TRUE.
`splitFunctionalConsequences` | A logic indicating whether to create a subfolder for those switches with predicted consequences and another subfolder for those without. Requires that analyzeSwitchConsequences have been run. If `splitComparison=TRUE` the subfolders from this argument will be created within the comparison subfolders. Default is TRUE.
`IFcutoff` | The cutoff used for the minimum contribution to gene expression (in at least one condition) an isoforms must have to be plotted (measured as Isoform Fraction (IF) values). Default is 0 (which removes isoforms not contributing in any of the conditions).
`fileType` | A string indicating which file type is generated. Available are options are \'pdf\' and \'png\'. Default is pdf.
`additionalArguments` | A named list arguments passed to the `switchPlot` function which creates the individual Isoform Switch Analysis Plots. The name of the list entries must correspond to the corresponding argument in the `switchPlot` function.
`quiet` | A logic indicating whether to avoid printing progress messages. Default is FALSE

### Details

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

For a list of the top swiching genes see ?extractTopSwitches.

### Value

An Isoform Switch Analysis Plot (as produce by `switchPlot`) for each of the top n switches in each comparison where a gene have a signicant isoform switch is generated in the folder supplied by `pathToOutput`

### Author(s)

Kristoffer Vitting-Seerup

### References

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

### See Also

`switchPlot`
`analyzeSwitchConsequences`

[Package IsoformSwitchAnalyzeR version 1.2.0 Index]