switchPlotTopSwitches: Creating the Isoform Switch Analysis Plot for the Top...

View source: R/plot_all_iso_switch.R

switchPlotTopSwitchesR 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 switch size (as controlled 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,
    onlySigIsoforms = FALSE,
    n=10,
    sortByQvals=TRUE,
    filterForConsequences = FALSE,
    pathToOutput = getwd(),
    splitComparison=TRUE,
    splitFunctionalConsequences = TRUE,
    IFcutoff=0.05,
    fileType = "pdf",
    additionalArguments=list(),
    quiet=FALSE
)

Arguments

switchAnalyzeRlist

A switchAnalyzeRlist containing all the annotation for the isoforms.

alpha

The cutoff which the FDR correct p-values must be smaller than for calling significant switches. Default 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%).

onlySigIsoforms

A logic indicating whether to only consider significant isoforms, meaning only analyzing genes where at least two isoforms which both have significant usage changes in opposite direction (quite strict). Naturally this only works if the isoform switch test used have isoform resolution (which the build in isoformSwitchTestDEXSeq has). If FALSE all isoforms with an absolute dIF value larger than dIFcutoff in a gene with significant switches (defined by alpha and dIFcutoff) are included in the pairwise comparison. Default is FALSE (non significant isoforms are also considered based on the logic that if one isoform changes it contribution - there must be an equivalent opposite change in usage in the other isoforms from that gene).

n

The number of top genes (after filtering and sorted according to sortByQvals) that should be generated in each sub-folder indicated by splitComparison and splitFunctionalConsequences. Use Inf to create all (NA will internally be converted to Inf for backward comparability). 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. Default 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 sub-folder for each comparison. If splitComparison is TRUE the sub-folders 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 sub-folder for those switches with predicted consequences and another sub-folder for those without. Requires that analyzeSwitchConsequences have been run. If splitComparison=TRUE the sub-folders from this argument will be created within the comparison sub-folders. 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 switching 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 significant 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


kvittingseerup/IsoformSwitchAnalyzeR documentation built on June 28, 2024, 5:41 p.m.