heatmapAtlasExperiment: Generate HeatMap from normalised expression data for an...

View source: R/functions.R

heatmapAtlasExperiment R Documentation

Generate HeatMap from normalised expression data for an Expression Atlas experiment

Description

This function generates a heatmap for an Expression Atlas experiment, from normalised expression data.

Usage

    heatmapAtlasExperiment( df, filename = "heatmap", save_pdf = FALSE, show_plot = TRUE, heatmap_color = "Blues", top_n = 100, show_heatmap_title = TRUE )

Arguments

df

Dataframe in the output format of getNormalisedAtlasExpression.

filename

Filename for the output heatmap file. Default is "heatmap.pdf".

save_pdf

Save PDF file with the heatmap. Default is FALSE.

show_plot

Show plot in the R console. Default is TRUE.

heatmap_color

Colour palette for the heatmap. Default is "Blues".

top_n

Number of top most variable genes to be shown in the heatmap. Default is 100.

show_heatmap_title

Whether to show a title in the heatmap. Default is TRUE.

Value

A PDF file with the generated heatmap.

Examples

    
    # Download the TPM Expression values for experiment E-MTAB-4045
    mtab4045_tpm <- getNormalisedAtlasExpression( "E-MTAB-4045", "tpm" )

    # Generate heatmap with default parameters
    heatmapAtlasExperiment( mtab4045_tpm, "heatmap", TRUE, FALSE, "Blues", 100, TRUE )

    # Check if the PDF file was created
    file.exists("heatmap.pdf")

    # Download the CPM Expression values for experiment E-MTAB-4045 with custom parameters
    mtab4045_cpm <- getNormalisedAtlasExpression( "E-MTAB-4045", "cpm" )

    # Generate heatmap with default parameters
    heatmapAtlasExperiment( mtab4045_cpm, "E-MTAB-4045-cpm-heatmap", TRUE, FALSE, "Blues", 100, TRUE )

    # Check if the PDF file was created
    file.exists("E-MTAB-4045-cpm-heatmap.pdf")


ebi-gene-expression-group/bioconductor-ExpressionAtlas documentation built on July 4, 2025, 12:53 a.m.