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 TURE) or top swiching genes (if FALSE). Default is TRUE (extract isoforms).
`filterForConsequences` | A logical indicating whether to filter for genes with functional consequences. Requtires that analyzeSwitchConsequences() have been run on the switchAnalyzeRlist. Default is FALSE.
`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 switching features (genes/isoforms) to return. Use NA to return all significant results. 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 perfomed. 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).

- Ferguson JP, Palejev D: P-value calibration fro multiple testing problems in genomics. Stat. Appl. Genet. Mol. Biol. 2014, 13:659-673.

### See Also

`preFilter`
`isoformSwitchTest`
`analyzeSwitchConsequences`

### Examples

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

    # Perfom test
    exampleSwitchListAnalyzed <- isoformSwitchTest(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.2.0 Index]