extractTopSwitches {IsoformSwitchAnalyzeR} | R Documentation

## Extract Top Isoform Switches.

### Description

This function allows the user extract the (top) switching genes/isoforms (with functional consequences).

### Usage

    extractTopSwitches(
        switchAnalyzeRlist,
        filterForConsequences=FALSE,
        extractGenes=TRUE,
        alpha=0.05,
        dIFcutoff = 0.1,
        n=10,
        inEachComparison=FALSE,
        sortByQvals=TRUE
    )

### Arguments

`switchAnalyzeRlist` | A `switchAnalyzeRlist` object.
`extractGenes` | A logic indicating whether to extract the (top) switching isoforms (if FALSE) or top switching genes (if TRUE). Default is TRUE (extract genes).
`filterForConsequences` | A logical indicating whether to filter for genes with functional consequences. Requires that analyzeSwitchConsequences() have been run on the switchAnalyzeRlist. Default is FALSE.
`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%).
`n` | The number of switching features (genes/isoforms) to return. Use Inf to return all significant results (NA will internally be converted to Inf for backward comparability). Default is 10.
`inEachComparison` | A logic indicating whether to extract top n in each comparison (if TRUE) or from the all analysis (if FALSE). Default is FALSE.
`sortByQvals` | A logic indicating whether to the top `n` features are defined be smallest q-values (if `sortByQvals=TURE`) or the largest changes in isoform usage (absolute dIF) which are still significant (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. If set to NA no sorting is performed. Default is TRUE (sort by p-values).

### Value

A `data.frame` containing the top `n` switching genes or isoforms as controlled by the `extractGenes` argument, sorted by q-values or dIF values as controlled by the `sortByQvals` argument.

### Author(s)

Kristoffer Vitting-Seerup

### References

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

### See Also

`preFilter`
`isoformSwitchTestDEXSeq`
`isoformSwitchTestDRIMSeq`
`analyzeSwitchConsequences`

### Examples

    # Load example data and prefilter
    data("exampleSwitchList")
    exampleSwitchList <- preFilter(exampleSwitchList)

    # Perfom test
    exampleSwitchListAnalyzed <- isoformSwitchTestDEXSeq(exampleSwitchList)

    # extract summary of number of switching features
    extractSwitchSummary(exampleSwitchListAnalyzed)

    ### Filter for functional consequences (identified via analyzeSwitchConsequences() )
    data("exampleSwitchListAnalyzed")
    switchingIso <- extractTopSwitches(
        exampleSwitchListAnalyzed,
        filterForConsequences = TRUE,
    )
    dim(switchingIso)
    head(switchingIso,2)

[Package IsoformSwitchAnalyzeR version 1.14.1 Index]