MIGSAres-plots {MIGSA} | R Documentation

## MIGSAres plots

### Description

`genesHeatmap` plots a heatmap with the number of experiments in which each gene contributed to enrich each gene set. `genesBarplot` generates a barplot of the number of gene sets in which each gene contributed to enrich. Each gene set counts 1 regardless if it was enriched in many experiments. x-axis each gene, y-axis number of gene sets in which it contributed to enrich. `migsaHeatmap` plots the enrichment heatmap of the MIGSAres object. `geneSetBarplot` generates a barplot of the number of experiments in which each gene set was enriched. x-axis each gene set, y-axis times it was enriched (0 to #experiments).

### Usage

    "MIGSAres-plots"(migsaRes)

    genesHeatmap(migsaRes, ...)

    ## S4 method for signature 'MIGSAres'
    genesHeatmap(migsaRes, enrFilter = 0, gsFilter = 0,
    colPal = c("white", "red"), col.dist = NA, row.dist = NA, layout = NA,
    dendrogram = "row")

    genesBarplot(migsaRes, ...)

    ## S4 method for signature 'MIGSAres'
    genesBarplot(migsaRes, enrFilter = 0, gsFilter = 0)

    migsaHeatmap(migsaRes, ...)

    ## S4 method for signature 'MIGSAres'
    migsaHeatmap(migsaRes, enrFilter = 0, expFilter = 0,
    categories = list(), categLabels = TRUE, colPal = c("white", "red"),
    col.dist = NA, row.dist = NA, layout = NA, remove0Rows = TRUE,
    breaks = NA)

    ## S4 method for signature 'matrix'
    migsaHeatmap(migsaRes, categories = list(),
    categLabels = TRUE, colPal = c("white", "red"), col.dist = NA,
    row.dist = NA, layout = NA)

    geneSetBarplot(migsaRes, ...)

    ## S4 method for signature 'MIGSAres'
    geneSetBarplot(migsaRes, enrFilter = 0)

### Arguments

`migsaRes` | MIGSAres object.
`...` | not in use.
`enrFilter` | numeric. Keep gene sets enriched in at least enrFilter experiments.
`gsFilter` | numeric. Keep genes enriched in at least gsFilter gene sets.
`colPal` | vector. Character vector of two colors, first value will represent FALSE/1 on heatmap, and second value TRUE/0.
`col.dist` | character. Distance algorithm to be used in columns, passed to vegdist function. If migsaRes has cutoff then default is jaccard, else, default is euclidean.
`row.dist` | character. Distance algorithm to be used in rows, passed to vegdist function. If migsaRes has cutoff then default is jaccard, else, default is euclidean.
`layout` | matrix. The layout used for heatmaps.
`dendrogram` | character. Wheter to plot "row", "col", "none" or "both" dendrograms.
`expFilter` | numeric. Keep experiments which enriched at least expFilter gene sets.
`categories` | list. List of character vectors, each vector must have the same length as the number of experiments (ncol(migsaRes)-3). It will plot for each category/column a color representing its category.
`categLabels` | logical. Indicates if labels should be plotted for each category.
`remove0Rows` | logical. Whether remove gene sets that are not enriched in any experiment.
`breaks` | numeric. If migsaRes does not have cutoff then break P-values in breaks intervals.

### Value

In heatmap functions: A list returned by heatmap.2 function (plotted data). In other functions: A ggplot object used as graphic.

### See Also

`setEnrCutoff`

### Examples

    data(migsaRes);
    ## For this example lets work with the first 50 results
    migsaRes <- migsaRes[1:50,];

    #### genesHeatmap
    ## First lets set a cutoff of 0.1
    migsaResWCoff <- setEnrCutoff(migsaRes, 0.1);

    ## Lets check what genes contributed to enrich the highest number of gene
    ## sets (in more than one gene set).
    genesHeatmap(migsaResWCoff, gsFilter=1);

    ## Moreover we can keep gene sets which where enriched in more than
    ## enrFilter experiments. To do this, we can use the enrFilter parameter.

    #### genesBarplot
    ## Lets set a cutoff of 0.01
    migsaResWCoff <- setEnrCutoff(migsaRes, 0.01);

    ## Lets check what genes contributed to enrich the highest number of gene
    ## sets (in more than one gene set).
    genesBarplot(migsaResWCoff, gsFilter=1);

    ## Moreover we can keep gene sets which where enriched in more than
    ## enrFilter experiments. To do this, we can use the enrFilter parameter.

    #### migsaHeatmap
    ## Lets set a cutoff of 0.1
    migsaResWCoff <- setEnrCutoff(migsaRes, 0.1);

    ## Lets visually check enriched gene sets shared between experiments.
    migsaHeatmap(migsaResWCoff);

    #### geneSetBarplot
    ## Lets set a cutoff of 0.1
    migsaResWCoff <- setEnrCutoff(migsaRes, 0.1);

    ## Lets check in how many experiments each gene set was enriched (in more
    ## than one experiment).
    geneSetBarplot(migsaResWCoff, enrFilter=1);

[Package MIGSA version 1.4.0 Index]